#include <freecloth/gfx/gfxWindow.h>
Inheritance diagram for GfxWindow:


Public Types | |
| typedef UInt32 | ModBitfield |
| Modifier bitfield. (Not the same as the enum since it can contain arbitrary combinations of the above enum entries.). | |
| enum | KeyID { KB_NONE = 0, KB_BACKSPACE = 0x08, KB_TAB = '\t', KB_RETURN = '\n', KB_ENTER = KB_RETURN, KB_ESCAPE = 0x1B, KB_SPACE = ' ', KB_LEFT, KB_RIGHT, KB_UP, KB_DOWN, KB_0 = '0', KB_1 = '1', KB_2 = '2', KB_3 = '3', KB_4 = '4', KB_5 = '5', KB_6 = '6', KB_7 = '7', KB_8 = '8', KB_9 = '9', KB_A = 'A', KB_B = 'B', KB_C = 'C', KB_D = 'D', KB_E = 'E', KB_F = 'F', KB_G = 'G', KB_H = 'H', KB_I = 'I', KB_J = 'J', KB_K = 'K', KB_L = 'L', KB_M = 'M', KB_N = 'N', KB_O = 'O', KB_P = 'P', KB_Q = 'Q', KB_R = 'R', KB_S = 'S', KB_T = 'T', KB_U = 'U', KB_V = 'V', KB_W = 'W', KB_X = 'X', KB_Y = 'Y', KB_Z = 'Z' } |
| Key definitions. | |
| enum | { KBM_ALT = 0x01, KBM_CONTROL = 0x02, KBM_SHIFT = 0x04 } |
| Modifiers, combined in a bitfield. | |
| enum | ButtonID { MBN_NONE = 0, MBN_LEFT, MBN_RIGHT, MBN_MIDDLE } |
| Mouse button ids Sadly, MB_ prefix conflicts with Win32 constants. | |
Public Methods | |
| GfxWindow () | |
| Constructor. | |
| virtual | ~GfxWindow () |
| Destructor. | |
| virtual UInt32 | getWidth () const=0 |
| virtual UInt32 | getHeight () const=0 |
| Float | getAspectRatio () const |
| virtual void | close ()=0 |
| virtual void | addObserver (GfxWindowObserver &) |
| Add an observer. The observer must live longer than window. | |
| virtual void | removeObserver (GfxWindowObserver &) |
Static Public Methods | |
| void | addStaticObserver (GfxWindowObserver &) |
| Add a static observer. The observer must live longer than window. | |
| void | removeStaticObserver (GfxWindowObserver &) |
Protected Methods | |
| void | closeReceived () |
| Just prior to closing the window. Not sent to static observers. | |
| void | displayReceived () |
| Redraw requested... | |
| void | idleReceived () |
| void | keyPressed (KeyID, ModBitfield) |
| void | keyDownReceived (KeyID, ModBitfield) |
| void | keyUpReceived (KeyID, ModBitfield) |
| void | mouseDownReceived (UInt32 x, UInt32 y, ButtonID) |
| void | mouseUpReceived (UInt32 x, UInt32 y, ButtonID) |
| void | mouseMoveReceived (UInt32 x, UInt32 y) |
| void | windowResized (UInt32 x, UInt32 y, UInt32 width, UInt32 height) |
| void | uiReceived (UInt32 uid) |
Private Types | |
| typedef std::list< GfxWindowObserver * > | ObserverList |
Private Methods | |
| ObserverIterator | allObserversBegin () |
| ObserverIterator | allObserversEnd () |
| GfxWindow (GfxWindow const &) | |
| Prohibited. | |
| GfxWindow & | operator= (GfxWindow const &) |
| Prohibited. | |
Private Attributes | |
| ObserverList | _observers |
Static Private Attributes | |
| ObserverList | _staticObservers |
Friends | |
| class | ObserverIterator |
Definition at line 45 of file gfxWindow.h.
1.2.14 written by Dimitri van Heesch,
© 1997-2002