Guiliani  Version 2.5 revision 7293 (documentation build 13)
CGUIMouseEvent Class Reference

Represents platform-independent mouse events. More...

#include <GUIEvent.h>

Inheritance diagram for CGUIMouseEvent:

Public Member Functions

 CGUIMouseEvent (EventType_t eType, eC_Int iX=0, eC_Int iY=0, eC_Bool bLeftButton=false, eC_Bool bRightButton=false, eC_UInt uiModifiers=0, eC_Value vWheelDelta=0)
 
eC_Value GetWheelDelta () const
 
eC_Int GetX () const
 
eC_Int GetY () const
 
eC_Bool IsLeftButtonPressed () const
 
eC_Bool IsRightButtonPressed () const
 
- Public Member Functions inherited from CGUIEvent
 CGUIEvent (EventType_t eType, eC_UInt uiModifiers)
 
virtual ~CGUIEvent ()
 Destructor.
 
EventSource_t GetEventSource () const
 
eC_UInt GetModifiers () const
 
EventType_t GetType () const
 

Additional Inherited Members

- Public Types inherited from CGUIEvent
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
}
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CGUIMouseEvent()

CGUIMouseEvent::CGUIMouseEvent ( EventType_t  eType,
eC_Int  iX = 0,
eC_Int  iY = 0,
eC_Bool  bLeftButton = false,
eC_Bool  bRightButton = false,
eC_UInt  uiModifiers = 0,
eC_Value  vWheelDelta = 0 
)
inline

Constructs a mouse event.

Parameters
eTypeThe type of mouse event (movement, click ...).
iXThe x position of the mouse pointer when the event occurred.
iYThe y position of the mouse pointer when the event occurred.
bLeftButtonWhether the left button is pressed down.
bRightButtonWhether the right button is pressed down.
uiModifiersLogical OR combination of CGUIEvent::Modifier_t values.
vWheelDeltaThe mousewheel delta.

Member Function Documentation

◆ GetWheelDelta()

eC_Value CGUIMouseEvent::GetWheelDelta ( ) const
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.

Returns
wheel delta.

◆ GetX()

eC_Int CGUIMouseEvent::GetX ( ) const
inline

Returns the x position of the mouse pointer when the event occurred.

Returns
x position relative to Guiliani's root object.

◆ GetY()

eC_Int CGUIMouseEvent::GetY ( ) const
inline

Returns the y position of the mouse pointer when the event occurred.

Returns
y position relative to Guiliani's root object.

◆ IsLeftButtonPressed()

eC_Bool CGUIMouseEvent::IsLeftButtonPressed ( ) const
inline

Returns whether the left mouse button was pressed when the event occurred.

Returns
The left mouse button state.

◆ IsRightButtonPressed()

eC_Bool CGUIMouseEvent::IsRightButtonPressed ( ) const
inline

Returns whether the right mouse button was pressed when the event occurred.

Returns
The right mouse button state.

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