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-10 16:41:38 +0000
committerStijn Buys <ingar@osirion.org>2008-10-10 16:41:38 +0000
commit02fcd22d8cde355aa898a8c6bb4773d9434b8e9a (patch)
tree9397f1f5b61a0978acadc4c15fd330ee7138c59b /src/ui/ui.h
parent4331f5c17901f46693dcb5c2df96276f6851be25 (diff)
adds KeyPress, DevInfo and Stats widgets
Diffstat (limited to 'src/ui/ui.h')
-rw-r--r--src/ui/ui.h23
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;