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-07 17:14:27 +0000
committerStijn Buys <ingar@osirion.org>2008-10-07 17:14:27 +0000
commitf54bd48a884e4e3c95818f042a4b2418a6e070a4 (patch)
tree73e82729a2f97b58e94ffd6944ac1ad47bf8314e /src/ui/ui.h
parentf8d1ee921c83b7b148883b3ee16e4ec9c776d6db (diff)
working button click
Diffstat (limited to 'src/ui/ui.h')
-rw-r--r--src/ui/ui.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 527d959..28b6997 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -39,8 +39,18 @@ public:
/// return the active window
Window *active() { return ui_active_window; }
- /// set mouse cursor position
- void set_mouse_cursor(float x, float y);
+ /// handle mouse cursor
+ virtual void event_mousecursor(float x, float y);
+
+ /// handle keyboard input
+ virtual void event_keypress(unsigned int key, unsigned int modifier);
+ virtual void event_keyrelease(unsigned int key, unsigned int modifier);
+
+ /// run a user interface frame
+ void frame();
+
+ /// return the widget that has the focus
+ inline Widget *focus() { return ui_focus; }
protected:
virtual void add_window(Window *window);
@@ -48,6 +58,7 @@ protected:
private:
Window *ui_active_window;
+ Widget *ui_focus;
math::Vector2f mouse_cursor;
};
@@ -57,8 +68,6 @@ void init();
/// shutdown the user interface
void shutdown();
-void frame();
-
/// the global root window
UI *root();