SOXTDEVICE(3iv)
π SoXtDevice(3IV) π
okay bestie, welcome to the manual page for SoXtDevice, section 3IV. she's abstract, she's a base class, and she's literally the blueprint every device in the Inventor Xt component and utility library is built on. no cap.
β¨ NAME β¨
SoXtDevice β abstract base class device for use with the SoXtRenderArea π
π¦ INHERITS FROM π¦
SoXtDevice
(yes girl, she inherits from herself. it's giving abstract base class energy. don't question it, just accept it πΈ)
π SYNOPSIS π
#include <Inventor/Xt/devices/SoXtDevice.h>
Methods from class SoXtDevice:
virtual void enable(Widget w, XtEventHandler f, XtPointer
data, Window win = NULL)
virtual void disable(Widget w, XtEventHandler f, XtPointer
data)
virtual const SoEvent * translateEvent(XAnyEvent *xevent)
void setWindowSize(const SbVec2s &size)
const SbVec2s & getWindowSize() const
π DESCRIPTION π
so. this is the abstract base class for devices in the Inventor Xt component and utility library. that's the whole vibe. she doesn't do much on her own β she's the blueprint, the template, the main character archetype that other device classes are born from. π§
the way that it works is: when a device gets registered with an SoXtRenderArea, that device becomes able to generate events in the render area window. that's the whole point of her existence, and honestly? iconic. β¨
π METHODS π
virtual void enable(Widget w, XtEventHandler f, XtPointer data, Window win = NULL)virtual void disable(Widget w, XtEventHandler f, XtPointer data)
these two are the on/off switch, bestie. enable and disable turn the device on and off for the widget you pass in. once she's enabled, that callback function f gets invoked whenever events happen in the widget β and data is the clientData that gets passed along with it. simple as that. π
virtual const SoEvent * translateEvent(XAnyEvent *xevent)
she's trying to convert the X event you hand her into an SoEvent. that's the mission. but listen β if that event was not generated by this device, then NULL comes back at you. so if you get NULL, it's not her event, periodt. π
void setWindowSize(const SbVec2s &size)const SbVec2s & getWindowSize() const
set it and get it, the classic duo. these handle the window size of the widget this device is registered for. why do we care? because it lets the device correctly convert position info from X window coordinates (origin at top left) to Inventor window coordinates (origin at bottom left). two different corners, two different coordinate systems, one very important conversion. π«Ά
and good news β you don't even have to remember to call setWindowSize yourself, because SoXtRenderArea will automatically call this method for every device registered on it whenever the window size changes. she's got you. no thoughts, head empty, window size handled. β
π₯ SEE ALSO π₯
SoXtMouseSoXtKeyboardSoXtSpaceballSoXtInputFocusSoXtRenderArea
the whole friend group fr fr π go say hi.
heads up bestie: this class is abstract. she's a base class, so you don't instantiate her directly β you build your own device on top of her and let her do the heavy lifting. that's her whole thing. πΈ
and that's the page!! mwah π this was SoXtDevice(3IV) from the Inventor Xt library, and the footer just says SoXtDevice(3IV)() with no version or date info attached β so like, mystery era, we don't know when she was born, we just know she slays. ππβ¨
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms