]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/MPRObjects.h
Widget integration (step 6/6): Interactive architecture finished. Needs to be tested...
[cpPlugins.git] / lib / cpExtensions / Visualization / MPRObjects.h
index 39e827f978aa80069e5df264a2a16b6c4bb9bde8..1920bb71a952352efee6717cc3782e5e1e051aee 100644 (file)
@@ -21,6 +21,11 @@ namespace cpExtensions
       typedef MPRObjects Self;
       typedef cpExtensions::Visualization::MPRActors TMPRActors;
 
+      typedef TMPRActors::TCursorCommand     TCursorCommand;
+      typedef TMPRActors::TMouseCommand      TMouseCommand;
+      typedef TMPRActors::TMouseWheelCommand TMouseWheelCommand;
+      typedef TMPRActors::TKeyCommand        TKeyCommand;
+
     public:
       vtkTypeMacro( MPRObjects, vtkObject );
 
@@ -28,6 +33,11 @@ namespace cpExtensions
       // Creation
       static MPRObjects* New( );
 
+      void AddCursorCommand( TCursorCommand command, void* data )
+      {
+        this->m_MPRActors->AddCursorCommand( command, data );
+      }
+
       void SetRenderWindows(
         vtkRenderWindow* wx, vtkRenderWindow* wy,
         vtkRenderWindow* wz, vtkRenderWindow* w3D
@@ -51,6 +61,15 @@ namespace cpExtensions
       TMPRActors* GetMPRActors( );
       const TMPRActors* GetMPRActors( ) const;
 
+      double GetWindow( ) const
+      {
+        return( this->m_MPRActors->GetWindow( ) );
+      }
+      double GetLevel( ) const
+      {
+        return( this->m_MPRActors->GetLevel( ) );
+      }
+
     protected:
       MPRObjects( );
       virtual ~MPRObjects( );
@@ -67,6 +86,13 @@ namespace cpExtensions
       // Internal pipelines
       vtkSmartPointer< TMPRActors >  m_MPRActors;
       vtkSmartPointer< vtkRenderer > m_Renderers[ 4 ];
+
+      std::vector< TCursorCommand >     CursorCommands;
+      std::vector< TMouseCommand >      MouseCommands;
+      std::vector< TMouseCommand >      MouseClickCommands;
+      std::vector< TMouseCommand >      MouseDoubleClickCommands;
+      std::vector< TMouseWheelCommand > MouseWheelCommands;
+      std::vector< TKeyCommand >        KeyCommands;
     };
 
   } // ecapseman