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