MeVisLab Resolution Independence API
SoToggle.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_TOGGLE_H
14#define SO_TOGGLE_H
15
16
18
19#include "SoUtilsSystem.h"
20
21#include <Inventor/nodes/SoSubNode.h>
22#include <Inventor/nodes/SoSwitch.h>
23#include <Inventor/sensors/SoFieldSensor.h>
24#include <Inventor/fields/SoSFBool.h>
25#include <Inventor/fields/SoSFTrigger.h>
26
27//--------- disable VC++ warnings---------
28#ifdef WIN32
29#pragma warning (disable : 4355)
30#pragma warning (disable : 4275)
31#pragma warning (disable : 4251)
32#endif
33
34//=============================================================
37
38//=============================================================
39class SOUTILS_EXPORT SoToggle : public SoSwitch {
40
41 SO_NODE_HEADER(SoToggle);
42
43public:
45 SoSFBool on;
46
48 SoSFTrigger toggle;
49
51 static void initClass();
52
54 void onChanged(SoField* field);
55
57 void onToggle(SoField* field);
58
59private:
60 ~SoToggle() override;
61};
62
63#endif
#define SOUTILS_EXPORT
System dependent includes. Disables some compiler/linker warnings.
SoToggle is a SoSwitch node that has a boolean field to toggle the underlying scene graph on/off.
Definition SoToggle.h:39
SoSFBool on
switches contained scenegraph on/off
Definition SoToggle.h:45
SoSFTrigger toggle
toggles 'on' field
Definition SoToggle.h:48
void onToggle(SoField *field)
called when toggle is touched
static void initClass()
void onChanged(SoField *field)
called when the on field changes