FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::KeyEvent Class Reference

Class for key events. More...

#include <keyevent.h>

+ Inheritance diagram for FIFE::KeyEvent:
+ Collaboration diagram for FIFE::KeyEvent:

Public Types

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 KeygetKey () 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 IEventSourcegetSource () 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
 

Detailed Description

Class for key events.

Definition at line 45 of file keyevent.h.

Member Enumeration Documentation

Enumerator
UNKNOWN 
PRESSED 
RELEASED 

Definition at line 47 of file keyevent.h.

Constructor & Destructor Documentation

FIFE::KeyEvent::KeyEvent ( )
inline

Constructor.

Definition at line 55 of file keyevent.h.

virtual FIFE::KeyEvent::~KeyEvent ( )
inlinevirtual

Destructor.

Definition at line 63 of file keyevent.h.

Member Function Documentation

virtual void FIFE::KeyEvent::consume ( )
inlinevirtual

Marks events as consumed.

Reimplemented from FIFE::InputEvent.

Definition at line 83 of file keyevent.h.

References FIFE::InputEvent::consume().

virtual void FIFE::KeyEvent::consumedByWidgets ( )
inlinevirtual

Marks events as consumed by widget library.

Reimplemented from FIFE::InputEvent.

Definition at line 85 of file keyevent.h.

References FIFE::InputEvent::consumedByWidgets().

virtual std::string FIFE::KeyEvent::getDebugString ( ) const
inlinevirtual

Gets the debugstring of the event.

Reimplemented from FIFE::InputEvent.

Definition at line 96 of file keyevent.h.

References FIFE::InputEvent::getDebugString().

const Key& FIFE::KeyEvent::getKey ( ) const
inline

Definition at line 71 of file keyevent.h.

References m_key.

Referenced by FIFE::EventManager::processKeyEvent().

+ Here is the caller graph for this function:

virtual const std::string& FIFE::KeyEvent::getName ( ) const
inlinevirtual

Gets the name of the event.

Reimplemented from FIFE::InputEvent.

Definition at line 92 of file keyevent.h.

virtual IEventSource* FIFE::KeyEvent::getSource ( ) const
inlinevirtual

Gets the source of the event.

Reimplemented from FIFE::InputEvent.

Definition at line 87 of file keyevent.h.

References FIFE::InputEvent::getSource().

virtual int32_t FIFE::KeyEvent::getTimeStamp ( ) const
inlinevirtual

Gets the timestamp of the event.

Reimplemented from FIFE::InputEvent.

Definition at line 89 of file keyevent.h.

References FIFE::InputEvent::getTimeStamp().

KeyEventType FIFE::KeyEvent::getType ( ) const
inline

Definition at line 65 of file keyevent.h.

References m_eventType.

Referenced by FIFE::EventManager::dispatchKeyEvent(), and FIFE::EventManager::processKeyEvent().

+ Here is the caller graph for this function:

virtual bool FIFE::KeyEvent::isAltPressed ( ) const
inlinevirtual

Checks whether alt is pressed.

Reimplemented from FIFE::InputEvent.

Definition at line 74 of file keyevent.h.

References FIFE::InputEvent::isAltPressed().

virtual bool FIFE::KeyEvent::isConsumed ( ) const
inlinevirtual

Checks whether event is consumed.

Reimplemented from FIFE::InputEvent.

Definition at line 84 of file keyevent.h.

References FIFE::InputEvent::isConsumed().

virtual bool FIFE::KeyEvent::isConsumedByWidgets ( ) const
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().

virtual bool FIFE::KeyEvent::isControlPressed ( ) const
inlinevirtual

Checks whether control is pressed.

Reimplemented from FIFE::InputEvent.

Definition at line 76 of file keyevent.h.

References FIFE::InputEvent::isControlPressed().

virtual bool FIFE::KeyEvent::isMetaPressed ( ) const
inlinevirtual

Checks whether meta is pressed.

Reimplemented from FIFE::InputEvent.

Definition at line 78 of file keyevent.h.

References FIFE::InputEvent::isMetaPressed().

bool FIFE::KeyEvent::isNumericPad ( ) const
inline

Definition at line 68 of file keyevent.h.

References m_isNumericPad.

virtual bool FIFE::KeyEvent::isShiftPressed ( ) const
inlinevirtual

Checks whether shift is pressed.

Reimplemented from FIFE::InputEvent.

Definition at line 80 of file keyevent.h.

References FIFE::InputEvent::isShiftPressed().

virtual void FIFE::KeyEvent::setAltPressed ( bool  pressed)
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().

+ Here is the caller graph for this function:

virtual void FIFE::KeyEvent::setControlPressed ( bool  pressed)
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().

+ Here is the caller graph for this function:

void FIFE::KeyEvent::setKey ( const Key key)
inline

Definition at line 72 of file keyevent.h.

References m_key.

Referenced by FIFE::EventManager::fillKeyEvent(), and FIFE::FifechanManager::translateKeyEvent().

+ Here is the caller graph for this function:

virtual void FIFE::KeyEvent::setMetaPressed ( bool  pressed)
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().

+ Here is the caller graph for this function:

void FIFE::KeyEvent::setNumericPad ( bool  ispad)
inline

Definition at line 69 of file keyevent.h.

References m_isNumericPad.

Referenced by FIFE::EventManager::fillKeyEvent(), and FIFE::FifechanManager::translateKeyEvent().

+ Here is the caller graph for this function:

virtual void FIFE::KeyEvent::setShiftPressed ( bool  pressed)
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().

+ Here is the caller graph for this function:

virtual void FIFE::KeyEvent::setSource ( IEventSource source)
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().

+ Here is the caller graph for this function:

virtual void FIFE::KeyEvent::setTimeStamp ( int32_t  timestamp)
inlinevirtual

Sets the timestamp of the event.

Reimplemented from FIFE::InputEvent.

Definition at line 90 of file keyevent.h.

References FIFE::InputEvent::setTimeStamp().

void FIFE::KeyEvent::setType ( KeyEventType  type)
inline

Definition at line 66 of file keyevent.h.

References m_eventType.

Referenced by FIFE::EventManager::fillKeyEvent(), and FIFE::FifechanManager::translateKeyEvent().

+ Here is the caller graph for this function:

Member Data Documentation

KeyEventType FIFE::KeyEvent::m_eventType
private

Definition at line 99 of file keyevent.h.

Referenced by getType(), and setType().

bool FIFE::KeyEvent::m_isNumericPad
private

Definition at line 100 of file keyevent.h.

Referenced by isNumericPad(), and setNumericPad().

Key FIFE::KeyEvent::m_key
private

Definition at line 101 of file keyevent.h.

Referenced by getKey(), and setKey().


The documentation for this class was generated from the following file: