
The manager processes events from the main loop and dispatches them to the engine subsystems and the application. Raw events are mapped to higher level CommandEvent s for that purpose. The Command association may be changed through the manager's input map.
Public Types | |
| typedef ControlListener * | LPtr |
Public Member Functions | |
| void | addControlListener (const LPtr &l) |
| bool | appIgnoresStationary () const |
| bool | appIgnoresUndefined () const |
| void | dispatchKeyEvent (const SDL_KeyboardEvent &evt) |
| void | dispatchMouseEvent (const int &x, const int &y, const int &rx, const int &ry, const unsigned int &b, SDLMod m=KMOD_NONE) |
| void | dispatchMouseEvent (const SDL_MouseButtonEvent &evt, SDLMod m=KMOD_NONE) |
| EventDispatcher () | |
| void | fireEvent (ControlEvent &e) const |
| notifies all registered listeners | |
| InputMap * | getInputMap () |
| bool | guiIgnoresStationary () const |
| bool | isAppActive () const |
| bool | isGuiActive () const |
| bool | isMuted () const |
| reflects this dispatcher's muted state. | |
| void | removeControlListener (const LPtr &l) |
| void | setAppActive (bool muted) |
| void | setAppIgnoresStationary (bool ignore) |
| void | setAppIgnoresUndefined (bool ignore) |
| void | setGuiActive (bool muted) |
| void | setGuiIgnoresStationary (bool ignore) |
| void | setMuted (bool mute) |
| mutes or un-mutes the dispatcher | |
Static Public Member Functions | |
| static void | destroyInstance () |
| may be used to manually destroy the singleton instance | |
| static InputManager * | getInstance () |
| accesses the singleton instance | |
| static bool | isActive () |
| checks if the singleton is active | |
| static bool | isDestroyed () |
| checks if the singleton is destroyed | |
| static bool | isVirgin () |
| checks if the singleton has not been initialized | |
| static void | setPriority (unsigned short) |
| sets this singleton's shutdown priority | |
Static Public Attributes | |
| static const Command | TOGGLE_CONSOLE |
Protected Member Functions | |
| void | add (const LPtr &l) |
| registers a listener | |
| void | remove (const LPtr &l) |
| de-registers a listener. | |
| Singleton () | |
Static Protected Member Functions | |
| static void | destroyedError () |
| static void | initInstance () |
|
|
|
|
|
registers a listener
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
may be used to manually destroy the singleton instance If this function is not called, the instance is destroyed automatically during shutdown. |
|
|
|
|
||||||||||||||||||||||||||||
|
|
|
||||||||||||
|
|
|
|
|
|
|
notifies all registered listeners
The listeners are called in the order in which they were added.
|
|
|
|
|
|
accesses the singleton instance The exact operation executed by calling this function is determined by the singleton policies.
|
|
|
|
|
|
|
|
|
checks if the singleton is active
|
|
|
|
|
|
checks if the singleton is destroyed
This function returns
|
|
|
|
|
|
reflects this dispatcher's muted state.
|
|
|
checks if the singleton has not been initialized A singleton is not initialized if no instance exists and no instance has been destroyed.
|
|
|
de-registers a listener.
This listener will no longer notify
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mutes or un-mutes the dispatcher Muted dispatchers no longer notify their listeners. |
|
|
sets this singleton's shutdown priority The higher the priority, the earlier the instance will be destroyed during shutdown. If the priority is changed, the highest given priority will be used. |
|
|
|
|
|
|
1.4.3