]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/BaseObjects/Widget.h
Cast image filter added. ROI filter modified.
[cpPlugins.git] / lib / cpPlugins / BaseObjects / Widget.h
index 1451b7b0f1ae16aa2dee0456cb7e31ed3f8e1faf..8cfec87e115af6a477f0dfc18005962ff355c41c 100644 (file)
@@ -2,6 +2,7 @@
 #define __cpPlugins__BaseObjects__Widget__h__
 
 #include <cpPlugins/BaseObjects/ProcessObject.h>
+#include <vtkRenderWindowInteractor.h>
 
 // -------------------------------------------------------------------------
 namespace cpPlugins
@@ -24,14 +25,14 @@ namespace cpPlugins
       cpPlugins_Id_Macro( Widget, Object );
 
     public:
-      virtual itk::ModifiedTimeType GetMTime( ) const cpPlugins_OVERRIDE;
-
+      virtual void AddInteractor( vtkRenderWindowInteractor* i ) cpPlugins_OVERRIDE;
       virtual bool IsInteractive( ) cpPlugins_OVERRIDE;
 
       virtual void EnabledOn( );
       virtual void EnabledOff( );
       virtual void Clear( ) = 0;
       virtual void SetEnabled( bool v ) = 0;
+      virtual bool GetEnabled( ) const = 0;
 
     protected:
       Widget( );
@@ -41,6 +42,18 @@ namespace cpPlugins
       // Purposely not implemented
       Widget( const Self& );
       Self& operator=( const Self& );
+
+    protected:
+      typedef vtkSmartPointer< vtkRenderWindowInteractor > _TInteractor;
+      struct _TInteractorCmp
+      {
+        bool operator()(
+          const _TInteractor& a, const _TInteractor& b
+          ) const
+          { return( a.GetPointer( ) < b.GetPointer( ) ); }
+      };
+      std::set< _TInteractor, _TInteractorCmp > m_Interactors;
+
     };
 
   } // ecapseman