SoWxMouse Class Reference
[Wx]

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

#include <Inventor/Wx/devices/SoWxMouse.h>

Inheritance diagram for SoWxMouse:
SoWxDevice

List of all members.

Public Member Functions

 SoWxMouse (EventMask mask=SO_WX_ALL_MOUSE_EVENTS)
 ~SoWxMouse ()
virtual void enable (wxWindow *w, XtEventHandler f, void *data, void *unused=NULL)
virtual void disable (wxWindow *w, XtEventHandler f, void *data)
virtual const SoEventtranslateEvent (wxEvent &event)

Detailed Description

VSG extension Translates and reports events for the mouse device.

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

SEE ALSO

SoWxDevice, SoLocation2Event, SoMouseButtonEvent SoMouseWheelEvent


Constructor & Destructor Documentation

SoWxMouse::SoWxMouse ( EventMask  mask = SO_WX_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 events

ButtonReleaseMask - Mouse up events

PointerMotionMask - Mouse motion with no buttons

ButtonMotionMask - Mouse motion with buttons pressed

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

SoWxMouse::~SoWxMouse (  ) 

Destructor.


Member Function Documentation

virtual void SoWxMouse::disable ( wxWindow *  w,
XtEventHandler  f,
void *  data 
) [virtual]

Disables the device for the passed widget.

Implements SoWxDevice.

virtual void SoWxMouse::enable ( wxWindow *  w,
XtEventHandler  f,
void *  data,
void *  unused = NULL 
) [virtual]

Enables the device for the passed widget.

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

Implements SoWxDevice.

virtual const SoEvent* SoWxMouse::translateEvent ( wxEvent &  anEvent  )  [virtual]

Attempts to convert the passed event 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 SoWxDevice.


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

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/