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"
22 #ifndef CXX_GLOBAL_CSTD
31 void Alert::alert(string const & s1, string const & s2, string const & s3)
34 lyxerr << "------------------------------" << endl
35 << s1 << endl << s2 << endl << s3 << endl
36 << "------------------------------" << endl;
38 alert_pimpl(s1, s2, s3);
43 void Alert::err_alert(string const & s1, string const & s2)
45 alert(s1, s2, strerror(errno));
49 bool Alert::askQuestion(string const & s1, string const & s2,
50 string const & s3, bool default_value)
53 lyxerr << "----------------------------------------" << endl
59 lyxerr << "Assuming answer is "
60 << (default_value ? "yes" : "no")
62 << "----------------------------------------" << endl;
65 return askQuestion_pimpl(s1, s2, s3);
70 int Alert::askConfirmation(string const & s1, string const & s2,
71 string const & s3, int default_value)
74 lyxerr << "----------------------------------------" << endl
80 lyxerr << "Assuming answer is ";
81 if (default_value == 1)
83 else if (default_value == 2)
88 << "----------------------------------------" << endl;
91 return askConfirmation_pimpl(s1, s2, s3);
96 pair<bool, string> const Alert::askForText(string const & msg,
100 lyxerr << "----------------------------------------" << endl
102 << "Assuming answer is " << dflt
103 << "----------------------------------------" << endl;
104 return make_pair<bool, string>(true, dflt);
106 return askForText_pimpl(msg, dflt);