FIFE
|
Base class for input events (like mouse and keyboard) More...
#include <ec_inputevent.h>
Public Member Functions | |
InputEvent () | |
Constructor. More... | |
~InputEvent () | |
Destructor. More... | |
virtual bool | isAltPressed () const |
Checks whether alt is pressed. More... | |
virtual void | setAltPressed (bool pressed) |
virtual bool | isControlPressed () const |
Checks whether control is pressed. More... | |
virtual void | setControlPressed (bool pressed) |
virtual bool | isMetaPressed () const |
Checks whether meta is pressed. More... | |
virtual void | setMetaPressed (bool pressed) |
virtual bool | isShiftPressed () const |
Checks whether shift is pressed. More... | |
virtual void | setShiftPressed (bool pressed) |
virtual void | consumedByWidgets () |
Marks events as consumed by widget library. More... | |
virtual bool | isConsumedByWidgets () const |
virtual void | consume () |
Marks the event as consumed. More... | |
virtual bool | isConsumed () const |
Checks if the event is consumed. More... | |
virtual IEventSource * | getSource () const |
Gets the source of the event. More... | |
virtual void | setSource (IEventSource *source) |
Sets the source of the event. More... | |
virtual int32_t | getTimeStamp () const |
Gets the timestamp of the event. More... | |
virtual void | setTimeStamp (int32_t timestamp) |
Sets the timestamp of the event. More... | |
virtual const std::string & | getName () const |
Gets the name of the event. More... | |
virtual std::string | getDebugString () const |
Gets the debugstring of the event. More... | |
virtual std::string | getAttrStr () const |
Gets attribute string of the event. More... | |
![]() | |
Event () | |
Constructor. More... | |
virtual | ~Event () |
Destructor. More... | |
Private Attributes | |
bool | m_consumedbywidgets |
bool | m_isshiftpressed |
bool | m_iscontrolpressed |
bool | m_isaltpressed |
bool | m_ismetapressed |
Base class for input events (like mouse and keyboard)
Definition at line 42 of file ec_inputevent.h.
|
inline |
Constructor.
Definition at line 46 of file ec_inputevent.h.
|
inline |
Destructor.
Definition at line 56 of file ec_inputevent.h.
|
inlinevirtual |
Marks the event as consumed.
Reimplemented from FIFE::Event.
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 83 of file ec_inputevent.h.
References FIFE::Event::consume().
Referenced by FIFE::KeyEvent::consume(), and FIFE::MouseEvent::consume().
|
inlinevirtual |
Marks events as consumed by widget library.
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 80 of file ec_inputevent.h.
References m_consumedbywidgets.
Referenced by FIFE::KeyEvent::consumedByWidgets(), and FIFE::MouseEvent::consumedByWidgets().
|
inlinevirtual |
Gets attribute string of the event.
Reimplemented from FIFE::Event.
Reimplemented in FIFE::MouseEvent.
Definition at line 96 of file ec_inputevent.h.
References FIFE::Event::getAttrStr(), m_isaltpressed, m_iscontrolpressed, m_ismetapressed, and m_isshiftpressed.
Referenced by FIFE::MouseEvent::getAttrStr().
|
inlinevirtual |
Gets the debugstring of the event.
Reimplemented from FIFE::Event.
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 94 of file ec_inputevent.h.
References FIFE::Event::getDebugString().
Referenced by FIFE::KeyEvent::getDebugString(), and FIFE::MouseEvent::getDebugString().
|
inlinevirtual |
Gets the name of the event.
Reimplemented from FIFE::Event.
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 90 of file ec_inputevent.h.
|
inlinevirtual |
Gets the source of the event.
Reimplemented from FIFE::Event.
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 85 of file ec_inputevent.h.
References FIFE::Event::getSource().
Referenced by FIFE::KeyEvent::getSource(), and FIFE::MouseEvent::getSource().
|
inlinevirtual |
Gets the timestamp of the event.
Reimplemented from FIFE::Event.
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 87 of file ec_inputevent.h.
References FIFE::Event::getTimeStamp().
Referenced by FIFE::KeyEvent::getTimeStamp(), and FIFE::MouseEvent::getTimeStamp().
|
inlinevirtual |
Checks whether alt is pressed.
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 60 of file ec_inputevent.h.
References m_isaltpressed.
Referenced by FIFE::KeyEvent::isAltPressed(), and FIFE::MouseEvent::isAltPressed().
|
inlinevirtual |
Checks if the event is consumed.
Reimplemented from FIFE::Event.
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 84 of file ec_inputevent.h.
References FIFE::Event::isConsumed().
Referenced by FIFE::KeyEvent::isConsumed(), and FIFE::MouseEvent::isConsumed().
|
inlinevirtual |
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 81 of file ec_inputevent.h.
References m_consumedbywidgets.
Referenced by FIFE::KeyEvent::isConsumedByWidgets(), and FIFE::MouseEvent::isConsumedByWidgets().
|
inlinevirtual |
Checks whether control is pressed.
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 65 of file ec_inputevent.h.
References m_iscontrolpressed.
Referenced by FIFE::KeyEvent::isControlPressed(), and FIFE::MouseEvent::isControlPressed().
|
inlinevirtual |
Checks whether meta is pressed.
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 70 of file ec_inputevent.h.
References m_ismetapressed.
Referenced by FIFE::KeyEvent::isMetaPressed(), and FIFE::MouseEvent::isMetaPressed().
|
inlinevirtual |
Checks whether shift is pressed.
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 75 of file ec_inputevent.h.
References m_isshiftpressed.
Referenced by FIFE::KeyEvent::isShiftPressed(), and FIFE::MouseEvent::isShiftPressed().
|
inlinevirtual |
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 61 of file ec_inputevent.h.
References m_isaltpressed.
Referenced by FIFE::EventManager::fillModifiers(), FIFE::KeyEvent::setAltPressed(), and FIFE::MouseEvent::setAltPressed().
|
inlinevirtual |
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 66 of file ec_inputevent.h.
References m_iscontrolpressed.
Referenced by FIFE::EventManager::fillModifiers(), FIFE::KeyEvent::setControlPressed(), and FIFE::MouseEvent::setControlPressed().
|
inlinevirtual |
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 71 of file ec_inputevent.h.
References m_ismetapressed.
Referenced by FIFE::EventManager::fillModifiers(), FIFE::KeyEvent::setMetaPressed(), and FIFE::MouseEvent::setMetaPressed().
|
inlinevirtual |
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 76 of file ec_inputevent.h.
References m_isshiftpressed.
Referenced by FIFE::EventManager::fillModifiers(), FIFE::KeyEvent::setShiftPressed(), and FIFE::MouseEvent::setShiftPressed().
|
inlinevirtual |
Sets the source of the event.
Reimplemented from FIFE::Event.
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 86 of file ec_inputevent.h.
References FIFE::Event::setSource().
Referenced by FIFE::KeyEvent::setSource(), and FIFE::MouseEvent::setSource().
|
inlinevirtual |
Sets the timestamp of the event.
Reimplemented from FIFE::Event.
Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.
Definition at line 88 of file ec_inputevent.h.
References FIFE::Event::setTimeStamp().
Referenced by FIFE::KeyEvent::setTimeStamp(), and FIFE::MouseEvent::setTimeStamp().
|
private |
Definition at line 108 of file ec_inputevent.h.
Referenced by consumedByWidgets(), and isConsumedByWidgets().
|
private |
Definition at line 111 of file ec_inputevent.h.
Referenced by getAttrStr(), isAltPressed(), and setAltPressed().
|
private |
Definition at line 110 of file ec_inputevent.h.
Referenced by getAttrStr(), isControlPressed(), and setControlPressed().
|
private |
Definition at line 112 of file ec_inputevent.h.
Referenced by getAttrStr(), isMetaPressed(), and setMetaPressed().
|
private |
Definition at line 109 of file ec_inputevent.h.
Referenced by getAttrStr(), isShiftPressed(), and setShiftPressed().