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 void Alert::alert(string const & s1, string const & s2, string const & s3)
27 lyxerr << "------------------------------" << endl
28 << s1 << endl << s2 << endl << s3 << endl
29 << "------------------------------" << endl;
31 alert_pimpl(s1, s2, s3);
36 int Alert::prompt(string const & title, string const & question,
38 string const & b1, string const & b2, string const & b3)
41 return prompt_pimpl(title, question, default_button, b1, b2, b3);
43 lyxerr << title << endl;
44 lyxerr << "----------------------------------------" << endl;
45 lyxerr << question << endl;
46 lyxerr << "Assuming answer is ";
47 switch (default_button) {
48 case 0: lyxerr << b1 << endl;
49 case 1: lyxerr << b2 << endl;
50 case 2: lyxerr << b3 << endl;
52 return default_button;
56 void Alert::warning(string const & title, string const & message)
59 return warning_pimpl(title, message);
61 lyxerr << "Warning: " << title << endl;
62 lyxerr << "----------------------------------------" << endl;
63 lyxerr << message << endl;
67 void Alert::error(string const & title, string const & message)
70 return error_pimpl(title, message);
72 lyxerr << "Error: " << title << endl;
73 lyxerr << "----------------------------------------" << endl;
74 lyxerr << message << endl;
78 void Alert::information(string const & title, string const & message)
81 return information_pimpl(title, message);
83 lyxerr << title << endl;
84 lyxerr << "----------------------------------------" << endl;
85 lyxerr << message << endl;
89 pair<bool, string> const Alert::askForText(string const & msg,
93 lyxerr << "----------------------------------------" << endl
95 << "Assuming answer is " << dflt
96 << "----------------------------------------" << endl;
97 return make_pair<bool, string>(true, dflt);
99 return askForText_pimpl(msg, dflt);