blob: 23e4b1527440366f4f3936c97e321e85b12608f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#ifndef __emessage_h
#define __emessage_h
#include <lib/gui/ewindow.h>
class eLabel;
/**
* \brief A (modal) messagebox.
*/
class eMessageBox: public eWindow
{
eLabel *text, *icon;
public:
void pressedOK();
void pressedCancel();
void pressedYes();
void pressedNo();
public:
enum { btOK=1, btCancel=2, btYes=4, btNo=8, btMax};
enum { iconInfo=16, iconWarning=32, iconQuestion=64, iconError=128 };
/**
* \brief Creates a messagebox.
*
* example:
* \code
{
eMessageBox message("Your documentation sucks!\nPlease consider using Neutrino!", "Documentation");
message.show();
message.exec();
message.hide();
} \endcode
* \param string The string displayed inside the messagebox.
* \param caption The title of the messagebox.
*/
eMessageBox(eString string, eString caption, int flags=btOK, int def=btOK );
~eMessageBox();
};
#endif
|