Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/ui/ui.h
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-10-12 17:27:00 +0000
committerStijn Buys <ingar@osirion.org>2008-10-12 17:27:00 +0000
commit574bf11742c40203a4433c0b69264014b10b5a96 (patch)
tree5fdaa40d22c38e5d8cce47d43a1a892008322598 /src/ui/ui.h
parentb417df720584c101f3799874a0c836a543a8d0a8 (diff)
container widget
Diffstat (limited to 'src/ui/ui.h')
-rw-r--r--src/ui/ui.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/ui/ui.h b/src/ui/ui.h
index eb2d4e0..583f76c 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -34,17 +34,17 @@ public:
void load();
/// make a window the active window
- void show_window(const char *label);
+ void show_menu(const char *label);
/// hide the active window
- void hide_window();
+ void hide_menu();
/// show previous window
- void previous_window();
+ void previous_menu();
- /// return the active window
+ /// return the active menu
Window *active() {
- return ui_active_window;
+ return ui_active_menu;
}
/// return the widget with global mouse focus
@@ -79,11 +79,13 @@ public:
}
protected:
- Window *find_window(const char *label) const;
-
- virtual void add_window(Window *window);
- virtual void remove_window(Window *window);
+ typedef std::list<Window *> Menus;
+ Menus::iterator find_menu(Window *menu);
+ Window *find_menu(const char *label);
+
+ void add_menu(Window *window);
+
/* -- event handlers --------------------------------------- */
/// handle keypress events
@@ -97,9 +99,11 @@ private:
Font *ui_font_small;
Font *ui_font_large;
- Window *ui_active_window;
+ Window *ui_active_menu;
Widget *ui_mouse_focus;
Widget *ui_input_focus;
+
+ Menus ui_menus;
/// TODO move to separate object to handle mouse cursor drawing
math::Vector2f mouse_cursor;