FIFE
be64c707dea6b3250bd4355bf5c825d25920087d
|
Class for key events. More...
#include <keyevent.h>
Public Types | |
enum | KeyEventType { UNKNOWN = -1, PRESSED = 0, RELEASED } |
Public Member Functions | |
KeyEvent () | |
Constructor. More... | |
virtual | ~KeyEvent () |
Destructor. More... | |
KeyEventType | getType () const |
void | setType (KeyEventType type) |
bool | isNumericPad () const |
void | setNumericPad (bool ispad) |
const Key & | getKey () const |
void | setKey (const Key &key) |
virtual bool | isAltPressed () const |
Checks whether alt is pressed. More... | |
virtual void | setAltPressed (bool pressed) |
Sets alt to pressed. More... | |
virtual bool | isControlPressed () const |
Checks whether control is pressed. More... | |
virtual void | setControlPressed (bool pressed) |
Sets control to pressed. More... | |
virtual bool | isMetaPressed () const |
Checks whether meta is pressed. More... | |
virtual void | setMetaPressed (bool pressed) |
Sets meta to pressed. More... | |
virtual bool | isShiftPressed () const |
Checks whether shift is pressed. More... | |
virtual void | setShiftPressed (bool pressed) |
Sets shift to pressed. More... | |
virtual void | consume () |
Marks events as consumed. More... | |
virtual bool | isConsumed () const |
Checks whether event is consumed. More... | |
virtual void | consumedByWidgets () |
Marks events as consumed by widget library. More... | |
virtual bool | isConsumedByWidgets () const |
Checks whether event is consumed by widget library. 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... | |
Public Member Functions inherited from FIFE::InputEvent | |
InputEvent () | |
Constructor. More... | |
~InputEvent () | |
Destructor. More... | |
virtual std::string | getAttrStr () const |
Gets attribute string of the event. More... | |
Public Member Functions inherited from FIFE::Event | |
Event () | |
Constructor. More... | |
virtual | ~Event () |
Destructor. More... | |
Private Attributes | |
KeyEventType | m_eventType |
bool | m_isNumericPad |
Key | m_key |
Class for key events.
Definition at line 45 of file keyevent.h.
Enumerator | |
---|---|
UNKNOWN | |
PRESSED | |
RELEASED |
Definition at line 47 of file keyevent.h.
|
inline |
Constructor.
Definition at line 55 of file keyevent.h.
|
inlinevirtual |
Destructor.
Definition at line 63 of file keyevent.h.
|
inlinevirtual |
Marks events as consumed.
Reimplemented from FIFE::InputEvent.
Definition at line 83 of file keyevent.h.
References FIFE::InputEvent::consume().
|
inlinevirtual |
Marks events as consumed by widget library.
Reimplemented from FIFE::InputEvent.
Definition at line 85 of file keyevent.h.
References FIFE::InputEvent::consumedByWidgets().
Referenced by FIFE::EventManager::processKeyEvent().
|
inlinevirtual |
Gets the debugstring of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 96 of file keyevent.h.
References FIFE::InputEvent::getDebugString().
|
inline |
Definition at line 71 of file keyevent.h.
References m_key.
Referenced by FIFE::EventManager::processKeyEvent().
|
inlinevirtual |
Gets the name of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 92 of file keyevent.h.
|
inlinevirtual |
Gets the source of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 87 of file keyevent.h.
References FIFE::InputEvent::getSource().
|
inlinevirtual |
Gets the timestamp of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 89 of file keyevent.h.
References FIFE::InputEvent::getTimeStamp().
|
inline |
Definition at line 65 of file keyevent.h.
References m_eventType.
Referenced by FIFE::EventManager::dispatchKeyEvent(), and FIFE::EventManager::processKeyEvent().
|
inlinevirtual |
Checks whether alt is pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 74 of file keyevent.h.
References FIFE::InputEvent::isAltPressed().
|
inlinevirtual |
Checks whether event is consumed.
Reimplemented from FIFE::InputEvent.
Definition at line 84 of file keyevent.h.
References FIFE::InputEvent::isConsumed().
Referenced by FIFE::EventManager::dispatchKeyEvent().
|
inlinevirtual |
Checks whether event is consumed by widget library.
Reimplemented from FIFE::InputEvent.
Definition at line 86 of file keyevent.h.
References FIFE::InputEvent::isConsumedByWidgets().
Referenced by FIFE::EventManager::dispatchKeyEvent().
|
inlinevirtual |
Checks whether control is pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 76 of file keyevent.h.
References FIFE::InputEvent::isControlPressed().
|
inlinevirtual |
Checks whether meta is pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 78 of file keyevent.h.
References FIFE::InputEvent::isMetaPressed().
|
inline |
Definition at line 68 of file keyevent.h.
References m_isNumericPad.
|
inlinevirtual |
Checks whether shift is pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 80 of file keyevent.h.
References FIFE::InputEvent::isShiftPressed().
|
inlinevirtual |
Sets alt to pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 75 of file keyevent.h.
References FIFE::InputEvent::setAltPressed().
Referenced by FIFE::EventManager::fillKeyEvent(), and FIFE::FifechanManager::translateKeyEvent().
|
inlinevirtual |
Sets control to pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 77 of file keyevent.h.
References FIFE::InputEvent::setControlPressed().
Referenced by FIFE::EventManager::fillKeyEvent(), and FIFE::FifechanManager::translateKeyEvent().
|
inline |
Definition at line 72 of file keyevent.h.
References m_key.
Referenced by FIFE::EventManager::fillKeyEvent(), and FIFE::FifechanManager::translateKeyEvent().
|
inlinevirtual |
Sets meta to pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 79 of file keyevent.h.
References FIFE::InputEvent::setMetaPressed().
Referenced by FIFE::EventManager::fillKeyEvent(), and FIFE::FifechanManager::translateKeyEvent().
|
inline |
Definition at line 69 of file keyevent.h.
References m_isNumericPad.
Referenced by FIFE::EventManager::fillKeyEvent(), and FIFE::FifechanManager::translateKeyEvent().
|
inlinevirtual |
Sets shift to pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 81 of file keyevent.h.
References FIFE::InputEvent::setShiftPressed().
Referenced by FIFE::EventManager::fillKeyEvent(), and FIFE::FifechanManager::translateKeyEvent().
|
inlinevirtual |
Sets the source of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 88 of file keyevent.h.
References FIFE::InputEvent::setSource().
Referenced by FIFE::EventManager::processKeyEvent().
|
inlinevirtual |
Sets the timestamp of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 90 of file keyevent.h.
References FIFE::InputEvent::setTimeStamp().
|
inline |
Definition at line 66 of file keyevent.h.
References m_eventType.
Referenced by FIFE::EventManager::fillKeyEvent(), and FIFE::FifechanManager::translateKeyEvent().
|
private |
Definition at line 99 of file keyevent.h.
|
private |
Definition at line 100 of file keyevent.h.
Referenced by isNumericPad(), and setNumericPad().
|
private |
Definition at line 101 of file keyevent.h.