#include <mouse_device.h>
Inheritance diagram for NLMISC::IMouseDevice:
Definition at line 40 of file mouse_device.h.
Public Types | |
enum | TAxis { XAxis = 0, YAxis = 1, AxisLast } |
enum | TAxisMode { Raw, Clamped, AxisModeLast } |
enum | TMessageMode { NormalMode, RawMode, MessageModeLast } |
Public Member Functions | |
virtual uint | getBufferSize () const=0 |
Get the buffer size for this device. | |
virtual uint | getDoubleClickDelay () const=0 |
virtual const CRect & | getMouseFrame () const=0 |
virtual bool | setBufferSize (uint size)=0 |
virtual void | setDoubleClickDelay (uint ms)=0 |
virtual void | setMousePos (float x, float y)=0 |
Device server specifics. You usually don't want to call these | |
virtual void | begin (CEventServer *server) |
virtual void | poll (CInputDeviceServer *dev)=0 |
virtual void | submit (IInputDeviceEvent *deviceEvent, CEventServer *server)=0 |
virtual void | transitionOccured (CEventServer *server, const IInputDeviceEvent *nextMessage) |
Device server specifics. You usually don't want to call these | |
virtual void | begin (CEventServer *server) |
virtual void | poll (CInputDeviceServer *dev)=0 |
virtual void | submit (IInputDeviceEvent *deviceEvent, CEventServer *server)=0 |
virtual void | transitionOccured (CEventServer *server, const IInputDeviceEvent *nextMessage) |
Device server specifics. You usually don't want to call these | |
virtual void | begin (CEventServer *server) |
virtual void | poll (CInputDeviceServer *dev)=0 |
virtual void | submit (IInputDeviceEvent *deviceEvent, CEventServer *server)=0 |
virtual void | transitionOccured (CEventServer *server, const IInputDeviceEvent *nextMessage) |
Device server specifics. You usually don't want to call these | |
virtual void | begin (CEventServer *server) |
virtual void | poll (CInputDeviceServer *dev)=0 |
virtual void | submit (IInputDeviceEvent *deviceEvent, CEventServer *server)=0 |
virtual void | transitionOccured (CEventServer *server, const IInputDeviceEvent *nextMessage) |
Messages | |
virtual TMessageMode | getMessagesMode () const=0 |
retrieve what kinds of messages are sent | |
virtual void | setMessagesMode (TMessageMode mode)=0 |
Mouse MOVE, valid only | |
virtual uint | getMouseAcceleration () const=0 |
virtual TAxisMode | getMouseMode (TAxis axis) const=0 |
virtual float | getMouseSpeed () const=0 |
virtual float | getXFactor () const=0 |
virtual float | getYFactor () const=0 |
virtual void | setFactors (float xFactor, float yFactor)=0 |
virtual void | setMouseAcceleration (uint speed)=0 |
virtual void | setMouseFrame (const CRect &rect)=0 |
virtual void | setMouseMode (TAxis axis, TAxisMode axisMode)=0 |
virtual void | setMouseSpeed (float speed)=0 |
|
Definition at line 43 of file mouse_device.h.
|
|
Definition at line 42 of file mouse_device.h.
00042 { Raw, Clamped, AxisModeLast }; |
|
Definition at line 44 of file mouse_device.h.
00044 { NormalMode, RawMode, MessageModeLast }; |
|
For device server usage : Called at the beginning of each events retrieval. If a device doesn't support buffered datas, the state changes can be directly send to the event server. The default does nothing. Definition at line 64 of file input_device.h.
00064 {} |
|
Get the buffer size for this device.
|
|
Referenced by NL3D::CDriverGL::getDoubleClickDelay(). |
|
retrieve what kinds of messages are sent
|
|
Get the mouse acceleration. NB : invalid in raw message mode |
|
|
|
returns the mode of the mouse for the given axis. NB : invalid in raw message mode |
|
Get the mouse speed. NB : invalid in raw message mode |
|
Get the x factor, use to multiply the mouse position before an event is sent. NB : invalid in raw message mode.
|
|
Get the y factor, use to multiply the mouse position before an event is sent. NB : invalid in raw message mode.
|
|
For device server usage : Poll all events from that device, and notify them to the given device server, so that they can be sorted between devices. This retrieves messages, but do not process them. |
|
Set the buffer size for this device (the number of samples it can retains). This return true if the size could be set |
|
|
|
Gives factor by which the mouse coordinates must be multiplied before an event is sent. The default factor is 1. NB : invalid in raw message mode. Example : this set a frame of 800x600 and reports event in the [0, 1] range.
|
|
Tells what messages should be sent : DEFAULT is 'raw' messages Raw messages : - no clamping nor frames applied
The mouse speed can be changed |
|
Set the mouse acceleration. It is the threshold in mickey, when start the acceleration. 0 means not acceleration. NB : invalid in raw message mode |
|
Set the current frame in which the mouse can move, expressed in pixels. NB do not forget to call setMouseFactors if you want the results to be reported in the 0-1 range. NB : invalid in raw message mode.
|
|
Set the mode of axis of the mouse. This can be raw, or clamped. In clamped mode, a frame is used to limit the move. NB : invalid in raw message mode
|
|
|
|
Set the mouse speed. It must be in the ]0, +inf] range, 1 gives the natural mouse speed. NB : invalid in raw message mode |
|
For device server usage : Process an event (eventually update this device state), and translate the message to a IEventServerMessage |
|
For device server usage : Says that the next message is for another device, or that it is the last message that will be received. This allow to pack several messages in one (for example, to sum up mouse moves until a click occurs) The default does nothing. The next message can be used to get a time stamp for example. It may be NULL is no next message is available Definition at line 81 of file input_device.h. Referenced by NLMISC::CInputDeviceServer::poll().
00081 {} |