# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLMISC::IMouseDevice Struct Reference

An interface to a low level mouse device. More...

#include <mouse_device.h>

Inheritance diagram for NLMISC::IMouseDevice:

NLMISC::IInputDevice List of all members.

Public Types

enum  TAxisMode { Raw, Clamped, AxisModeLast }
enum  TAxis { XAxis = 0, YAxis = 1, AxisLast }
enum  TMessageMode { NormalMode, RawMode, MessageModeLast }

Public Methods

virtual const CRectgetMouseFrame () const=0
virtual void setDoubleClickDelay (uint ms)=0
virtual uint getDoubleClickDelay () const=0
virtual void setMousePos (float x, float y)=0
Messages
virtual void setMessagesMode (TMessageMode mode)=0
 Tells what messages should be sent : DEFAULT is 'raw' messages Raw messages : - no clamping nor frames applied no speed apllied no factor applied CGDMouseMove messages are sent Coordinates expressed in mickeys Normal messages : - CEventMouseMove messages are sent A frame may clamp one or both axis The mouse speed can be changed. More...

virtual TMessageMode getMessagesMode () const=0
 retrieve what kinds of messages are sent. More...

Mouse MOVE, valid only
virtual void setMouseMode (TAxis axis, TAxisMode axisMode)=0
 Set the mode of axis of the mouse. More...

virtual TAxisMode getMouseMode (TAxis axis) const=0
 returns the mode of the mouse for the given axis. More...

virtual void setMouseSpeed (float speed)=0
 Set the mouse speed. More...

virtual float getMouseSpeed () const=0
 Get the mouse speed. More...

virtual void setMouseFrame (const CRect &rect)=0
 Set the current frame in which the mouse can move, expressed in pixels. More...

virtual void setFactors (float xFactor, float yFactor)=0
 Gives factor by which the mouse coordinates must be multiplied before an event is sent. More...

virtual float getXFactor () const=0
 Get the x factor, use to multiply the mouse position before an event is sent. More...

virtual float getYFactor () const=0
 Get the y factor, use to multiply the mouse position before an event is sent. More...


Detailed Description

An interface to a low level mouse device.

Definition at line 40 of file mouse_device.h.


Member Enumeration Documentation

enum NLMISC::IMouseDevice::TAxis
 

Enumeration values:
XAxis 
YAxis 
AxisLast 

Definition at line 43 of file mouse_device.h.

enum NLMISC::IMouseDevice::TAxisMode
 

Enumeration values:
Raw 
Clamped 
AxisModeLast 

Definition at line 42 of file mouse_device.h.

enum NLMISC::IMouseDevice::TMessageMode
 

Enumeration values:
NormalMode 
RawMode 
MessageModeLast 

Definition at line 44 of file mouse_device.h.


Member Function Documentation

virtual uint NLMISC::IMouseDevice::getDoubleClickDelay   const [pure virtual]
 

virtual TMessageMode NLMISC::IMouseDevice::getMessagesMode   const [pure virtual]
 

retrieve what kinds of messages are sent.

virtual const CRect& NLMISC::IMouseDevice::getMouseFrame   const [pure virtual]
 

virtual TAxisMode NLMISC::IMouseDevice::getMouseMode TAxis    axis const [pure virtual]
 

returns the mode of the mouse for the given axis.

NB : invalid in raw message mode

virtual float NLMISC::IMouseDevice::getMouseSpeed   const [pure virtual]
 

Get the mouse speed.

NB : invalid in raw message mode

virtual float NLMISC::IMouseDevice::getXFactor   const [pure virtual]
 

Get the x factor, use to multiply the mouse position before an event is sent.

NB : invalid in raw message mode.

See also:
setFactors()

virtual float NLMISC::IMouseDevice::getYFactor   const [pure virtual]
 

Get the y factor, use to multiply the mouse position before an event is sent.

NB : invalid in raw message mode.

See also:
setFactors()

virtual void NLMISC::IMouseDevice::setDoubleClickDelay uint    ms [pure virtual]
 

virtual void NLMISC::IMouseDevice::setFactors float    xFactor,
float    yFactor
[pure virtual]
 

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.

 mouse->setMouseFrame(800, 600);
 mouse->setMouseMode(XAxis, IMouseDevice::Clamped);
 mouse->setMouseMode(YAxis, IMouseDevice::Clamped);
 mouse->setFactors(1.f / 800, 1.f / 600);

virtual void NLMISC::IMouseDevice::setMessagesMode TMessageMode    mode [pure virtual]
 

Tells what messages should be sent : DEFAULT is 'raw' messages Raw messages : - no clamping nor frames applied no speed apllied no factor applied CGDMouseMove messages are sent Coordinates expressed in mickeys Normal messages : - CEventMouseMove messages are sent A frame may clamp one or both axis The mouse speed can be changed.

  • * - * - * - * - * -

virtual void NLMISC::IMouseDevice::setMouseFrame const CRect   rect [pure virtual]
 

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.

See also:
setMouseFactors

virtual void NLMISC::IMouseDevice::setMouseMode TAxis    axis,
TAxisMode    axisMode
[pure virtual]
 

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

See also:
setMouseFrame(const CRect &rect)

virtual void NLMISC::IMouseDevice::setMousePos float    x,
float    y
[pure virtual]
 

virtual void NLMISC::IMouseDevice::setMouseSpeed float    speed [pure virtual]
 

Set the mouse speed.

It must be in the ]0, +inf] range, 1 gives the natural mouse speed. NB : invalid in raw message mode


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