3 * Read the file COPYING
7 * Full author contact details are available in file CREDITS
17 #include "Alert_pimpl.h"
21 #ifndef CXX_GLOBAL_CSTD
30 void Alert::alert(string const & s1, string const & s2, string const & s3)
33 lyxerr << "------------------------------" << endl
34 << s1 << endl << s2 << endl << s3 << endl
35 << "------------------------------" << endl;
37 alert_pimpl(s1, s2, s3);
42 void Alert::err_alert(string const & s1, string const & s2)
44 alert(s1, s2, strerror(errno));
48 bool Alert::askQuestion(string const & s1, string const & s2,
49 string const & s3, bool default_value)
52 lyxerr << "----------------------------------------" << endl
58 lyxerr << "Assuming answer is "
59 << (default_value ? "yes" : "no")
61 << "----------------------------------------" << endl;
64 return askQuestion_pimpl(s1, s2, s3);
69 int Alert::askConfirmation(string const & s1, string const & s2,
70 string const & s3, int default_value)
73 lyxerr << "----------------------------------------" << endl
79 lyxerr << "Assuming answer is ";
80 if (default_value == 1)
82 else if (default_value == 2)
87 << "----------------------------------------" << endl;
90 return askConfirmation_pimpl(s1, s2, s3);
95 pair<bool, string> const Alert::askForText(string const & msg,
99 lyxerr << "----------------------------------------" << endl
101 << "Assuming answer is " << dflt
102 << "----------------------------------------" << endl;
103 return make_pair<bool, string>(true, dflt);
105 return askForText_pimpl(msg, dflt);