diff options
Diffstat (limited to 'src/client/messagebox.h')
-rw-r--r-- | src/client/messagebox.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/client/messagebox.h b/src/client/messagebox.h new file mode 100644 index 0000000..ac1d46b --- /dev/null +++ b/src/client/messagebox.h @@ -0,0 +1,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__ + + |