FIFE  2008.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
FIFE::MouseEvent Class Reference

#include <ec_mouseevent.h>

Inheritance diagram for FIFE::MouseEvent:
Inheritance graph
Collaboration diagram for FIFE::MouseEvent:
Collaboration graph

Public Types

enum  MouseEventType
enum  MouseButtonType

Public Member Functions

 MouseEvent ()
virtual ~MouseEvent ()
MouseButtonType getButton () const
MouseEventType getType () const
int32_t getX () const
int32_t getY () const
virtual bool isAltPressed () const
virtual bool isControlPressed () const
virtual bool isMetaPressed () const
virtual bool isShiftPressed () const
virtual void consume ()
virtual bool isConsumed () const
virtual void consumedByWidgets ()
virtual void setSource (IEventSource *source)
virtual int32_t getTimeStamp () const
virtual void setTimeStamp (int32_t timestamp)
virtual const std::string & getName () const
virtual std::string getDebugString () const
virtual std::string getAttrStr () const
- Public Member Functions inherited from FIFE::InputEvent
 InputEvent ()
 ~InputEvent ()
- Public Member Functions inherited from FIFE::Event
 Event ()
virtual ~Event ()
virtual IEventSourcegetSource () const

Static Public Member Functions

static std::string mouseEventType2str (MouseEventType t)
static std::string mouseButtonType2str (MouseButtonType t)

Detailed Description

Class for mouse events

Definition at line 42 of file ec_mouseevent.h.

Member Enumeration Documentation

Mouse button types.

Definition at line 64 of file ec_mouseevent.h.

Mouse event types.

Definition at line 47 of file ec_mouseevent.h.

Constructor & Destructor Documentation

FIFE::MouseEvent::MouseEvent ( )
inline

Constructor.

Definition at line 76 of file ec_mouseevent.h.

virtual FIFE::MouseEvent::~MouseEvent ( )
inlinevirtual

Destructor.

Definition at line 85 of file ec_mouseevent.h.

Member Function Documentation

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

Marks the event as consumed.

Reimplemented from FIFE::InputEvent.

Definition at line 126 of file ec_mouseevent.h.

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

Marks events as consumed by widget library.

Reimplemented from FIFE::InputEvent.

Definition at line 128 of file ec_mouseevent.h.

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

Gets attribute string of the event

Reimplemented from FIFE::InputEvent.

Definition at line 140 of file ec_mouseevent.h.

References mouseButtonType2str(), and mouseEventType2str().

MouseButtonType FIFE::MouseEvent::getButton ( ) const
inline

Gets the button of the mouse event.

Returns
the button of the mouse event.

Definition at line 91 of file ec_mouseevent.h.

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

Gets the debugstring of the event

Reimplemented from FIFE::InputEvent.

Definition at line 139 of file ec_mouseevent.h.

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

Gets the name of the event

Reimplemented from FIFE::InputEvent.

Definition at line 135 of file ec_mouseevent.h.

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

Gets the timestamp of the event

Reimplemented from FIFE::InputEvent.

Definition at line 132 of file ec_mouseevent.h.

MouseEventType FIFE::MouseEvent::getType ( ) const
inline

Gets the type of the event.

Returns
the type of the event.

Definition at line 98 of file ec_mouseevent.h.

int32_t FIFE::MouseEvent::getX ( ) const
inline

Gets the x coordinate of the mouse event. The coordinate is relative to the source event source.

Returns
the x coordinate of the mouse event.

Definition at line 106 of file ec_mouseevent.h.

int32_t FIFE::MouseEvent::getY ( ) const
inline

Gets the y coordinate of the mouse event. The coordinate is relative to the source event source.

Returns
the y coordinate of the mouse event.

Definition at line 114 of file ec_mouseevent.h.

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

Checks whether alt is pressed.

Reimplemented from FIFE::InputEvent.

Definition at line 117 of file ec_mouseevent.h.

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

Checks if the event is consumed.

Returns
true if the event is consumed, false otherwise.

Reimplemented from FIFE::InputEvent.

Definition at line 127 of file ec_mouseevent.h.

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

Checks whether control is pressed.

Reimplemented from FIFE::InputEvent.

Definition at line 119 of file ec_mouseevent.h.

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

Checks whether meta is pressed.

Reimplemented from FIFE::InputEvent.

Definition at line 121 of file ec_mouseevent.h.

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

Checks whether shift is pressed.

Reimplemented from FIFE::InputEvent.

Definition at line 123 of file ec_mouseevent.h.

static std::string FIFE::MouseEvent::mouseButtonType2str ( MouseButtonType  t)
inlinestatic

Returns string representation of given button type

Definition at line 190 of file ec_mouseevent.h.

Referenced by getAttrStr().

Here is the caller graph for this function:

static std::string FIFE::MouseEvent::mouseEventType2str ( MouseEventType  t)
inlinestatic

Returns string representation of given event type

Definition at line 152 of file ec_mouseevent.h.

Referenced by getAttrStr().

Here is the caller graph for this function:

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

Sets the source of the event.

Reimplemented from FIFE::InputEvent.

Definition at line 131 of file ec_mouseevent.h.

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

Sets the timestamp of the event

Reimplemented from FIFE::InputEvent.

Definition at line 133 of file ec_mouseevent.h.


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