SoFocus

InventorModule

genre

Interaction

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

dll

SoUtils

definition

utils.def

see also

SoView2DBorder, SoView2DBorderHighlight

keywords

active, view, highlighting

Purpose

The module SoFocus detects whether a rendering subgraph has the focus. This information can be used for highlighting.

Usage

Add a SoFocus to every subgraph or viewer that should detect focus changes. On every click into the viewer, the associated SoFocus ‘steals’ the focus from the previously focused node.

The field Has focus indicates whether the subgraph has the focus. It can also be set by the user.

Normalized Click Coordinates stores the coordinates of the event that triggered the focus change. You can use those fields directly to manipulate the visualization.

However, it is better to use the SoFocusElement of the Open Inventor state in your modules (see SoView2DBorder for example). This element is set by the SoFocus module.

The focus is saved with your network!

The current implementation allows only one focus, even if several networks are opened.

Windows

Default Panel

../../../Modules/Inventor/SoUtils/mhelp/Images/Screenshots/SoFocus._default.png

Output Fields

self

name: self, type: SoNode

Parameter Fields

Visible Fields

Active

name: active, type: Bool, default: TRUE

If checked, the module is active.

Has focus

name: hasFocus, type: Bool, default: FALSE

Sets and shows whether the module has the focus.

Can also be used to set the focus.

Support mouse wheel events

name: supportWheelEvents, type: Bool, default: FALSE

Sets focus on mouse wheel events too.

Normalized Click Coordinates

name: normClickCoords, type: Vector2, persistent: no

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