#include <ec_mouseevent.h>
Public Types | |
enum | MouseEventType |
enum | MouseButtonType |
Public Member Functions | |
MouseEvent () | |
virtual | ~MouseEvent () |
MouseButtonType | getButton () const |
MouseEventType | getType () const |
int | getX () const |
int | 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 int | getTimeStamp () const |
virtual void | setTimeStamp (int timestamp) |
virtual const std::string & | getName () const |
virtual std::string | getDebugString () const |
virtual std::string | getAttrStr () const |
Static Public Member Functions | |
static std::string | mouseEventType2str (MouseEventType t) |
static std::string | mouseButtonType2str (MouseButtonType t) |
Class for mouse events
Definition at line 42 of file ec_mouseevent.h.
Mouse button types.
Definition at line 64 of file ec_mouseevent.h.
Mouse event types.
Definition at line 47 of file ec_mouseevent.h.
FIFE::MouseEvent::MouseEvent | ( | ) | [inline] |
Constructor.
Definition at line 76 of file ec_mouseevent.h.
virtual FIFE::MouseEvent::~MouseEvent | ( | ) | [inline, virtual] |
Destructor.
Definition at line 85 of file ec_mouseevent.h.
virtual void FIFE::MouseEvent::consume | ( | ) | [inline, virtual] |
Marks the event as consumed.
Reimplemented from FIFE::InputEvent.
Definition at line 126 of file ec_mouseevent.h.
virtual void FIFE::MouseEvent::consumedByWidgets | ( | ) | [inline, virtual] |
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 [inline, virtual] |
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.
Definition at line 91 of file ec_mouseevent.h.
virtual std::string FIFE::MouseEvent::getDebugString | ( | ) | const [inline, virtual] |
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 [inline, virtual] |
Gets the name of the event
Reimplemented from FIFE::InputEvent.
Definition at line 135 of file ec_mouseevent.h.
virtual int FIFE::MouseEvent::getTimeStamp | ( | ) | const [inline, virtual] |
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.
Definition at line 98 of file ec_mouseevent.h.
int FIFE::MouseEvent::getX | ( | ) | const [inline] |
Gets the x coordinate of the mouse event. The coordinate is relative to the source event source.
Definition at line 106 of file ec_mouseevent.h.
int FIFE::MouseEvent::getY | ( | ) | const [inline] |
Gets the y coordinate of the mouse event. The coordinate is relative to the source event source.
Definition at line 114 of file ec_mouseevent.h.
virtual bool FIFE::MouseEvent::isAltPressed | ( | ) | const [inline, virtual] |
Checks whether alt is pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 117 of file ec_mouseevent.h.
virtual bool FIFE::MouseEvent::isConsumed | ( | ) | const [inline, virtual] |
Checks if the event is consumed.
Reimplemented from FIFE::InputEvent.
Definition at line 127 of file ec_mouseevent.h.
virtual bool FIFE::MouseEvent::isControlPressed | ( | ) | const [inline, virtual] |
Checks whether control is pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 119 of file ec_mouseevent.h.
virtual bool FIFE::MouseEvent::isMetaPressed | ( | ) | const [inline, virtual] |
Checks whether meta is pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 121 of file ec_mouseevent.h.
virtual bool FIFE::MouseEvent::isShiftPressed | ( | ) | const [inline, virtual] |
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 | ) | [inline, static] |
Returns string representation of given button type
Definition at line 190 of file ec_mouseevent.h.
Referenced by getAttrStr().
static std::string FIFE::MouseEvent::mouseEventType2str | ( | MouseEventType | t | ) | [inline, static] |
Returns string representation of given event type
Definition at line 152 of file ec_mouseevent.h.
Referenced by getAttrStr().
virtual void FIFE::MouseEvent::setSource | ( | IEventSource * | source | ) | [inline, virtual] |
Sets the source of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 131 of file ec_mouseevent.h.
virtual void FIFE::MouseEvent::setTimeStamp | ( | int | timestamp | ) | [inline, virtual] |
Sets the timestamp of the event
Reimplemented from FIFE::InputEvent.
Definition at line 133 of file ec_mouseevent.h.