Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-10-07 20:35:52 +0000
committerStijn Buys <ingar@osirion.org>2008-10-07 20:35:52 +0000
commitbc50666e86d5739ccde633eb630cc75b3e0fcb71 (patch)
treeafad7eb043d6773a7b2a426f4d7b1f600301b5cd /src/ui/widget.h
parentf54bd48a884e4e3c95818f042a4b2418a6e070a4 (diff)
libui updates
Diffstat (limited to 'src/ui/widget.h')
-rw-r--r--src/ui/widget.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/ui/widget.h b/src/ui/widget.h
index 13f392e..26832c7 100644
--- a/src/ui/widget.h
+++ b/src/ui/widget.h
@@ -45,7 +45,6 @@ public:
inline float const height() const { return widget_size.y; }
- inline Palette const *palette() const { return widget_palette; }
inline std::string const &label() const { return widget_label; }
@@ -53,10 +52,12 @@ public:
inline bool background() const { return widget_background; }
- inline Widget *parent() { return widget_parent; }
+ inline Widget *parent() const { return widget_parent; }
inline bool visible() const { return widget_visible; }
+ Palette const *palette() const;
+
bool has_focus() const;
@@ -99,17 +100,23 @@ public:
/// draw event
virtual void event_draw();
- /// handle mouse cursor
- virtual void event_mousecursor(float x, float y);
+ /// handle mouse movement
+ virtual void mousemove(float x, float y);
- /// handle keyboard input
- virtual void event_keypress(unsigned int key, unsigned int modifier);
+ /// handle keyboard events
+ virtual void keypress(unsigned int key, unsigned int modifier);
- virtual void event_keyrelease(unsigned int key, unsigned int modifier);
+ virtual void keyrelease(unsigned int key, unsigned int modifier);
/// child widgets
inline Children &children() { return widget_children; }
+ /// raise the widget to the top of the widget stack
+ void raise();
+
+ /// lower the widget to the bottom of the widget stack
+ void lower();
+
protected:
/// draw the widget
virtual void draw();
@@ -171,8 +178,6 @@ protected:
*/
Widget *find_focus(math::Vector2f const & pos);
- Palette *widget_palette;
-
private:
bool widget_visible;
bool widget_background;
@@ -183,6 +188,7 @@ private:
Children widget_children;
+ Palette *widget_palette;
Widget *widget_parent;
Children::iterator find_child(Widget *child);