MeVisLabToolboxReference
|
00001 #ifndef __SoView2DInteractionExtension_H 00002 #define __SoView2DInteractionExtension_H 00003 //---------------------------------------------------------------------------------- 00004 // **InsertLicense** code 00005 //---------------------------------------------------------------------------------- 00009 00015 //---------------------------------------------------------------------------------- 00016 00017 #ifndef __SoView2DSystem_H 00018 #include "SoView2DSystem.h" 00019 #endif 00020 00021 #ifndef __SoView2DExtension_H 00022 #include "SoView2DExtension.h" 00023 #endif 00024 #ifndef __SoPointerPosition_H 00025 #include <SoPointerPosition.h> 00026 #endif 00027 #ifndef __View2DPosition_H 00028 #include "View2DPosition.h" 00029 #endif 00030 00031 #include "XVEnterScope.h" 00032 00033 #include "XVLeaveScope.h" 00034 00035 class SoView2DGenericPointingAction; 00036 00037 //============================================================= 00041 //============================================================= 00042 class SOVIEW2D_API SoView2DInteractionExtension : public SoView2DExtension 00043 { 00044 friend class SoView2DGenericPointingAction; 00045 00046 SO_NODE_ABSTRACT_HEADER(SoView2DInteractionExtension); 00047 00048 public: 00049 SoView2DInteractionExtension(const std::string& actionID, bool positionSensitive = true); 00050 00052 static void initClass(); 00053 00055 SoView2DInteractionExtension(); 00056 00058 virtual void fieldChanged(SoSensor* sensor); 00059 00062 virtual bool implementsManagedInteractionAndClassicEventHandling() const { return true; } 00063 00064 protected: 00066 virtual ~SoView2DInteractionExtension(); 00067 00069 bool isValidLocation(const SoPointerPosition& pos); 00070 00072 00073 virtual int getCurrentCursor(SoViewerProxy* viewerProxy); 00074 virtual bool isSensitiveAt(const SoPointerPosition& /*pos*/); 00075 virtual void setHighlightAt(const SoPointerPosition& /*pos*/) {} 00076 virtual void unsetHighlight() {} 00077 virtual void startPressAt(const SoPointerPosition& /*pos*/) {} 00078 virtual void dragMoveTo(const SoPointerPosition& /*pos*/) {} 00079 virtual SoPointingAction* endPress(int /*clickCount*/) { return NULL; } 00080 virtual int getNumInteractionModes() const { return 1; } 00081 virtual void setInteractionMode(int /*mode*/) {} 00083 00084 SoPointingAction* _pointingAction; 00085 }; 00086 00087 #endif