| 1 |
NAME SoXtDevice SoXtDev "" { |
| 2 |
abstract base class device for use with the \cSoXtRenderArea\. |
| 3 |
} |
| 4 |
|
| 5 |
INCLUDE Xt/devices/SoXtDevice.h |
| 6 |
|
| 7 |
DESC { |
| 8 |
This is the abstract base class for devices in the Inventor Xt component |
| 9 |
and utility library. When a device is registered with an |
| 10 |
\cSoXtRenderArea\., the device is able to generate events in the |
| 11 |
render area window. |
| 12 |
} |
| 13 |
|
| 14 |
METHOD "" virtual void enable(Widget w, XtEventHandler f, XtPointer data, |
| 15 |
Window win = NULL) {} |
| 16 |
METHOD "" virtual void disable(Widget w, XtEventHandler f, XtPointer data) |
| 17 |
{ |
| 18 |
Enable and disable the device for the passed widget. When enabled, the |
| 19 |
callback function \af\. will be invoked when events occur in the widget. |
| 20 |
\adata\. is the \aclientData\. which will be passed. |
| 21 |
} |
| 22 |
|
| 23 |
METHOD xlateEv virtual const SoEvent * translateEvent(XAnyEvent *xevent) |
| 24 |
{ |
| 25 |
This attempts to convert the passed X event into an \cSoEvent\.. |
| 26 |
If the event was not generated by this device, then NULL is returned. |
| 27 |
} |
| 28 |
|
| 29 |
METHOD setWinSize void setWindowSize(const SbVec2s &size) {} |
| 30 |
METHOD getWinSize const SbVec2s & getWindowSize() const { |
| 31 |
Set and get the window size of the widget this device is registered for. |
| 32 |
This allows the device to correctly convert position information from |
| 33 |
X window coordinates (origin at top left) to Inventor window |
| 34 |
coordinates (origin at bottom left). (\cSoXtRenderArea\. will automatically |
| 35 |
call this method for each device registered on it whenever the window |
| 36 |
size changes.) |
| 37 |
} |
| 38 |
|
| 39 |
ALSO { SoXtMouse, SoXtKeyboard, SoXtSpaceball, SoXtInputFocus, |
| 40 |
SoXtRenderArea } |