Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-08-28 18:15:52 +0000
committerStijn Buys <ingar@osirion.org>2011-08-28 18:15:52 +0000
commit5fbcaf2e42228f38941bc24b8ab193a74a9e6422 (patch)
tree6cfc8d3990b16f42a9d3f31c3d3544c4346953f4 /src/ui
parent8eb789c448677ecba9aec9d8359eeb3920549f14 (diff)
Made a number of ui::Widget child managment methods public.
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();