CrystalSpace

Public API Reference

iMouseDriver Struct Reference
[Event handling]

Generic Mouse Driver. More...

#include <iutil/csinput.h>

Inheritance diagram for iMouseDriver:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual void DoButton (uint number, int button, bool down, const int32 *axes, uint numAxes)=0
 Call this to add a 'mouse button down/up' event to queue.
virtual void DoMotion (uint number, const int32 *axes, uint numAxes)=0
 Call this to add a 'mouse moved' event to queue.
virtual const int32GetLast (uint n) const =0
 Query last mouse position for mouse n.
virtual int GetLast (uint n, uint a) const =0
 Query last mouse position for mouse n on axis a.
virtual bool GetLastButton (uint number, int button) const =0
 Query the last known mouse button state. Button numbers start at 0.
virtual int GetLastX (uint number=0) const =0
 Query last mouse X position for mouse number (0, 1, ...).
virtual int GetLastY (uint number=0) const =0
 Query last mouse Y position.
virtual void Reset ()=0
 Call to release all mouse buttons * (when focus switches from application window, for example).
virtual void SetDoubleClickTime (int iTime, size_t iDist)=0
 Set double-click mouse parameters.

Detailed Description

Generic Mouse Driver.

The mouse driver listens for mouse-related events from the event queue and records state information about recent events. It is responsible for synthesizing double-click events when it detects that two mouse-down events have occurred for the same mouse button within a short interval. Mouse button numbers start at 0. The left mouse button is 0, the right is 1, the middle 2, and so on. Typically, one instance of this object is available from the shared-object registry (iObjectRegistry) under the name "crystalspace.driver.input.generic.mouse".

Main creators of instances implementing this interface:

Main ways to get pointers to this interface:

Definition at line 179 of file csinput.h.


Member Function Documentation

virtual void iMouseDriver::DoButton ( uint  number,
int  button,
bool  down,
const int32 axes,
uint  numAxes 
) [pure virtual]

Call this to add a 'mouse button down/up' event to queue.

Button numbers start at zero.

Implemented in csMouseDriver.

virtual void iMouseDriver::DoMotion ( uint  number,
const int32 axes,
uint  numAxes 
) [pure virtual]

Call this to add a 'mouse moved' event to queue.

Implemented in csMouseDriver.

virtual const int32* iMouseDriver::GetLast ( uint  n  )  const [pure virtual]

Query last mouse position for mouse n.

Implemented in csMouseDriver.

virtual int iMouseDriver::GetLast ( uint  n,
uint  a 
) const [pure virtual]

Query last mouse position for mouse n on axis a.

Implemented in csMouseDriver.

virtual bool iMouseDriver::GetLastButton ( uint  number,
int  button 
) const [pure virtual]

Query the last known mouse button state. Button numbers start at 0.

Implemented in csMouseDriver.

virtual int iMouseDriver::GetLastX ( uint  number = 0  )  const [pure virtual]

Query last mouse X position for mouse number (0, 1, ...).

Implemented in csMouseDriver.

virtual int iMouseDriver::GetLastY ( uint  number = 0  )  const [pure virtual]

Query last mouse Y position.

Implemented in csMouseDriver.

virtual void iMouseDriver::Reset (  )  [pure virtual]

Call to release all mouse buttons * (when focus switches from application window, for example).

Implemented in csMouseDriver.

virtual void iMouseDriver::SetDoubleClickTime ( int  iTime,
size_t  iDist 
) [pure virtual]

Set double-click mouse parameters.

Implemented in csMouseDriver.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.4.7