CarnegieMellonGraphics2
Class WindowManager
in CarnegieMellonGraphics.h
- class WindowManager
The WindowManager class is used when operating the library in an event driven
mode. For this to do anything useful, you must first derive your own Window
class that overloads some of the eventhandlers. After that, all you
need to do is call WindowManager::handleEvents() somewhere in your code, and
it will begin event handling for you. To exit out of the handler, simply
call WindowManager::exitHandler() somewhere inside your derived Window class.
The event handler will clear our input filters on a window when started,
but will return them to their original state upon exiting.
WindowManager also encapsulates some simple timing commands.
Method Summary |
static void |
exitHandler()
Called inside the event loop to exit the handle |
static unsigned long |
getTime()
Return the number of "ticks" that have ellapsed since the
program was started. |
static void |
handleEvents()
Called to begin event handling |
WindowManager
private WindowManager();
exitHandler
public static void exitHandler();
- Called inside the event loop to exit the handle
getTime
public static unsigned long getTime();
- Return the number of "ticks" that have ellapsed since the
program was started. A "tick" is usually a microsecond (as it
depends on the platfrom the library was compiled).
This number will probably wrap around after about half an hour.
handleEvents
public static void handleEvents();
- Called to begin event handling