From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/a03867.html | 948 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 948 insertions(+) create mode 100644 docs/doxygen/nel/a03867.html (limited to 'docs/doxygen/nel/a03867.html') diff --git a/docs/doxygen/nel/a03867.html b/docs/doxygen/nel/a03867.html new file mode 100644 index 00000000..9bf41e6e --- /dev/null +++ b/docs/doxygen/nel/a03867.html @@ -0,0 +1,948 @@ + + +NeL: NLMISC::IMouseDevice struct Reference + + + +
+

NLMISC::IMouseDevice Struct Reference

#include <mouse_device.h> +

+

Inheritance diagram for NLMISC::IMouseDevice: +

+ +NLMISC::IInputDevice + +

Detailed Description

+An interface to a low level mouse device. +

+ +

+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 CRectgetMouseFrame () 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
+


Member Enumeration Documentation

+

+ + + + +
+ + +
enum NLMISC::IMouseDevice::TAxis +
+
+ + + + + +
+   + + +

+

Enumeration values:
+ + + + +
XAxis  +
YAxis  +
AxisLast  +
+
+ +

+Definition at line 43 of file mouse_device.h. +

+

00043 { XAxis = 0, YAxis = 1, AxisLast };
+
+

+ + + + +
+ + +
enum NLMISC::IMouseDevice::TAxisMode +
+
+ + + + + +
+   + + +

+

Enumeration values:
+ + + + +
Raw  +
Clamped  +
AxisModeLast  +
+
+ +

+Definition at line 42 of file mouse_device.h. +

+

00042 { Raw, Clamped, AxisModeLast };
+
+

+ + + + +
+ + +
enum NLMISC::IMouseDevice::TMessageMode +
+
+ + + + + +
+   + + +

+

Enumeration values:
+ + + + +
NormalMode  +
RawMode  +
MessageModeLast  +
+
+ +

+Definition at line 44 of file mouse_device.h. +

+

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + +
virtual void NLMISC::IInputDevice::begin CEventServer server  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+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 {}
+
+

+ + + + +
+ + + + + + + + + +
virtual uint NLMISC::IInputDevice::getBufferSize  )  const [pure virtual, inherited]
+
+ + + + + +
+   + + +

+Get the buffer size for this device. +

+

+

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

+ +

+Referenced by NL3D::CDriverGL::getDoubleClickDelay().

+

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

+retrieve what kinds of messages are sent +

+

+

+ + + + +
+ + + + + + + + + +
virtual uint NLMISC::IMouseDevice::getMouseAcceleration  )  const [pure virtual]
+
+ + + + + +
+   + + +

+Get the mouse acceleration. NB : invalid in raw message mode

+

+ + + + +
+ + + + + + + + + +
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::IInputDevice::poll CInputDeviceServer dev  )  [pure virtual, inherited]
+
+ + + + + +
+   + + +

+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.

+

+ + + + +
+ + + + + + + + + + +
virtual bool NLMISC::IInputDevice::setBufferSize uint  size  )  [pure virtual, inherited]
+
+ + + + + +
+   + + +

+Set the buffer size for this device (the number of samples it can retains). This return true if the size could be set

+

+ + + + +
+ + + + + + + + + + +
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
      +
    • Move 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::setMouseAcceleration uint  speed  )  [pure virtual]
+
+ + + + + +
+   + + +

+Set the mouse acceleration. It is the threshold in mickey, when start the acceleration. 0 means not acceleration. NB : invalid in raw message mode

+

+ + + + +
+ + + + + + + + + + +
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

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual void NLMISC::IInputDevice::submit IInputDeviceEvent deviceEvent,
CEventServer server
[pure virtual, inherited]
+
+ + + + + +
+   + + +

+For device server usage : Process an event (eventually update this device state), and translate the message to a IEventServerMessage

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
virtual void NLMISC::IInputDevice::transitionOccured CEventServer server,
const IInputDeviceEvent nextMessage
[inline, virtual, inherited]
+
+ + + + + +
+   + + +

+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 {}
+
+


The documentation for this struct was generated from the following file: +
Generated on Tue Mar 16 13:46:52 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1