SoWxDevice Class Reference
[Wx]

VSG extension Abstract base class for input devices. More...

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

Inheritance diagram for SoWxDevice:
SoWxKeyboard SoWxMouse

List of all members.

Public Member Functions

virtual void enable (wxWindow *w, XtEventHandler f, void *data, void *unused=NULL)=0
virtual void disable (wxWindow *w, XtEventHandler f, void *data)=0
virtual const SoEventtranslateEvent (wxEvent &anEvent)=0
void setWindowSize (const SbVec2s &s)
const SbVec2sgetWindowSize () const

Detailed Description

VSG extension Abstract base class for input devices.

This is the abstract base class for devices in the Open Inventor Windows component and utility library. When a device is registered with an SoWxRenderArea, the device is able to generate messages in the render area window.

Used internally by SoWxRenderArea and derived classes. Can also be used by the application to translate system events into SoEvent objects.

SEE ALSO

SoWxMouse, SoWxKeyboard, SoWxRenderArea


Member Function Documentation

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

Disables the device for the passed widget.

Implemented in SoWxKeyboard, and SoWxMouse.

virtual void SoWxDevice::enable ( wxWindow *  w,
XtEventHandler  f,
void *  data,
void *  unused = NULL 
) [pure 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.

Implemented in SoWxKeyboard, and SoWxMouse.

const SbVec2s& SoWxDevice::getWindowSize (  )  const [inline]

Gets the size of the window this device is registered for.

void SoWxDevice::setWindowSize ( const SbVec2s s  )  [inline]

Sets the size of the window this device is registered for.

This allows the device to correctly convert position information from X window coordinates (origin at top left) to Open Inventor window coordinates (origin at bottom left). (SoWxRenderArea will automatically call this method for each device registered on it whenever the window size changes.) Note: Setting the window size only affects the size as perceived by the device and not the actual window size.

virtual const SoEvent* SoWxDevice::translateEvent ( wxEvent &  anEvent  )  [pure 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.

Implemented in SoWxKeyboard, and SoWxMouse.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/