]> git.lyx.org Git - lyx.git/blob - src/frontends/Alert.h
enable Font cache only for MacOSX and inline width() for other platform.
[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
18 namespace Alert {
19
20 /**
21  * Prompt for a question. Returns 0-2 for the chosen button.
22  * Set default_button and cancel_button to reasonable values. b1-b3
23  * should have accelerators marked with an '&'. title should be
24  * a short summary. Strings should be gettextised.
25  * Please think about the poor user.
26  *
27  * Remember to use boost::format. If you make any of these buttons
28  * "Yes" or "No", I will personally come around to your house and
29  * slap you with fish, and not in an enjoyable way either.
30  */
31 int prompt(lyx::docstring const & title, lyx::docstring const & question,
32            int default_button, int cancel_button,
33            lyx::docstring const & b1, lyx::docstring const & b2, lyx::docstring const & b3 = lyx::docstring());
34
35 /**
36  * Display a warning to the user. Title should be a short (general) summary.
37  * Only use this if the user cannot perform some remedial action.
38  */
39 void warning(lyx::docstring const & title, lyx::docstring const & message);
40
41 /**
42  * Display a warning to the user. Title should be a short (general) summary.
43  * Only use this if the user cannot perform some remedial action.
44  */
45 void error(lyx::docstring const & title, lyx::docstring const & message);
46
47 /**
48  * Informational message. Use very very sparingly. That is, you must
49  * apply to me, in triplicate, under the sea, breathing in petrol
50  * and reciting the Nicene Creed, whilst running uphill and also
51  * eating.
52  */
53 void information(lyx::docstring const & title, lyx::docstring const & message);
54
55 /// Asks for a text. DO NOT USE !!
56 std::pair<bool, lyx::docstring> const
57 askForText(lyx::docstring const & msg,
58            lyx::docstring const & dflt = lyx::docstring());
59
60 }
61
62 #endif // LYX_ALERT_H