MeVisLab Toolbox Reference
SoFocus.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef SO_FOCUS_H
14#define SO_FOCUS_H
15
16
19
20#include "SoUtilsSystem.h"
21#include "SoFocusElement.h"
22
23#include <Inventor/fields/SoSFVec2f.h>
24#include <Inventor/sensors/SoFieldSensor.h>
25
28class SOUTILS_EXPORT SoFocus : public SoNode
29{
31 SO_NODE_HEADER(SoFocus);
32
33public:
36
38 static void initClass();
39
41
44
47
50
56
58
62
65 void setFocusState(FocusState state, bool updateField = true);
66
67protected:
69 ~SoFocus() override;
70
73
76
77private:
78
80 SbFocusInfo _focusInfo;
81
84 static SoFocus* _focusNode;
85
87 void _freeFocus();
88
89};
90
91#endif // __SoFocus_H
92
93
FocusState
Administrates the current focus state.
#define SOUTILS_EXPORT
System dependent includes. Disables some compiler/linker warnings.
Class transporting focus information for one sub graph.
SoFocus is a general facility to detect focus changes.
Definition SoFocus.h:29
SoSFBool supportWheelEvents
Should this module support mouse wheel events?
Definition SoFocus.h:49
SoFocus()
Constructor.
void activeChanged(SoField *)
static void initClass()
Initializes this class (called on dll initialization).
SoSFVec2f normClickCoords
Display the normalized coordinates of the click event that caused the focus state.
Definition SoFocus.h:55
void hasFocusChanged(SoField *)
void handleEvent(SoHandleEventAction *action) override
handle event is reimplemented to handle the mouse events.
~SoFocus() override
Protected destructor.
SoSFBool active
! Fields
Definition SoFocus.h:43
void setFocusState(FocusState state, bool updateField=true)
Set focus state for this module.
SoSFBool hasFocus
Current state (has focus or has no focus).
Definition SoFocus.h:46
void GLRender(SoGLRenderAction *action) override
React to render action -> pass focus to state.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.