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,
26 string const & b1, string const & b2, string const & b3)
29 return prompt_pimpl(title, question, default_button, b1, b2, b3);
31 lyxerr << title << endl;
32 lyxerr << "----------------------------------------" << endl;
33 lyxerr << question << endl;
34 lyxerr << "Assuming answer is ";
35 switch (default_button) {
36 case 0: lyxerr << b1 << endl;
37 case 1: lyxerr << b2 << endl;
38 case 2: lyxerr << b3 << endl;
40 return default_button;
44 void Alert::warning(string const & title, string const & message)
47 return warning_pimpl(title, message);
49 lyxerr << "Warning: " << title << endl;
50 lyxerr << "----------------------------------------" << endl;
51 lyxerr << message << endl;
55 void Alert::error(string const & title, string const & message)
58 return error_pimpl(title, message);
60 lyxerr << "Error: " << title << endl;
61 lyxerr << "----------------------------------------" << endl;
62 lyxerr << message << endl;
66 void Alert::information(string const & title, string const & message)
69 return information_pimpl(title, message);
71 lyxerr << title << endl;
72 lyxerr << "----------------------------------------" << endl;
73 lyxerr << message << endl;
77 pair<bool, string> const Alert::askForText(string const & msg,
80 if (!lyx_gui::use_gui) {
81 lyxerr << "----------------------------------------" << endl
83 << "Assuming answer is " << dflt
84 << "----------------------------------------" << endl;
85 return make_pair<bool, string>(true, dflt);
87 return askForText_pimpl(msg, dflt);