diff options
author | Stijn Buys <ingar@osirion.org> | 2010-09-17 15:19:34 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-09-17 15:19:34 +0000 |
commit | c62fe609a69058e2e30f757e9a06f72a98464232 (patch) | |
tree | 53f6a671bd84924ddf7d278cf10a3e527670088e /src/ui/widget.h | |
parent | 0c509866a37ab47ff0e48d357ca55e31658c37c2 (diff) |
Bump network protocol version to 19, menudescriptions use the info infrastructure, client-side lazy info update requests.
Updated ROADMAP
Diffstat (limited to 'src/ui/widget.h')
-rw-r--r-- | src/ui/widget.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ui/widget.h b/src/ui/widget.h index 50678fa..856fca0 100644 --- a/src/ui/widget.h +++ b/src/ui/widget.h @@ -28,7 +28,7 @@ class Widget public: /// types of custom events a widget can emit - enum Event {EventNone = 0, EventSelected = 1}; + enum Event {EventNone = 0, EventButtonClicked, EventListItemClicked}; /// create a new widget Widget(Widget *parent = 0); @@ -202,9 +202,6 @@ public: /// enable or disable widget background void set_background(bool background = true); - /// emit a custom event - void emit(const Event event, const void *data=0); - /* -- event distributors --------------------------------------- */ /** @@ -239,6 +236,14 @@ public: **/ bool event_emit(Widget *sender, const Event event, void *data = 0); + /// emit a custom event + inline void emit(const Event event, void *data=0) { + event_emit(this, event, data); + } + + /// remove all child widgets + virtual void remove_children(); + protected: /// type definition for child widgets typedef std::list<Widget *> Children; @@ -339,9 +344,6 @@ protected: /// remove a child widget virtual void remove_child(Widget *child); - /// remove all child widgets - virtual void remove_children(); - private: void draw_debug_border(); |