MeVisLabToolboxReference
MeVisLab/Standard/Sources/Inventor/SoUtils/SoToggle.h
Go to the documentation of this file.
00001 #ifndef __SoToggle_H
00002 #define __SoToggle_H
00003 //----------------------------------------------------------------------------------
00004 // **InsertLicense** code
00005 //----------------------------------------------------------------------------------
00007 
00012 //----------------------------------------------------------------------------------
00013 
00014 
00015 #include "SoUtilsSystem.h"
00016 
00017 #include "XVEnterScope.h"
00018 
00019 #include <Inventor/nodes/SoSubNode.h>
00020 #include <Inventor/nodes/SoSwitch.h>
00021 #include <Inventor/sensors/SoFieldSensor.h>
00022 #include <Inventor/fields/SoSFBool.h>
00023 
00024 #include "XVLeaveScope.h"
00025 
00026 //--------- disable VC++ warnings---------
00027 #ifdef WIN32
00028 #pragma warning (disable : 4355)
00029 #pragma warning (disable : 4275)
00030 #pragma warning (disable : 4251)
00031 #endif
00032 
00033 //=============================================================
00037 //=============================================================
00038 class SOUTILS_EXPORT SoToggle : public SoSwitch {
00039 
00040   SO_NODE_HEADER(SoToggle);
00041 
00042 public:
00044   SoSFBool on;
00045 
00046   SoToggle();
00047   static void    initClass();
00048 
00050   void onChanged();
00051   static void onChangedCB(void *data, SoSensor* a);
00052 
00053 private:
00054   virtual ~SoToggle();
00055 
00056   SoFieldSensor* _sensor;
00057 };
00058 
00059 #endif