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"
25 void Alert::alert(string const & s1, string const & s2, string const & s3)
28 lyxerr << "------------------------------" << endl
29 << s1 << endl << s2 << endl << s3 << endl
30 << "------------------------------" << endl;
32 alert_pimpl(s1, s2, s3);
37 void Alert::err_alert(string const & s1, string const & s2)
39 alert(s1, s2, strerror(errno));
43 bool Alert::askQuestion(string const & s1, string const & s2,
44 string const & s3, bool default_value)
47 lyxerr << "----------------------------------------" << endl
53 lyxerr << "Assuming answer is "
54 << (default_value ? "yes" : "no")
56 << "----------------------------------------" << endl;
59 return askQuestion_pimpl(s1, s2, s3);
64 int Alert::askConfirmation(string const & s1, string const & s2,
65 string const & s3, int default_value)
68 lyxerr << "----------------------------------------" << endl
74 lyxerr << "Assuming answer is ";
75 if (default_value == 1)
77 else if (default_value == 2)
82 << "----------------------------------------" << endl;
85 return askConfirmation_pimpl(s1, s2, s3);
90 pair<bool, string> const Alert::askForText(string const & msg,
94 lyxerr << "----------------------------------------" << endl
96 << "Assuming answer is " << dflt
97 << "----------------------------------------" << endl;
98 return make_pair<bool, string>(true, dflt);
100 return askForText_pimpl(msg, dflt);