csMouseEventHelper Class Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Static Public Member Functions
csMouseEventHelper Class Reference
Event handling

Helper class to conveniently deal with mouse events. More...

`#include <csutil/event.h>`

List of all members.

## Static Public Member Functions
static int | GetAxis (const iEvent *event, uint axis)
| retrieve any axis (basis 0) value
static int | GetButton (const iEvent *event)
| retrieve button code
static uint32 | GetButtonMask (const iEvent *event)
| Retrieve current button mask.
static bool | GetButtonState (const iEvent *event)
| retrieve button state (pressed/released)
static bool | GetEventData (const iEvent *event, csMouseEventData &data)
| Retrieve event data.
static csMouseEventType | GetEventType (const iEvent *event)
| Retrieve the event type (key up or down.)
static void | GetModifiers (const iEvent *event, csKeyModifiers &modifiers)
| retrieve modifier flags
static uint32 | GetModifiers (const iEvent *event)
| Retrieve modifiers bitmask.
static uint | GetNumAxes (const iEvent *event)
| retrieve number of axes
static uint | GetNumber (const iEvent *event)
| retrieve mouse number (0, 1, ...)
static int | GetX (const iEvent *event)
| retrieve X value of mouse #0
static int | GetY (const iEvent *event)
| Retrieve Y value of mouse #0.
static csEvent * | NewEvent (csRef< iEventNameRegistry > &reg, csTicks, csEventID name, csMouseEventType etype, int x, int y, uint32 AxesChanged, int button, bool buttonstate, uint32 buttonMask, const csKeyModifiers &modifiers)
| Create a new mouse event.
static csEvent * | NewEvent (csRef< iEventNameRegistry > &reg, csTicks, csEventID name, uint8 n, csMouseEventType etype, int x, int y, uint32 axesChanged, int button, bool buttonstate, uint32 buttonMask, const csKeyModifiers &modifiers)
| Create a new mouse event.
static csEvent * | NewEvent (csRef< iEventNameRegistry > &reg, csTicks, csEventID name, uint8 n, csMouseEventType etype, const int32 *axes, uint8 numAxes, uint32 axesChanged, int button, bool buttonstate, uint32 buttonMask, const csKeyModifiers &modifiers)
| Create a new mouse event.

## Detailed Description

Helper class to conveniently deal with mouse events.

Definition at line 89 of file event.h.

## Member Function Documentation

static int csMouseEventHelper::GetAxis | ( | const iEvent * | event,
|  | uint | axis
| ) |  | `[static]`

retrieve any axis (basis 0) value

static int csMouseEventHelper::GetButton | ( | const iEvent * | event | ) | `[static]`

retrieve button code

static uint32 csMouseEventHelper::GetButtonMask | ( | const iEvent * | event | ) | `[static]`

Retrieve current button mask.

static bool csMouseEventHelper::GetButtonState | ( | const iEvent * | event | ) | `[static]`

retrieve button state (pressed/released)

static bool csMouseEventHelper::GetEventData | ( | const iEvent * | event,
|  | csMouseEventData & | data
| ) |  | `[static]`

Retrieve event data.

static csMouseEventType csMouseEventHelper::GetEventType | ( | const iEvent * | event | ) | `[static]`

Retrieve the event type (key up or down.)

static void csMouseEventHelper::GetModifiers | ( | const iEvent * | event,
|  | csKeyModifiers & | modifiers
| ) |  | `[inline, static]`

retrieve modifier flags

Definition at line 166 of file event.h.

static uint32 csMouseEventHelper::GetModifiers | ( | const iEvent * | event | ) | `[inline, static]`

Retrieve modifiers bitmask.

Definition at line 170 of file event.h.

static uint csMouseEventHelper::GetNumAxes | ( | const iEvent * | event | ) | `[static]`

retrieve number of axes

static uint csMouseEventHelper::GetNumber | ( | const iEvent * | event | ) | `[static]`

retrieve mouse number (0, 1, ...)

static int csMouseEventHelper::GetX | ( | const iEvent * | event | ) | `[inline, static]`

retrieve X value of mouse #0

Definition at line 150 of file event.h.

static int csMouseEventHelper::GetY | ( | const iEvent * | event | ) | `[inline, static]`

Retrieve Y value of mouse #0.

Definition at line 153 of file event.h.

static csEvent* csMouseEventHelper::NewEvent | ( | csRef< iEventNameRegistry > & | reg,
|  | csTicks | ,
|  | csEventID | name,
|  | csMouseEventType | etype,
|  | int | x,
|  | int | y,
|  | uint32 | AxesChanged,
|  | int | button,
|  | bool | buttonstate,
|  | uint32 | buttonMask,
|  | const csKeyModifiers & | modifiers
| ) |  | `[static]`

Create a new mouse event.

static csEvent* csMouseEventHelper::NewEvent | ( | csRef< iEventNameRegistry > & | reg,
|  | csTicks | ,
|  | csEventID | name,
|  | uint8 | n,
|  | csMouseEventType | etype,
|  | int | x,
|  | int | y,
|  | uint32 | axesChanged,
|  | int | button,
|  | bool | buttonstate,
|  | uint32 | buttonMask,
|  | const csKeyModifiers & | modifiers
| ) |  | `[static]`

Create a new mouse event.

static csEvent* csMouseEventHelper::NewEvent | ( | csRef< iEventNameRegistry > & | reg,
|  | csTicks | ,
|  | csEventID | name,
|  | uint8 | n,
|  | csMouseEventType | etype,
|  | const int32 * | axes,
|  | uint8 | numAxes,
|  | uint32 | axesChanged,
|  | int | button,
|  | bool | buttonstate,
|  | uint32 | buttonMask,
|  | const csKeyModifiers & | modifiers
| ) |  | `[static]`

Create a new mouse event.

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

- csutil/event.h