3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author John Levon <moz@compsoc.man.ac.uk>
16 #include "Alert_pimpl.h"
20 #ifndef CXX_GLOBAL_CSTD
29 void Alert::alert(string const & s1, string const & s2, string const & s3)
32 lyxerr << "------------------------------" << endl
33 << s1 << endl << s2 << endl << s3 << endl
34 << "------------------------------" << endl;
36 alert_pimpl(s1, s2, s3);
41 void Alert::err_alert(string const & s1, string const & s2)
43 alert(s1, s2, strerror(errno));
47 bool Alert::askQuestion(string const & s1, string const & s2,
48 string const & s3, bool default_value)
51 lyxerr << "----------------------------------------" << endl
57 lyxerr << "Assuming answer is "
58 << (default_value ? "yes" : "no")
60 << "----------------------------------------" << endl;
63 return askQuestion_pimpl(s1, s2, s3);
68 int Alert::askConfirmation(string const & s1, string const & s2,
69 string const & s3, int default_value)
72 lyxerr << "----------------------------------------" << endl
78 lyxerr << "Assuming answer is ";
79 if (default_value == 1)
81 else if (default_value == 2)
86 << "----------------------------------------" << endl;
89 return askConfirmation_pimpl(s1, s2, s3);
94 pair<bool, string> const Alert::askForText(string const & msg,
98 lyxerr << "----------------------------------------" << endl
100 << "Assuming answer is " << dflt
101 << "----------------------------------------" << endl;
102 return make_pair<bool, string>(true, dflt);
104 return askForText_pimpl(msg, dflt);