Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoWinMouse Class Reference

VSG extension Translates and reports messages for the mouse device. More...

#include <Inventor/Win/devices/SoWinMouse.h>

+ Inheritance diagram for SoWinMouse:

Public Member Functions

 SoWinMouse (EventMask mask=SO_WIN_ALL_MOUSE_EVENTS)
 Constructor.
 
 ~SoWinMouse ()
 Destructor.
 
virtual void enable (SoWidget w, XtEventHandler f, XtPointer data, Window win=NULL)
 Enables the device for the passed window handle.
 
virtual void disable (SoWidget w, XtEventHandler f, XtPointer data)
 Disables the device.
 
virtual const SoEventtranslateEvent (XAnyEvent *xevent)
 Attempts to convert the passed message into an SoEvent.
 
- Public Member Functions inherited from SoWinDevice
void setWindowSize (const SbVec2s &s)
 Sets the size of the window this device is registered for.
 
const SbVec2sgetWindowSize () const
 Gets the size of the window this device is registered for.
 

Detailed Description

VSG extension Translates and reports messages for the mouse device.

This class translates and manages messages generated by the mouse, including mouse motion (SoLocation2Event), and mouse button press and release messages (SoMouseButtonEvent).

SEE ALSO

SoWinDevice, SoLocation2Event, SoMouseButtonEvent

Definition at line 56 of file SoWinMouse.h.

Constructor & Destructor Documentation

◆ SoWinMouse()

SoWinMouse::SoWinMouse ( EventMask  mask = SO_WIN_ALL_MOUSE_EVENTS)

Constructor.

To the constructor, pass which mouse messages you are interested in as a bitwise OR of the following values:

ButtonPressMask - Mouse down messages

ButtonReleaseMask - Mouse up messages

PointerMotionMask - Mouse motion with no buttons

ButtonMotionMask - Mouse motion with buttons pressed

Or simply pass the defined value SO_WIN_ALL_MOUSE_EVENTS for all mouse messages. The device will only report messages of this type for the window it is enabled on.

◆ ~SoWinMouse()

SoWinMouse::~SoWinMouse ( )

Destructor.

Member Function Documentation

◆ disable()

virtual void SoWinMouse::disable ( SoWidget  w,
XtEventHandler  f,
XtPointer  data 
)
virtual

Disables the device.

Implements SoWinDevice.

◆ enable()

virtual void SoWinMouse::enable ( SoWidget  w,
XtEventHandler  f,
XtPointer  data,
Window  win = NULL 
)
virtual

Enables the device for the passed window handle.

When enabled, the callback function f will be invoked when messages occur in the window. data is the clientData which will be passed.

Implements SoWinDevice.

◆ translateEvent()

virtual const SoEvent * SoWinMouse::translateEvent ( XAnyEvent *  xevent)
virtual

Attempts to convert the passed message into an SoEvent.


Returns a pointer to an internal SoEvent object owned by the class. Do not delete this object. If the message was not generated by this device, then NULL is returned.

Implements SoWinDevice.


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