diff options
Diffstat (limited to 'src/gui_message.hh')
| -rw-r--r-- | src/gui_message.hh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/gui_message.hh b/src/gui_message.hh new file mode 100644 index 0000000..c44cce1 --- /dev/null +++ b/src/gui_message.hh @@ -0,0 +1,38 @@ +// -*- mode: c++; c-basic-offset: 2; -*- + +#ifndef GUI_MESSAGE_HH +#define GUI_MESSAGE_HH + +#include <string> +#include <vector> + +#include "gui_window.hh" + +class GuiMessage : public GuiWindow { +public: + class Listener : public GuiWindow::Listener { + public: + virtual ~Listener() {} + + protected: + Listener() {} + }; + + enum Type { + ERROR, + OTHER, + }; + + static GuiMessage* create(Type type, std::string const& title, + std::string const& text); + + virtual void add_listener(Listener* listener) = 0; + virtual void remove_listener(Listener* listener) = 0; + + virtual void show(GuiWindow* parent) = 0; + +protected: + GuiMessage() {} +}; + +#endif // GUI_MESSAGE_HH |
