FIFE
2008.0
|
#include <eventmanager.h>
Public Member Functions | |
EventManager () | |
virtual | ~EventManager () |
void | addCommandListener (ICommandListener *listener) |
void | addCommandListenerFront (ICommandListener *listener) |
void | removeCommandListener (ICommandListener *listener) |
void | dispatchCommand (Command &command) |
void | addKeyListener (IKeyListener *listener) |
void | addKeyListenerFront (IKeyListener *listener) |
void | removeKeyListener (IKeyListener *listener) |
void | addMouseListener (IMouseListener *listener) |
void | addMouseListenerFront (IMouseListener *listener) |
void | removeMouseListener (IMouseListener *listener) |
void | addSdlEventListener (ISdlEventListener *listener) |
void | addSdlEventListenerFront (ISdlEventListener *listener) |
void | removeSdlEventListener (ISdlEventListener *listener) |
EventSourceType | getEventSourceType () |
void | processEvents () |
void | setMouseSensitivity (float sensitivity) |
float | getMouseSensitivity () const |
void | setMouseAcceleration (bool acceleration) |
bool | getMouseAcceleration () const |
Event Manager manages all events related to FIFE
Definition at line 66 of file eventmanager.h.
FIFE::EventManager::EventManager | ( | ) |
Constructor.
Definition at line 46 of file eventmanager.cpp.
|
virtual |
Destructor
Definition at line 65 of file eventmanager.cpp.
|
virtual |
Adds a listener to the back of the listener deque Listener will be notified via the corresponding events
listener | listener to add |
Implements FIFE::ICommandController.
Definition at line 78 of file eventmanager.cpp.
|
virtual |
Adds a listener to the front of the listener deque Listener will be notified via the corresponding events
listener | listener to add |
Implements FIFE::ICommandController.
Definition at line 82 of file eventmanager.cpp.
|
virtual |
Adds a listener to the back of the listener deque Listener will be notified via the corresponding events
listener | listener to add |
Implements FIFE::IKeyController.
Definition at line 90 of file eventmanager.cpp.
|
virtual |
Adds a listener to the front of the listener deque Listener will be notified via the corresponding events
listener | listener to add |
Implements FIFE::IKeyController.
Definition at line 94 of file eventmanager.cpp.
|
virtual |
Adds a listener to the back of the listener deque Listener will be notified via the corresponding events
listener | listener to add |
Implements FIFE::IMouseController.
Definition at line 102 of file eventmanager.cpp.
|
virtual |
Adds a listener to the front of the listener deque Listener will be notified via the corresponding events
listener | listener to add |
Implements FIFE::IMouseController.
Definition at line 106 of file eventmanager.cpp.
|
virtual |
Adds a listener to the back of the listener deque Listener will be notified via the corresponding events
listener | listener to add |
Implements FIFE::ISdlEventController.
Definition at line 114 of file eventmanager.cpp.
|
virtual |
Adds a listener to the front of the listener deque Listener will be notified via the corresponding events
listener | listener to add |
Implements FIFE::ISdlEventController.
Definition at line 118 of file eventmanager.cpp.
|
virtual |
Use this method to send command to command listeners
command | command to dispatch |
Implements FIFE::ICommandController.
Definition at line 126 of file eventmanager.cpp.
References FIFE::Command::isConsumed().
Referenced by processEvents().
|
virtual |
Gets the source type of this event
Implements FIFE::IEventSource.
Definition at line 625 of file eventmanager.cpp.
bool FIFE::EventManager::getMouseAcceleration | ( | ) | const |
Gets mouse acceleration
Definition at line 650 of file eventmanager.cpp.
float FIFE::EventManager::getMouseSensitivity | ( | ) | const |
Gets mouse sensitivity
Definition at line 642 of file eventmanager.cpp.
void FIFE::EventManager::processEvents | ( | ) |
Process the SDL event queue. This is to be called only by the engine itself once per frame. It passes appropriate events to their listeners
Definition at line 358 of file eventmanager.cpp.
References dispatchCommand(), and FIFE::Command::setSource().
Referenced by FIFE::Engine::initializePumping(), and FIFE::Engine::pump().
|
virtual |
Removes an added listener from the controller. Listener will not be notified anymore via the corresponding events
listener | listener to remove |
Implements FIFE::ICommandController.
Definition at line 86 of file eventmanager.cpp.
|
virtual |
Removes an added listener from the controller. Listener will not be notified anymore via the corresponding events
listener | listener to remove |
Implements FIFE::IKeyController.
Definition at line 98 of file eventmanager.cpp.
|
virtual |
Removes an added listener from the controller. Listener will not be notified anymore via the corresponding events
listener | listener to remove |
Implements FIFE::IMouseController.
Definition at line 110 of file eventmanager.cpp.
|
virtual |
Removes an added listener from the controller. Listener will not be notified anymore via the corresponding events
listener | listener to remove |
Implements FIFE::ISdlEventController.
Definition at line 122 of file eventmanager.cpp.
void FIFE::EventManager::setMouseAcceleration | ( | bool | acceleration | ) |
Sets mouse acceleration if mouse acceleration is enabled, then the mouse sensitivity is used as speed max.
Definition at line 646 of file eventmanager.cpp.
Referenced by FIFE::Engine::init().
void FIFE::EventManager::setMouseSensitivity | ( | float | sensitivity | ) |
Sets mouse sensitivity The sensitivity is limited to the range -0.99 - 10.0.
Definition at line 633 of file eventmanager.cpp.
Referenced by FIFE::Engine::init().