|
FIFE
|
Class for mouse events. More...
#include <ec_mouseevent.h>
Inheritance diagram for FIFE::MouseEvent:
Collaboration diagram for FIFE::MouseEvent:Public Types | |
| enum | MouseEventType { UNKNOWN_EVENT = -1, MOVED = 0, PRESSED, RELEASED, WHEEL_MOVED_DOWN, WHEEL_MOVED_UP, CLICKED, ENTERED, EXITED, DRAGGED } |
| Mouse event types. More... | |
| enum | MouseButtonType { EMPTY = 0, LEFT = 1, RIGHT = 2, MIDDLE = 4, UNKNOWN_BUTTON = 8 } |
| Mouse button types. More... | |
Public Member Functions | |
| MouseEvent () | |
| Constructor. More... | |
| virtual | ~MouseEvent () |
| Destructor. More... | |
| MouseButtonType | getButton () const |
| Gets the button of the mouse event. More... | |
| void | setButton (MouseButtonType type) |
| MouseEventType | getType () const |
| Gets the type of the event. More... | |
| void | setType (MouseEventType type) |
| int32_t | getX () const |
| Gets the x coordinate of the mouse event. More... | |
| void | setX (int32_t x) |
| int32_t | getY () const |
| Gets the y coordinate of the mouse event. More... | |
| void | setY (int32_t y) |
| virtual bool | isAltPressed () const |
| Checks whether alt is pressed. More... | |
| virtual void | setAltPressed (bool pressed) |
| virtual bool | isControlPressed () const |
| Checks whether control is pressed. More... | |
| virtual void | setControlPressed (bool pressed) |
| virtual bool | isMetaPressed () const |
| Checks whether meta is pressed. More... | |
| virtual void | setMetaPressed (bool pressed) |
| virtual bool | isShiftPressed () const |
| Checks whether shift is pressed. More... | |
| virtual void | setShiftPressed (bool pressed) |
| virtual void | consume () |
| Marks the event as consumed. More... | |
| virtual bool | isConsumed () const |
| Checks if the event is consumed. More... | |
| virtual void | consumedByWidgets () |
| Marks events as consumed by widget library. More... | |
| virtual bool | isConsumedByWidgets () const |
| 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... | |
| virtual std::string | getAttrStr () const |
| Gets attribute string of the event. More... | |
Public Member Functions inherited from FIFE::InputEvent | |
| InputEvent () | |
| Constructor. More... | |
| ~InputEvent () | |
| Destructor. More... | |
Public Member Functions inherited from FIFE::Event | |
| Event () | |
| Constructor. More... | |
| virtual | ~Event () |
| Destructor. More... | |
Static Public Member Functions | |
| static std::string | mouseEventType2str (MouseEventType t) |
| Returns string representation of given event type. More... | |
| static std::string | mouseButtonType2str (MouseButtonType t) |
| Returns string representation of given button type. More... | |
Private Attributes | |
| MouseEventType | m_eventtype |
| MouseButtonType | m_buttontype |
| int32_t | m_x |
| int32_t | m_y |
Class for mouse events.
Definition at line 42 of file ec_mouseevent.h.
Mouse button types.
| Enumerator | |
|---|---|
| EMPTY | |
| LEFT | |
| RIGHT | |
| MIDDLE | |
| UNKNOWN_BUTTON | |
Definition at line 64 of file ec_mouseevent.h.
Mouse event types.
| Enumerator | |
|---|---|
| UNKNOWN_EVENT | |
| MOVED | |
| PRESSED | |
| RELEASED | |
| WHEEL_MOVED_DOWN | |
| WHEEL_MOVED_UP | |
| CLICKED | |
| ENTERED | |
| EXITED | |
| DRAGGED | |
Definition at line 47 of file ec_mouseevent.h.
|
inline |
Constructor.
Definition at line 76 of file ec_mouseevent.h.
|
inlinevirtual |
Destructor.
Definition at line 85 of file ec_mouseevent.h.
|
inlinevirtual |
Marks the event as consumed.
Reimplemented from FIFE::InputEvent.
Definition at line 126 of file ec_mouseevent.h.
References FIFE::InputEvent::consume().
|
inlinevirtual |
Marks events as consumed by widget library.
Reimplemented from FIFE::InputEvent.
Definition at line 128 of file ec_mouseevent.h.
References FIFE::InputEvent::consumedByWidgets().
|
inlinevirtual |
Gets attribute string of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 140 of file ec_mouseevent.h.
References FIFE::InputEvent::getAttrStr(), m_buttontype, m_eventtype, m_x, m_y, mouseButtonType2str(), and mouseEventType2str().
|
inline |
Gets the button of the mouse event.
Definition at line 91 of file ec_mouseevent.h.
References m_buttontype.
Referenced by FIFE::EventManager::processMouseEvent().
Here is the caller graph for this function:
|
inlinevirtual |
Gets the debugstring of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 139 of file ec_mouseevent.h.
References FIFE::InputEvent::getDebugString().
|
inlinevirtual |
Gets the name of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 135 of file ec_mouseevent.h.
|
inlinevirtual |
Gets the source of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 130 of file ec_mouseevent.h.
References FIFE::InputEvent::getSource().
|
inlinevirtual |
Gets the timestamp of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 132 of file ec_mouseevent.h.
References FIFE::InputEvent::getTimeStamp().
|
inline |
Gets the type of the event.
Definition at line 98 of file ec_mouseevent.h.
References m_eventtype.
Referenced by FIFE::EventManager::dispatchMouseEvent(), and FIFE::EventManager::fillMouseEvent().
Here is the caller graph for this function:
|
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.
References m_x.
|
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.
References m_y.
|
inlinevirtual |
Checks whether alt is pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 117 of file ec_mouseevent.h.
References FIFE::InputEvent::isAltPressed().
|
inlinevirtual |
Checks if the event is consumed.
Reimplemented from FIFE::InputEvent.
Definition at line 127 of file ec_mouseevent.h.
References FIFE::InputEvent::isConsumed().
Referenced by FIFE::EventManager::dispatchMouseEvent().
Here is the caller graph for this function:
|
inlinevirtual |
Reimplemented from FIFE::InputEvent.
Definition at line 129 of file ec_mouseevent.h.
References FIFE::InputEvent::isConsumedByWidgets().
|
inlinevirtual |
Checks whether control is pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 119 of file ec_mouseevent.h.
References FIFE::InputEvent::isControlPressed().
|
inlinevirtual |
Checks whether meta is pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 121 of file ec_mouseevent.h.
References FIFE::InputEvent::isMetaPressed().
|
inlinevirtual |
Checks whether shift is pressed.
Reimplemented from FIFE::InputEvent.
Definition at line 123 of file ec_mouseevent.h.
References FIFE::InputEvent::isShiftPressed().
|
inlinestatic |
Returns string representation of given button type.
Definition at line 190 of file ec_mouseevent.h.
References EMPTY, LEFT, MIDDLE, and RIGHT.
Referenced by getAttrStr().
Here is the caller graph for this function:
|
inlinestatic |
Returns string representation of given event type.
Definition at line 152 of file ec_mouseevent.h.
References CLICKED, DRAGGED, ENTERED, EXITED, MOVED, PRESSED, RELEASED, WHEEL_MOVED_DOWN, and WHEEL_MOVED_UP.
Referenced by getAttrStr().
Here is the caller graph for this function:
|
inlinevirtual |
Reimplemented from FIFE::InputEvent.
Definition at line 118 of file ec_mouseevent.h.
References FIFE::InputEvent::setAltPressed().
Referenced by FIFE::FifechanManager::translateMouseEvent().
Here is the caller graph for this function:
|
inline |
Definition at line 92 of file ec_mouseevent.h.
References m_buttontype.
Referenced by FIFE::EventManager::fillMouseEvent(), and FIFE::FifechanManager::translateMouseEvent().
Here is the caller graph for this function:
|
inlinevirtual |
Reimplemented from FIFE::InputEvent.
Definition at line 120 of file ec_mouseevent.h.
References FIFE::InputEvent::setControlPressed().
Referenced by FIFE::FifechanManager::translateMouseEvent().
Here is the caller graph for this function:
|
inlinevirtual |
Reimplemented from FIFE::InputEvent.
Definition at line 122 of file ec_mouseevent.h.
References FIFE::InputEvent::setMetaPressed().
Referenced by FIFE::FifechanManager::translateMouseEvent().
Here is the caller graph for this function:
|
inlinevirtual |
Reimplemented from FIFE::InputEvent.
Definition at line 124 of file ec_mouseevent.h.
References FIFE::InputEvent::setShiftPressed().
Referenced by FIFE::FifechanManager::translateMouseEvent().
Here is the caller graph for this function:
|
inlinevirtual |
Sets the source of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 131 of file ec_mouseevent.h.
References FIFE::InputEvent::setSource().
Referenced by FIFE::EventManager::processMouseEvent().
Here is the caller graph for this function:
|
inlinevirtual |
Sets the timestamp of the event.
Reimplemented from FIFE::InputEvent.
Definition at line 133 of file ec_mouseevent.h.
References FIFE::InputEvent::setTimeStamp().
|
inline |
Definition at line 99 of file ec_mouseevent.h.
References m_eventtype.
Referenced by FIFE::EventManager::fillMouseEvent(), and FIFE::FifechanManager::translateMouseEvent().
Here is the caller graph for this function:
|
inline |
Definition at line 107 of file ec_mouseevent.h.
References m_x.
Referenced by FIFE::EventManager::fillMouseEvent(), and FIFE::FifechanManager::translateMouseEvent().
Here is the caller graph for this function:
|
inline |
Definition at line 115 of file ec_mouseevent.h.
References m_y.
Referenced by FIFE::EventManager::fillMouseEvent(), and FIFE::FifechanManager::translateMouseEvent().
Here is the caller graph for this function:
|
private |
Definition at line 215 of file ec_mouseevent.h.
Referenced by getAttrStr(), getButton(), and setButton().
|
private |
Definition at line 214 of file ec_mouseevent.h.
Referenced by getAttrStr(), getType(), and setType().
|
private |
Definition at line 216 of file ec_mouseevent.h.
Referenced by getAttrStr(), getX(), and setX().
|
private |
Definition at line 217 of file ec_mouseevent.h.
Referenced by getAttrStr(), getY(), and setY().