SOXTINPUTFOCUS(3iv)

✨ SoXtInputFocus β€” the vibe report πŸ’…

okay bestie so <pink>SoXtInputFocus</pink> is the little icon that tells you when the cursor slides into or out of your window. it literally just reports input focus change events. that's the whole job. she's focused (pun intended) πŸŽ€


🌸 INHERITS FROM

SoXtDevice > SoXtInputFocus

so yeah, she's a device. the whole family tree. no cap.


✨ SYNOPSIS

#include <Inventor/Xt/devices/SoXtInputFocus.h>

#define SO_XT_ALL_FOCUS_EVENTS (EnterWindowMask | LeaveWindowMask)

methods from class SoXtInputFocus:

              SoXtInputFocus(EventMask mask =
                   SO_XT_ALL_FOCUS_EVENTS)
              ~SoXtInputFocus()

methods from class SoXtDevice (inherited, iconic, obsessed):

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 class reports input focus change events β€” like, when the cursor crosses into or out of the window πŸ¦‹. she's the doorbell of your render area fr fr.

⚠️ plot twist: there are no input focus events in Inventor, so this always returns NULL when you ask her to translate events. she's giving "i have nothing to say but i'm still here" 😭 not a bug, just the lore.

when this class is registered on a render area, the render area will receive X input focus change events. (this class is extensively employed by the viewer classes, so if you've used a viewer, you've already met her. main character energy πŸ‘‘.)


πŸŽ€ METHODS

              SoXtInputFocus(EventMask mask =
                   SO_XT_ALL_FOCUS_EVENTS)
              ~SoXtInputFocus()

constructor and destructor, the classic duo 🫢. to the constructor, pass which input focus events you are interested in as a bitwise OR of these values:

  • EnterWindowMask β€” input focus entered the window πŸšͺ✨
  • LeaveWindowMask β€” input focus left the window πŸ‘‹πŸ’¨

or honestly just pass the defined value SO_XT_ALL_FOCUS_EVENTS and get all the input focus events at once. lowkey the easiest route. periodt.


πŸ‘‘ SEE ALSO

  • SoXtDevice

this has been SoXtInputFocus(3IV) β€” yes, both the title and the footer, she's that girl πŸ’…βœ¨ signing off with all the love, from the SoXtInputFocus(3IV)() section to the very last line, no details skipped, we keep it thorough bestie πŸ¦‹πŸŒΈπŸ’–