MeVisLab Toolbox Reference
SoFocus Class Reference

SoFocus is a general facility to detect focus changes. More...

#include <SoFocus.h>

Inheritance diagram for SoFocus:

Public Member Functions

 SoFocus ()
 Constructor.
 
void handleEvent (SoHandleEventAction *action) override
 handle event is reimplemented to handle the mouse events.
 
void setFocusState (FocusState state, bool updateField=true)
 Set focus state for this module.
 

Static Public Member Functions

static void initClass ()
 Initializes this class (called on dll initialization).
 

Public Attributes

SoSFBool active
 ! Fields
 
SoSFBool hasFocus
 Current state (has focus or has no focus).
 
SoSFBool supportWheelEvents
 Should this module support mouse wheel events?
 
SoSFVec2f normClickCoords
 Display the normalized coordinates of the click event that caused the focus state.
 

Protected Member Functions

 ~SoFocus () override
 Protected destructor.
 
void hasFocusChanged (SoField *)
 
void activeChanged (SoField *)
 
void GLRender (SoGLRenderAction *action) override
 React to render action -> pass focus to state.
 

Detailed Description

SoFocus is a general facility to detect focus changes.

The information, if a sub graph has the focus, is passed to the inventor state. SoFocus is a general facility to detect focus changes. The information, if a sub graph has the focus, is passed to the inventor state.

Definition at line 28 of file SoFocus.h.

Constructor & Destructor Documentation

◆ SoFocus()

SoFocus::SoFocus ( )

Constructor.

◆ ~SoFocus()

SoFocus::~SoFocus ( )
overrideprotected

Protected destructor.

Member Function Documentation

◆ activeChanged()

void SoFocus::activeChanged ( SoField * )
protected

◆ GLRender()

void SoFocus::GLRender ( SoGLRenderAction * action)
overrideprotected

React to render action -> pass focus to state.

◆ handleEvent()

void SoFocus::handleEvent ( SoHandleEventAction * action)
override

handle event is reimplemented to handle the mouse events.

The events are not consumed, so that following modules in the scene graph can handle them.

◆ hasFocusChanged()

void SoFocus::hasFocusChanged ( SoField * )
protected

◆ initClass()

static void SoFocus::initClass ( )
static

Initializes this class (called on dll initialization).

◆ setFocusState()

void SoFocus::setFocusState ( FocusState state,
bool updateField = true )

Set focus state for this module.

If updateField is true, the field "hasFocus" is updated.

Member Data Documentation

◆ active

SoSFBool SoFocus::active

! Fields

Should this module change the focus state?

Definition at line 43 of file SoFocus.h.

◆ hasFocus

SoSFBool SoFocus::hasFocus

Current state (has focus or has no focus).

Definition at line 46 of file SoFocus.h.

◆ normClickCoords

SoSFVec2f SoFocus::normClickCoords

Display the normalized coordinates of the click event that caused the focus state.

This is useful if one Viewer has several regions that should be activated separately. For example, if a SoView2d has more than 1 slice, SoView2DBorder is drawn several times. normClickCoords can be used to determine which border should be highlighted.

Definition at line 55 of file SoFocus.h.

◆ supportWheelEvents

SoSFBool SoFocus::supportWheelEvents

Should this module support mouse wheel events?

Definition at line 49 of file SoFocus.h.


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