#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 () |
Event Manager manages all events related to FIFE
Definition at line 65 of file eventmanager.h.
FIFE::EventManager::EventManager | ( | ) |
Constructor.
Definition at line 41 of file eventmanager.cpp.
FIFE::EventManager::~EventManager | ( | ) | [virtual] |
Destructor
Definition at line 53 of file eventmanager.cpp.
void FIFE::EventManager::addCommandListener | ( | ICommandListener * | listener | ) | [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 66 of file eventmanager.cpp.
void FIFE::EventManager::addCommandListenerFront | ( | ICommandListener * | listener | ) | [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 70 of file eventmanager.cpp.
void FIFE::EventManager::addKeyListener | ( | IKeyListener * | listener | ) | [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 78 of file eventmanager.cpp.
void FIFE::EventManager::addKeyListenerFront | ( | IKeyListener * | listener | ) | [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 82 of file eventmanager.cpp.
void FIFE::EventManager::addMouseListener | ( | IMouseListener * | listener | ) | [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 90 of file eventmanager.cpp.
void FIFE::EventManager::addMouseListenerFront | ( | IMouseListener * | listener | ) | [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 94 of file eventmanager.cpp.
void FIFE::EventManager::addSdlEventListener | ( | ISdlEventListener * | listener | ) | [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 102 of file eventmanager.cpp.
void FIFE::EventManager::addSdlEventListenerFront | ( | ISdlEventListener * | listener | ) | [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 106 of file eventmanager.cpp.
void FIFE::EventManager::dispatchCommand | ( | Command & | command | ) | [virtual] |
Use this method to send command to command listeners
command | command to dispatch |
Implements FIFE::ICommandController.
Definition at line 114 of file eventmanager.cpp.
References FIFE::Command::isConsumed().
Referenced by processEvents().
EventSourceType FIFE::EventManager::getEventSourceType | ( | ) | [virtual] |
Gets the source type of this event
Implements FIFE::IEventSource.
Definition at line 533 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 346 of file eventmanager.cpp.
References dispatchCommand(), and FIFE::Command::setSource().
void FIFE::EventManager::removeCommandListener | ( | ICommandListener * | listener | ) | [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 74 of file eventmanager.cpp.
void FIFE::EventManager::removeKeyListener | ( | IKeyListener * | listener | ) | [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 86 of file eventmanager.cpp.
void FIFE::EventManager::removeMouseListener | ( | IMouseListener * | listener | ) | [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 98 of file eventmanager.cpp.
void FIFE::EventManager::removeSdlEventListener | ( | ISdlEventListener * | listener | ) | [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 110 of file eventmanager.cpp.