![]() |
Public API Reference |
Generic Mouse Driver. More...
#include <csutil/csinput.h>
Public Member Functions | |
| csMouseDriver (iObjectRegistry *) | |
| Initialize mouse interface. | |
| virtual void | DoButton (uint number, int button, bool down, const int32 *axes, uint numAxes) |
| Call this to add a 'mouse button down/up' event to queue. | |
| virtual void | DoMotion (uint number, const int32 *axes, uint numAxes) |
| Call this to add a 'mouse moved' event to queue. | |
| virtual int | GetLast (uint n, uint axis) const |
| Query last mouse position on axis (0, 1, 2, ...) for mouse n (0, 1, 2, ...) | |
| virtual const int32 * | GetLast (uint n) const |
| Query last mouse axis array for mouse n (0, 1, 2, ...) | |
| virtual bool | GetLastButton (int button) const |
| Query the last known mouse button state for mouse #0. | |
| virtual bool | GetLastButton (uint number, int button) const |
| Query the last known mouse button state. | |
| virtual int | GetLastX (uint n) const |
| Query last mouse X position for mouse #n (0, 1, 2, ...) | |
| virtual int | GetLastY (uint n) const |
| Query last mouse Y position for mouse #n (0, 1, 2, ...) | |
| virtual void | LostFocus () |
| Application lost focus. | |
| virtual void | Reset () |
| Call to release all mouse buttons. | |
| CS_EVENTHANDLER_NIL_GENERIC_CONSTRAINTS virtual CS_EVENTHANDLER_DEFAULT_INSTANCE_CONSTRAINTS void | SetDoubleClickTime (int iTime, size_t iDist) |
| Set double-click mouse parameters. | |
| virtual | ~csMouseDriver () |
| Destructor. | |
Protected Member Functions | |
| iKeyboardDriver * | GetKeyboardDriver () |
| Get the generic keyboard driver (for checking modifier states). | |
Protected Attributes | |
| bool | Button [CS_MAX_MOUSE_COUNT][CS_MAX_MOUSE_BUTTONS] |
| Mouse buttons state. | |
| size_t | DoubleClickDist |
| Mouse double click max distance. | |
| csTicks | DoubleClickTime |
| Mouse double click max interval in 1/1000 seconds. | |
| int32 | Last [CS_MAX_MOUSE_COUNT][CS_MAX_MOUSE_AXES] |
| Last mouse positions. | |
| int | LastClick [CS_MAX_MOUSE_COUNT][CS_MAX_MOUSE_AXES] |
| Last "mouse down" event position. | |
| int | LastClickButton [CS_MAX_MOUSE_COUNT] |
| Last "mouse down" event button. | |
| csTicks | LastClickTime [CS_MAX_MOUSE_COUNT] |
| Last "mouse down" event time. | |
Generic Mouse Driver.
Mouse driver should generate events and put them into the event queue. Also it is responsible for generating double-click events. Mouse button numbers are 0-based.
Initialize mouse interface.
| virtual csMouseDriver::~csMouseDriver | ( | ) | [virtual] |
Destructor.
| virtual void csMouseDriver::DoButton | ( | uint | number, |
| int | button, | ||
| bool | down, | ||
| const int32 * | axes, | ||
| uint | numAxes | ||
| ) | [virtual] |
Call this to add a 'mouse button down/up' event to queue.
Implements iMouseDriver.
| virtual void csMouseDriver::DoMotion | ( | uint | number, |
| const int32 * | axes, | ||
| uint | numAxes | ||
| ) | [virtual] |
Call this to add a 'mouse moved' event to queue.
Implements iMouseDriver.
| iKeyboardDriver* csMouseDriver::GetKeyboardDriver | ( | ) | [protected] |
Get the generic keyboard driver (for checking modifier states).
| virtual int csMouseDriver::GetLast | ( | uint | n, |
| uint | axis | ||
| ) | const [inline, virtual] |
Query last mouse position on axis (0, 1, 2, ...) for mouse n (0, 1, 2, ...)
Implements iMouseDriver.
| virtual const int32* csMouseDriver::GetLast | ( | uint | n | ) | const [inline, virtual] |
Query last mouse axis array for mouse n (0, 1, 2, ...)
Implements iMouseDriver.
| virtual bool csMouseDriver::GetLastButton | ( | int | button | ) | const [inline, virtual] |
Query the last known mouse button state for mouse #0.
Implements iMouseDriver.
| virtual bool csMouseDriver::GetLastButton | ( | uint | number, |
| int | button | ||
| ) | const [inline, virtual] |
Query the last known mouse button state.
Implements iMouseDriver.
| virtual int csMouseDriver::GetLastX | ( | uint | n | ) | const [inline, virtual] |
Query last mouse X position for mouse #n (0, 1, 2, ...)
Implements iMouseDriver.
| virtual int csMouseDriver::GetLastY | ( | uint | n | ) | const [inline, virtual] |
Query last mouse Y position for mouse #n (0, 1, 2, ...)
Implements iMouseDriver.
| virtual void csMouseDriver::LostFocus | ( | ) | [inline, virtual] |
| virtual void csMouseDriver::Reset | ( | ) | [virtual] |
Call to release all mouse buttons.
Implements iMouseDriver.
| CS_EVENTHANDLER_NIL_GENERIC_CONSTRAINTS virtual CS_EVENTHANDLER_DEFAULT_INSTANCE_CONSTRAINTS void csMouseDriver::SetDoubleClickTime | ( | int | iTime, |
| size_t | iDist | ||
| ) | [virtual] |
Set double-click mouse parameters.
Implements iMouseDriver.
bool csMouseDriver::Button[CS_MAX_MOUSE_COUNT][CS_MAX_MOUSE_BUTTONS] [protected] |
size_t csMouseDriver::DoubleClickDist [protected] |
csTicks csMouseDriver::DoubleClickTime [protected] |
int32 csMouseDriver::Last[CS_MAX_MOUSE_COUNT][CS_MAX_MOUSE_AXES] [protected] |
int csMouseDriver::LastClick[CS_MAX_MOUSE_COUNT][CS_MAX_MOUSE_AXES] [protected] |
int csMouseDriver::LastClickButton[CS_MAX_MOUSE_COUNT] [protected] |
csTicks csMouseDriver::LastClickTime[CS_MAX_MOUSE_COUNT] [protected] |