Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/widget.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/ui/widget.h b/src/ui/widget.h
index e98d4c5..9aae10e 100644
--- a/src/ui/widget.h
+++ b/src/ui/widget.h
@@ -27,6 +27,10 @@ class Widget
{
public:
+ /// type definition for child widgets
+ typedef std::list<Widget *> Children;
+
+
/// types of custom events a widget can emit
enum Event {
EventNone = 0,
@@ -51,6 +55,13 @@ public:
/* -- inspectors -------------------------------------------- */
+ /// child widgets
+ inline Children &children() {
+ return widget_children;
+ }
+
+
+
/// pixel coordinates of the top-left corner of this widget within its parent
inline const math::Vector2f &location() const {
return widget_location;
@@ -161,6 +172,10 @@ public:
/// return true of the widget is a child widget
bool is_child(const Widget *widget) const;
+ /// return the next sibling
+ Widget *next_sibling();
+
+
/* -- mutators --------------------------------------------- */
/// raise the widget to the top of the widget stack
@@ -262,7 +277,7 @@ public:
/**
* @brief calls the custom event handler and sends unhandled events to the parent widget
- * @see on_event
+ * @see on_emit
**/
bool event_emit(Widget *sender, const Event event, void *data = 0);
@@ -272,16 +287,6 @@ public:
}
protected:
- /// type definition for child widgets
- typedef std::list<Widget *> Children;
-
- /// child widgets
- inline Children &children() {
- return widget_children;
- }
-
- /// return the next sibling
- Widget *next_sibling();
/// find the widget that has input focus
virtual Widget *find_input_focus();