blob: ac1d46bb1beb1386d46236304c3bd2b15598ca46 (
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
41
42
43
44
45
46
47
48
49
50
|
/*
client/messagebox.h
This file is part of the Osirion project and is distributed under
the terms and conditions of the GNU General Public License version 2
*/
#ifndef __INCLUDED_CLIENT_MESSAGEBOX_H__
#define __INCLUDED_CLIENT_MESSAGEBOX_H__
#include "ui/window.h"
#include "ui/button.h"
#include "ui/label.h"
namespace client
{
/**
* @brief a generic messagebox window class
* */
class Messagebox : public ui::Window
{
public:
Messagebox(ui::Widget *parent = 0);
virtual ~Messagebox();
void set_text(const std::string &text);
void set_buttons(const std::string &text1, const std::string &command1, const std::string &text2, const std::string &command2);
protected:
virtual void resize();
virtual bool on_keypress(const int key, const unsigned int modifier);
virtual bool on_emit(Widget *sender, const Event event, void *data);
private:
/// the actual dialog widget
ui::Window *messagebox_frame;
ui::Label *messagebox_label;
ui::Button *messagebox_button1;
ui::Button *messagebox_button2;
};
}
#endif // __INCLUDED_CLIENT_MESSAGEBOX_H__
|