|
Public Member Functions |
| UserInterface () |
| Constructor.
|
| ~UserInterface () |
| Destructor.
|
void | AddWindow (UIBaseWindow *window) |
| Adds a window to the interface.
|
void | RemoveWindow (UIBaseWindow *window) |
| Removes a window from the interface.
|
void | FocusOn (UIBaseWindow *window) |
| Gives the focus to the window given as an argument (it must have already been added via AddWindow).
|
void | CloseWindow (UIBaseWindow *window) |
| Closes the window given as an argument. Note that this will effect just before next draw, and the window's memory will be freed by the user interface.
|
Protected Member Functions |
virtual void | OnDisplay () |
| Event called when the interface needs to be displayed (after rendering the scene). Override it if you want custom graphics for your window (and you probably will).
|
virtual bool | OnMouseButton (const MouseInformations *mouseInfo, MouseButton button, bool buttonDown) |
| This function is called when a mouse button is pressed or released inside the window's borders. When this happens, the user interface will check (in focus order) if one of the windows can handle the event. This is why the function must return a bool : once the interface has found a window that handles the click, it stops it search (so every window is not checked) and returns true. If no window handles the click, then the Window instance triggers an event (OnMouseButton) to its event manager (i.e. Application).
|
virtual bool | OnMouseMove (MouseInformations *mouseInfo) |
| This function is called when the mouse is moved inside the window's borders. When this happens, the user interface will check (in focus order) if one of the windows can handle the event. This is why the function must return a bool : once the interface has found a window that handles the move, it stops it search (so every window is not checked) and returns true. If no window handles the click, then the Window instance triggers an event (OnMouseButton) to its event manager (i.e. Application).
|
virtual void | OnResize (int width, int height) |
| This function is called each time the windows is resized, or the window is switched between fullscreen and windowed mode.
|
Protected Attributes |
int | m_Height |
| Current window's height and width (not including borders).
|
int | m_Width |
Private Attributes |
list< UIBaseWindow * > | m_Windows |
| List of windows the interface handles.
|
list< UIBaseWindow * > | m_RemoveWindows |
| List of windows the interface will have to destroy before next draw.
|
Friends |
class | Window |