22 #ifndef FIFE_EVENTCHANNEL_EVENTMANAGER_H
23 #define FIFE_EVENTCHANNEL_EVENTMANAGER_H
58 class ICommandListener;
135 bool combineEvents(SDL_Event& event1,
const SDL_Event& event2);
void removeMouseListener(IMouseListener *listener)
Removes an added listener from the controller.
float getMouseSensitivity() const
Gets mouse sensitivity.
void addKeyListenerFront(IKeyListener *listener)
Adds a listener to the front of the listener deque Listener will be notified via the corresponding ev...
Controller provides a way to receive events from the system Using this interface, clients can subscri...
Controller provides a way to receive events from the system Using this interface, clients can subscri...
Controller provides a way to receive events from the system Using this interface, clients can subscri...
std::deque< IKeyListener * > m_pending_keylisteners
std::deque< IMouseListener * > m_pending_mouselisteners
std::deque< ISdlEventListener * > m_pending_sdleventlisteners_front
Controller provides a way to receive events from the system Using this interface, clients can subscri...
bool combineEvents(SDL_Event &event1, const SDL_Event &event2)
Listener of command events.
void addSdlEventListener(ISdlEventListener *listener)
Adds a listener to the back of the listener deque Listener will be notified via the corresponding eve...
void dispatchCommand(Command &command)
Use this method to send command to command listeners.
void addCommandListenerFront(ICommandListener *listener)
Adds a listener to the front of the listener deque Listener will be notified via the corresponding ev...
Listener of mouse events.
void setMouseAccelerationEnabled(bool acceleration)
Sets mouse acceleration if mouse acceleration is enabled, then the mouse sensitivity is used as speed...
std::deque< IKeyListener * > m_pending_kldeletions
void removeCommandListener(ICommandListener *listener)
Removes an added listener from the controller.
void dispatchMouseEvent(MouseEvent &evt)
std::deque< ISdlEventListener * > m_pending_sdleventlisteners
void addCommandListener(ICommandListener *listener)
Adds a listener to the back of the listener deque Listener will be notified via the corresponding eve...
std::deque< IKeyListener * > m_keylisteners
std::deque< ICommandListener * > m_pending_cldeletions
Class for commands Commands are arbitrary events e.g.
Controller provides a way to receive events from the system Using this interface, clients can subscri...
std::map< int32_t, bool > m_keystatemap
void fillMouseEvent(const SDL_Event &sdlevt, MouseEvent &mouseevt)
EventSourceType getEventSourceType()
Gets the source type of this event.
std::deque< IMouseListener * > m_pending_mouselisteners_front
void setKeyFilter(IKeyFilter *keyFilter)
std::deque< IMouseListener * > m_mouselisteners
void removeKeyListener(IKeyListener *listener)
Removes an added listener from the controller.
EventManager()
Constructor.
Event Manager manages all events related to FIFE.
void fillKeyEvent(const SDL_Event &sdlevt, KeyEvent &keyevt)
std::deque< IMouseListener * > m_pending_mldeletions
MouseButtonType
Mouse button types.
MouseEvent::MouseButtonType m_mostrecentbtn
std::deque< IKeyListener * > m_pending_keylisteners_front
bool isMouseAccelerationEnabled() const
Returns if mouse acceleration is enabled or not.
void addMouseListener(IMouseListener *listener)
Adds a listener to the back of the listener deque Listener will be notified via the corresponding eve...
std::deque< ISdlEventListener * > m_sdleventlisteners
void processKeyEvent(SDL_Event event)
virtual ~EventManager()
Destructor.
bool dispatchSdlEvent(SDL_Event &evt)
EventSourceType
Types for different event sources.
void processMouseEvent(SDL_Event event)
void fillModifiers(InputEvent &evt)
void addSdlEventListenerFront(ISdlEventListener *listener)
Adds a listener to the front of the listener deque Listener will be notified via the corresponding ev...
void setMouseSensitivity(float sensitivity)
Sets mouse sensitivity The sensitivity is limited to the range -0.99 - 10.0.
Representation of event source (a thing sending events)
std::deque< ICommandListener * > m_commandlisteners
void processEvents()
Process the SDL event queue.
void addMouseListenerFront(IMouseListener *listener)
Adds a listener to the front of the listener deque Listener will be notified via the corresponding ev...
std::deque< ICommandListener * > m_pending_commandlisteners_front
std::deque< ISdlEventListener * > m_pending_sdldeletions
std::deque< ICommandListener * > m_pending_commandlisteners
void addKeyListener(IKeyListener *listener)
Adds a listener to the back of the listener deque Listener will be notified via the corresponding eve...
void dispatchKeyEvent(KeyEvent &evt)
void processActiveEvent(SDL_Event event)
void removeSdlEventListener(ISdlEventListener *listener)
Removes an added listener from the controller.