#include <WindowManager.h>
Inheritance diagram for Teddy::PhysicalComponents::WindowManager:
Public Methods | |
WindowManager (View *view) | |
Constructor. More... | |
virtual | ~WindowManager () |
Destructor. More... | |
void | inputLoop () |
Never returning input loop forwarding host system messages to application. More... | |
void | mouseKey (const int button, const int state, const int x, const int y) |
MouseListener interface. More... | |
void | mouseMotion (const int x, const int y, const int dx, const int dy) |
void | insert (Layer *layer) |
Insert Layer to View. More... | |
void | setFocus (EventListener *focus) |
Set focus. More... | |
void | setHold (bool apply) |
bool | getHold () const |
void | showCursor () |
Show mouse cursor. More... | |
void | hideCursor () |
Hide mouse cursor. More... | |
void | draw () |
Draw layers. More... | |
void | update () |
Update all windows, after view resize etc. More... | |
View * | getView () |
Return View. More... | |
Protected Attributes | |
View * | view |
Graphics View. More... | |
EventListener * | focus |
Currently active Focus Area. More... | |
Texture * | cursor |
Mouse cursor. More... | |
SDL_Joystick * | joystick |
SDL Joystick. More... | |
list< Layer * > | layers |
Drawable Areas. More... | |
list< Area * > | focus_stack |
Focus stack. More... | |
bool | show_cursor |
Show mouse cursor? More... | |
bool | hold |
Hold cursor still. More... | |
int | mouse_b [4] |
Current mouse button states. More... | |
IntVector2 | hold_pos |
Cursor hold coordinates. More... | |
IntVector2 | mouse_pos |
Cursor coordinates (mouse). More... |
WindowManager encapsulates window management such as positioning and depth ordering of windows in customizable way.
Definition at line 61 of file WindowManager.h.
|
Constructor.
Definition at line 43 of file WindowManager.cpp. References cursor, Teddy::SysSupport::dmsg, Teddy::SysSupport::emsg, focus, hold, hold_pos, joystick, Teddy::SysSupport::M_INIT, Teddy::SysSupport::M_WME, mouse_b, mouse_pos, show_cursor, and view. |
|
Destructor.
Definition at line 122 of file WindowManager.cpp. References joystick. |
|
Draw layers.
Definition at line 404 of file WindowManager.cpp. References C_WHITE, cursor, layers, mouse_pos, show_cursor, and view. Referenced by Teddy::Graphics::View::display, and Teddy::Graphics::View::displayPs. |
|
Definition at line 460 of file WindowManager.cpp. References hold. |
|
Return View.
Definition at line 480 of file WindowManager.cpp. References view. |
|
Hide mouse cursor.
Definition at line 394 of file WindowManager.cpp. References show_cursor. |
|
Never returning input loop forwarding host system messages to application.
Definition at line 133 of file WindowManager.cpp. References Teddy::SysSupport::dmsg, Teddy::PhysicalComponents::EventListener::event, Teddy::SysSupport::fmsg, focus, Teddy::SysSupport::M_WME, mouseKey, mouseMotion, and view. |
|
Insert Layer to View.
Definition at line 378 of file WindowManager.cpp. References layers. |
|
MouseListener interface.
Definition at line 228 of file WindowManager.cpp. References Teddy::SysSupport::dmsg, Teddy::PhysicalComponents::EventListener::EventListener, focus, hold_pos, layers, Teddy::SysSupport::M_WME, mouse_b, setFocus, and setHold. Referenced by inputLoop. |
|
Definition at line 317 of file WindowManager.cpp. References Teddy::SysSupport::dmsg, focus, hold, hold_pos, IntVector2, Teddy::SysSupport::M_WME, mouse_b, and mouse_pos. Referenced by inputLoop. |
|
Set focus.
Definition at line 466 of file WindowManager.cpp. References focus. Referenced by mouseKey. |
|
Definition at line 437 of file WindowManager.cpp. References cursor, Teddy::SysSupport::dmsg, hold, hold_pos, Teddy::SysSupport::M_WME, and mouse_pos. Referenced by mouseKey. |
|
Show mouse cursor.
Definition at line 384 of file WindowManager.cpp. References show_cursor. |
|
Update all windows, after view resize etc.
Definition at line 427 of file WindowManager.cpp. Referenced by Teddy::Graphics::View::reshape. |
|
Mouse cursor.
Definition at line 82 of file WindowManager.h. Referenced by draw, setHold, and WindowManager. |
|
Currently active Focus Area.
Definition at line 81 of file WindowManager.h. Referenced by inputLoop, mouseKey, mouseMotion, setFocus, and WindowManager. |
|
Focus stack.
Definition at line 85 of file WindowManager.h. |
|
Hold cursor still.
Definition at line 87 of file WindowManager.h. Referenced by getHold, mouseMotion, setHold, and WindowManager. |
|
Cursor hold coordinates.
Definition at line 89 of file WindowManager.h. Referenced by mouseKey, mouseMotion, setHold, and WindowManager. |
|
SDL Joystick.
Definition at line 83 of file WindowManager.h. Referenced by WindowManager, and ~WindowManager. |
|
Drawable Areas.
Definition at line 84 of file WindowManager.h. |
|
Current mouse button states.
Definition at line 88 of file WindowManager.h. Referenced by mouseKey, mouseMotion, and WindowManager. |
|
Cursor coordinates (mouse).
Definition at line 90 of file WindowManager.h. Referenced by draw, mouseMotion, setHold, and WindowManager. |
|
Show mouse cursor?
Definition at line 86 of file WindowManager.h. Referenced by draw, hideCursor, showCursor, and WindowManager. |
|
Graphics View.
Definition at line 80 of file WindowManager.h. Referenced by draw, getView, inputLoop, update, and WindowManager. |