Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoXtInputFocus Class Reference

Reports input focus change events. More...

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

+ Inheritance diagram for SoXtInputFocus:

Public Member Functions

 SoXtInputFocus (EventMask mask=SO_XT_ALL_FOCUS_EVENTS)
 Constructor.
 
 ~SoXtInputFocus ()
 Destructor.
 
virtual void enable (SoWidget w, XtEventHandler f, XtPointer data, Window win=(Window) NULL)
 Enables the device for the passed widget.
 
virtual void disable (SoWidget w, XtEventHandler f, XtPointer data)
 Disables the device for the passed widget.
 
virtual const SoEventtranslateEvent (XAnyEvent *xevent)
 Attempts to convert the passed event into an SoEvent.
 
- Public Member Functions inherited from SoXtDevice
void setWindowSize (const SbVec2s &s)
 Sets the size of the window this device is registered for.
 
const SbVec2sgetWindowSize () const
 Gets the size of the window this device is registered for.
 
virtual ~SoXtDevice ()
 

Detailed Description

Reports input focus change events.

This class reports input focus change events (i.e. when the cursor crosses into or out of the window). There are no input focus event in Open Inventor, so this always returns NULL when asked to translate events. 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.)

SEE ALSO

SoXtDevice

Definition at line 86 of file SoXtInputFocus.h.

Constructor & Destructor Documentation

◆ SoXtInputFocus()

SoXtInputFocus::SoXtInputFocus ( EventMask  mask = SO_XT_ALL_FOCUS_EVENTS)

Constructor.

To the constructor, pass which input focus events you are interested in as a bitwise OR of the following values:

EnterWindowMask - Input focus entered the window.

LeaveWindowMask - Input focus left the window

Or simply pass the defined value SO_XT_ALL_FOCUS_EVENTS for all input focus events.

◆ ~SoXtInputFocus()

SoXtInputFocus::~SoXtInputFocus ( )
inline

Destructor.

Definition at line 103 of file SoXtInputFocus.h.

Member Function Documentation

◆ disable()

virtual void SoXtInputFocus::disable ( SoWidget  w,
XtEventHandler  f,
XtPointer  data 
)
virtual

Disables the device for the passed widget.

Implements SoXtDevice.

◆ enable()

virtual void SoXtInputFocus::enable ( SoWidget  w,
XtEventHandler  f,
XtPointer  data,
Window  win = (Window) 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 SoXtDevice.

◆ translateEvent()

virtual const SoEvent * SoXtInputFocus::translateEvent ( XAnyEvent *  xevent)
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 SoXtDevice.


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