]> git.lyx.org Git - lyx.git/blob - src/frontends/Alert.h
better selection and scrolling behaviour
[lyx.git] / src / frontends / Alert.h
1 // -*- C++ -*-
2 /**
3  * \file Alert.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef LYX_ALERT_H
13 #define LYX_ALERT_H
14
15 #include "support/lstrings.h"
16
17 #include <algorithm>
18
19 namespace Alert {
20
21 /// show an alert message
22 void alert(string const & title, string const & s1 = string(),
23            string const & s2 = string());
24
25 /// show an alert message and strerror(errno)
26 void err_alert(string const & s1, string const & s2 = string());
27
28 /// ask a question
29 bool askQuestion(string const & s1, string const & s2 = string(),
30                  string const & s3 = string(), bool default_value = true);
31
32 /// Returns 1 for yes, 2 for no, 3 for cancel.
33 int askConfirmation(string const & s1, string const & s2 = string(),
34                     string const & s3 = string(), int default_value = 1);
35
36 /// Asks for a text
37 std::pair<bool, string> const
38 askForText(string const & msg,
39            string const & dflt = string());
40
41 }
42
43 #endif // LYX_ALERT_H