diff options
author | Stijn Buys <ingar@osirion.org> | 2008-10-10 16:41:38 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-10-10 16:41:38 +0000 |
commit | 02fcd22d8cde355aa898a8c6bb4773d9434b8e9a (patch) | |
tree | 9397f1f5b61a0978acadc4c15fd330ee7138c59b /src/ui/ui.h | |
parent | 4331f5c17901f46693dcb5c2df96276f6851be25 (diff) |
adds KeyPress, DevInfo and Stats widgets
Diffstat (limited to 'src/ui/ui.h')
-rw-r--r-- | src/ui/ui.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/ui/ui.h b/src/ui/ui.h index b3b2259..3a4ba75 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -40,29 +40,38 @@ public: /// return the active window Window *active() { return ui_active_window; } - /// handle mouse cursor - void event_mousemove(float x, float y); + /// mouse cursor input + void input_mouse(float x, float y); - /// handle keyboard input - void event_keypress(unsigned int key, unsigned int modifier); - void event_keyrelease(unsigned int key, unsigned int modifier); + /// keyboard input + void input_key(bool pressed, unsigned int key, unsigned int modifier); /// run a user interface frame void frame(); - /// return the widget that has the focus + /// return the widget which has the focus inline Widget *focus() { return ui_focus; } + /* -- Fonts ------------------------------------------------ */ + /// default small font + inline Font *font_small() { return ui_font_small; } + + /// default medium font + inline Font *font_large() { return ui_font_large; } + protected: Window *find_window(const char *label); virtual void add_window(Window *window); virtual void remove_window(Window *window); + /// handle keyboard input + virtual bool keypress(unsigned int key, unsigned int modifier); + virtual bool keyrelease(unsigned int key, unsigned int modifier); + private: Palette *ui_palette; Font *ui_font_small; - Font *ui_font_medium; Font *ui_font_large; Window *ui_active_window; |