3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS
18 #include "Alert_pimpl.h"
24 int Alert::prompt(string const & title, string const & question,
25 int default_button, int escape_button,
26 string const & b1, string const & b2, string const & b3)
29 return prompt_pimpl(title, question,
30 default_button, escape_button, b1, b2, b3);
32 lyxerr << title << endl;
33 lyxerr << "----------------------------------------" << endl;
34 lyxerr << question << endl;
35 lyxerr << "Assuming answer is ";
36 switch (default_button) {
37 case 0: lyxerr << b1 << endl;
38 case 1: lyxerr << b2 << endl;
39 case 2: lyxerr << b3 << endl;
41 return default_button;
45 void Alert::warning(string const & title, string const & message)
48 return warning_pimpl(title, message);
50 lyxerr << "Warning: " << title << endl;
51 lyxerr << "----------------------------------------" << endl;
52 lyxerr << message << endl;
56 void Alert::error(string const & title, string const & message)
59 return error_pimpl(title, message);
61 lyxerr << "Error: " << title << endl;
62 lyxerr << "----------------------------------------" << endl;
63 lyxerr << message << endl;
67 void Alert::information(string const & title, string const & message)
70 return information_pimpl(title, message);
72 lyxerr << title << endl;
73 lyxerr << "----------------------------------------" << endl;
74 lyxerr << message << endl;
78 pair<bool, string> const Alert::askForText(string const & msg,
81 if (!lyx_gui::use_gui) {
82 lyxerr << "----------------------------------------" << endl
84 << "Assuming answer is " << dflt
85 << "----------------------------------------" << endl;
86 return make_pair<bool, string>(true, dflt);
88 return askForText_pimpl(msg, dflt);