/* 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__