Represents platform-independent mouse events. More...
#include <GUIEvent.h>
Public Member Functions | |
CGUIMouseEvent (const EventType_t &eType, const eC_Int &iX=0, const eC_Int &iY=0, const eC_Bool &bLeftButton=false, const eC_Bool &bRightButton=false, const eC_UInt &uiModifiers=0, const eC_Value &vWheelDelta=0) | |
eC_Value | GetWheelDelta () const |
eC_Int | GetX () const |
eC_Int | GetY () const |
eC_Bool | IsLeftButtonPressed () const |
eC_Bool | IsRightButtonPressed () const |
![]() | |
CGUIEvent (const EventType_t &eType, const eC_UInt &uiModifiers) | |
virtual | ~CGUIEvent () |
Destructor. | |
EventSource_t | GetEventSource () const |
eC_UInt | GetModifiers () const |
EventType_t | GetType () const |
Additional Inherited Members | |
![]() | |
enum | EventSource_t { ES_NONE = 0x00000000 , ES_KEYBOARD , ES_MOUSE } |
enum | Modifier_t { GKM_NONE = 0x00000000 , GKM_SHIFT = 0x00000001 , GKM_CONTROL = 0x00000002 , GKM_ALT = 0x00000004 , GKM_META = 0x00000008 } |
Represents platform-independent mouse events.
Mouse events expand the functionality of the event base class by adding several methods for querying the mouse status (position, button status). Mouse events may be useful for handling several types of pointing devices, including touchpads.
|
inline |
Constructs a mouse event.
eType | The type of mouse event (movement, click ...). |
iX | The x position of the mouse pointer when the event occurred. |
iY | The y position of the mouse pointer when the event occurred. |
bLeftButton | Whether the left button is pressed down. |
bRightButton | Whether the right button is pressed down. |
uiModifiers | Logical OR combination of CGUIEvent::Modifier_t values. |
vWheelDelta | The mousewheel delta. |
|
inline |
Returns the wheel delta value when the event occurred. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user.
|
inline |
Returns the x position of the mouse pointer when the event occurred.
|
inline |
Returns the y position of the mouse pointer when the event occurred.
|
inline |
Returns whether the left mouse button was pressed when the event occurred.
|
inline |
Returns whether the right mouse button was pressed when the event occurred.