FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
FIFE::InputEvent Class Reference

Base class for input events (like mouse and keyboard) More...

#include <inputevent.h>

+ Inheritance diagram for FIFE::InputEvent:
+ Collaboration diagram for FIFE::InputEvent:

Public Member Functions

 InputEvent ()
 Constructor. More...
 
 ~InputEvent ()
 Destructor. More...
 
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 consumedByWidgets ()
 Marks events as consumed by widget library. More...
 
virtual bool isConsumedByWidgets () const
 Checks whether event is consumed by widget library. More...
 
virtual void consume ()
 Marks events as consumed. More...
 
virtual bool isConsumed () const
 Checks whether event is consumed. 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...
 
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

bool m_consumedByWidgets
 
bool m_isShiftPressed
 
bool m_isControlPressed
 
bool m_isAltPressed
 
bool m_isMetaPressed
 

Detailed Description

Base class for input events (like mouse and keyboard)

Definition at line 42 of file inputevent.h.

Constructor & Destructor Documentation

◆ InputEvent()

FIFE::InputEvent::InputEvent ( )
inline

Constructor.

Definition at line 46 of file inputevent.h.

◆ ~InputEvent()

FIFE::InputEvent::~InputEvent ( )
inline

Destructor.

Definition at line 56 of file inputevent.h.

Member Function Documentation

◆ consume()

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

Marks events as consumed.

Reimplemented from FIFE::Event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::KeyEvent, FIFE::TextEvent, and FIFE::DropEvent.

Definition at line 100 of file inputevent.h.

References FIFE::Event::consume().

Referenced by FIFE::DropEvent::consume(), FIFE::TextEvent::consume(), FIFE::KeyEvent::consume(), FIFE::MouseEvent::consume(), and FIFE::JoystickEvent::consume().

+ Here is the caller graph for this function:

◆ consumedByWidgets()

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

◆ getAttrStr()

virtual std::string FIFE::InputEvent::getAttrStr ( ) const
inlinevirtual

Gets attribute string of the event.

Reimplemented from FIFE::Event.

Reimplemented in FIFE::MouseEvent.

Definition at line 135 of file inputevent.h.

References FIFE::Event::getAttrStr(), m_isAltPressed, m_isControlPressed, m_isMetaPressed, and m_isShiftPressed.

Referenced by FIFE::MouseEvent::getAttrStr().

+ Here is the caller graph for this function:

◆ getDebugString()

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

Gets the debugstring of the event.

Reimplemented from FIFE::Event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::DropEvent, FIFE::KeyEvent, and FIFE::TextEvent.

Definition at line 131 of file inputevent.h.

References FIFE::Event::getDebugString().

Referenced by FIFE::TextEvent::getDebugString(), FIFE::KeyEvent::getDebugString(), FIFE::DropEvent::getDebugString(), FIFE::MouseEvent::getDebugString(), and FIFE::JoystickEvent::getDebugString().

+ Here is the caller graph for this function:

◆ getName()

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

Gets the name of the event.

Reimplemented from FIFE::Event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::DropEvent, FIFE::KeyEvent, and FIFE::TextEvent.

Definition at line 124 of file inputevent.h.

◆ getSource()

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

Gets the source of the event.

Reimplemented from FIFE::Event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::KeyEvent, FIFE::DropEvent, and FIFE::TextEvent.

Definition at line 108 of file inputevent.h.

References FIFE::Event::getSource().

Referenced by FIFE::TextEvent::getSource(), FIFE::DropEvent::getSource(), FIFE::KeyEvent::getSource(), FIFE::MouseEvent::getSource(), and FIFE::JoystickEvent::getSource().

+ Here is the caller graph for this function:

◆ getTimeStamp()

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

Gets the timestamp of the event.

Reimplemented from FIFE::Event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::DropEvent, FIFE::KeyEvent, and FIFE::TextEvent.

Definition at line 116 of file inputevent.h.

References FIFE::Event::getTimeStamp().

Referenced by FIFE::TextEvent::getTimeStamp(), FIFE::KeyEvent::getTimeStamp(), FIFE::DropEvent::getTimeStamp(), FIFE::MouseEvent::getTimeStamp(), and FIFE::JoystickEvent::getTimeStamp().

+ Here is the caller graph for this function:

◆ isAltPressed()

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

Checks whether alt is pressed.

Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.

Definition at line 60 of file inputevent.h.

References m_isAltPressed.

Referenced by FIFE::KeyEvent::isAltPressed(), and FIFE::MouseEvent::isAltPressed().

+ Here is the caller graph for this function:

◆ isConsumed()

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

Checks whether event is consumed.

Reimplemented from FIFE::Event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::KeyEvent, FIFE::TextEvent, and FIFE::DropEvent.

Definition at line 104 of file inputevent.h.

References FIFE::Event::isConsumed().

Referenced by FIFE::DropEvent::isConsumed(), FIFE::TextEvent::isConsumed(), FIFE::KeyEvent::isConsumed(), FIFE::MouseEvent::isConsumed(), and FIFE::JoystickEvent::isConsumed().

+ Here is the caller graph for this function:

◆ isConsumedByWidgets()

virtual bool FIFE::InputEvent::isConsumedByWidgets ( ) const
inlinevirtual

◆ isControlPressed()

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

Checks whether control is pressed.

Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.

Definition at line 68 of file inputevent.h.

References m_isControlPressed.

Referenced by FIFE::KeyEvent::isControlPressed(), and FIFE::MouseEvent::isControlPressed().

+ Here is the caller graph for this function:

◆ isMetaPressed()

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

Checks whether meta is pressed.

Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.

Definition at line 76 of file inputevent.h.

References m_isMetaPressed.

Referenced by FIFE::KeyEvent::isMetaPressed(), and FIFE::MouseEvent::isMetaPressed().

+ Here is the caller graph for this function:

◆ isShiftPressed()

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

Checks whether shift is pressed.

Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.

Definition at line 84 of file inputevent.h.

References m_isShiftPressed.

Referenced by FIFE::KeyEvent::isShiftPressed(), and FIFE::MouseEvent::isShiftPressed().

+ Here is the caller graph for this function:

◆ setAltPressed()

virtual void FIFE::InputEvent::setAltPressed ( bool  pressed)
inlinevirtual

Sets alt to pressed.

Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.

Definition at line 64 of file inputevent.h.

References m_isAltPressed.

Referenced by FIFE::EventManager::fillModifiers(), FIFE::KeyEvent::setAltPressed(), and FIFE::MouseEvent::setAltPressed().

+ Here is the caller graph for this function:

◆ setControlPressed()

virtual void FIFE::InputEvent::setControlPressed ( bool  pressed)
inlinevirtual

Sets control to pressed.

Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.

Definition at line 72 of file inputevent.h.

References m_isControlPressed.

Referenced by FIFE::EventManager::fillModifiers(), FIFE::KeyEvent::setControlPressed(), and FIFE::MouseEvent::setControlPressed().

+ Here is the caller graph for this function:

◆ setMetaPressed()

virtual void FIFE::InputEvent::setMetaPressed ( bool  pressed)
inlinevirtual

Sets meta to pressed.

Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.

Definition at line 80 of file inputevent.h.

References m_isMetaPressed.

Referenced by FIFE::KeyEvent::setMetaPressed(), and FIFE::MouseEvent::setMetaPressed().

+ Here is the caller graph for this function:

◆ setShiftPressed()

virtual void FIFE::InputEvent::setShiftPressed ( bool  pressed)
inlinevirtual

Sets shift to pressed.

Reimplemented in FIFE::MouseEvent, and FIFE::KeyEvent.

Definition at line 88 of file inputevent.h.

References m_isShiftPressed.

Referenced by FIFE::EventManager::fillModifiers(), FIFE::KeyEvent::setShiftPressed(), and FIFE::MouseEvent::setShiftPressed().

+ Here is the caller graph for this function:

◆ setSource()

virtual void FIFE::InputEvent::setSource ( IEventSource source)
inlinevirtual

Sets the source of the event.

Reimplemented from FIFE::Event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::KeyEvent, FIFE::DropEvent, and FIFE::TextEvent.

Definition at line 112 of file inputevent.h.

References FIFE::Event::setSource().

Referenced by FIFE::TextEvent::setSource(), FIFE::DropEvent::setSource(), FIFE::KeyEvent::setSource(), FIFE::MouseEvent::setSource(), and FIFE::JoystickEvent::setSource().

+ Here is the caller graph for this function:

◆ setTimeStamp()

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

Sets the timestamp of the event.

Reimplemented from FIFE::Event.

Reimplemented in FIFE::JoystickEvent, FIFE::MouseEvent, FIFE::DropEvent, FIFE::KeyEvent, and FIFE::TextEvent.

Definition at line 120 of file inputevent.h.

References FIFE::Event::setTimeStamp().

Referenced by FIFE::TextEvent::setTimeStamp(), FIFE::KeyEvent::setTimeStamp(), FIFE::DropEvent::setTimeStamp(), FIFE::MouseEvent::setTimeStamp(), and FIFE::JoystickEvent::setTimeStamp().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_consumedByWidgets

bool FIFE::InputEvent::m_consumedByWidgets
private

Definition at line 147 of file inputevent.h.

Referenced by consumedByWidgets(), and isConsumedByWidgets().

◆ m_isAltPressed

bool FIFE::InputEvent::m_isAltPressed
private

Definition at line 150 of file inputevent.h.

Referenced by getAttrStr(), isAltPressed(), and setAltPressed().

◆ m_isControlPressed

bool FIFE::InputEvent::m_isControlPressed
private

Definition at line 149 of file inputevent.h.

Referenced by getAttrStr(), isControlPressed(), and setControlPressed().

◆ m_isMetaPressed

bool FIFE::InputEvent::m_isMetaPressed
private

Definition at line 151 of file inputevent.h.

Referenced by getAttrStr(), isMetaPressed(), and setMetaPressed().

◆ m_isShiftPressed

bool FIFE::InputEvent::m_isShiftPressed
private

Definition at line 148 of file inputevent.h.

Referenced by getAttrStr(), isShiftPressed(), and setShiftPressed().


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