From a14d80f83aebe75241bf63b4f3ffca3a5d952577 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 6 Oct 2008 18:22:32 +0000 Subject: libui updates, support menu .ini files --- src/ui/widget.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/ui/widget.h') diff --git a/src/ui/widget.h b/src/ui/widget.h index 97c6a01..fcb8e6b 100644 --- a/src/ui/widget.h +++ b/src/ui/widget.h @@ -10,8 +10,11 @@ #include #include +#include "auxiliary/functions.h" +#include "math/color.h" #include "math/vector2f.h" #include "ui/palette.h" +#include "sys/sys.h" namespace ui { @@ -111,8 +114,12 @@ protected: /// list widget content size_t list(size_t indent); - /// map local widget coordinates to global coordinates - inline math::Vector2f to_global(math::Vector2f v) { + /// print widget description + virtual void print(size_t indent); + + /// map local widget location to global location + inline math::Vector2f global_location() { + math::Vector2f v(widget_location); Widget *parent = widget_parent; while (parent) { v += parent->location(); @@ -121,9 +128,11 @@ protected: return v; } -private: - + /// remove a child widget + void remove_child(Widget *child); + Palette *widget_palette; +private: bool widget_visible; bool widget_background; bool widget_border; @@ -137,8 +146,6 @@ private: Children::iterator find_child(Widget *child); void add_child(Widget *child); - - void remove_child(Widget *child); }; } -- cgit v1.2.3