]> Creatis software - creaContours.git/blobdiff - lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx
*** empty log message ***
[creaContours.git] / lib / Interface_ManagerContour_NDimensions / wxVtkBaseView_SceneManager.cxx
index 2a33f4a1ecc6966990bcb1f397018b1ba0cee35f..3d65b286f89258637ee757a8aeb585d2f602dc1a 100644 (file)
@@ -57,6 +57,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
                _creatingROI                                    = false;
                _drawingSelectionROI                    = false;
 
+               
                _wxVtk_BaseView = theWxBaseViewToManage;
                if( _wxVtk_BaseView!=NULL )
                {
@@ -660,51 +661,67 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
        // Inherited Methods
        //------------------------------------------------------------------------------------------------------------
 
+       bool  wxVtkBaseView_SceneManager :: isCtrlPressed()
+       { 
+               return _ctrlKey;
+       }
+       bool  wxVtkBaseView_SceneManager :: isShiftPressed()
+       { 
+               return _shiftKey;
+       }
+       char  wxVtkBaseView_SceneManager :: getLastKeyCode()
+       { 
+               return _lastKeyCode;
+       }
        bool  wxVtkBaseView_SceneManager :: OnChar()
        { 
 
-               bool ctrlKey = _vtkInteractorStyleBaseView->GetInteractor()->GetControlKey() == 1;
-               bool shiftKey = _vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey() == 1;
+               _ctrlKey = _vtkInteractorStyleBaseView->GetInteractor()->GetControlKey() == 1;
+               _shiftKey = _vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey() == 1;
 
                _lastKeyCode = _vtkInteractorStyleBaseView->GetInteractor()-> GetKeyCode();
+
+               wxCommandEvent cevent( wxEVT_COMMAND_BUTTON_CLICKED );
+               _eventHandler->ProcessEvent( cevent );
                
-               
-               if( _eventHandler!=NULL )
+                               
+               /*if( _eventHandler!=NULL )
                {
-                       const char * toolCommand = NULL;
+                       char * toolCommand = NULL;
 
                        if ( _lastKeyCode == 3 && ctrlKey ) //'C' || 'c' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::COPY_TOOL);
+                               toolCommand = &(COPY_TOOL);
                        }
                        else if(  _lastKeyCode == 22 && ctrlKey ) //'V' || 'v' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::PASTE_TOOL);
+                               toolCommand = &(PASTE_TOOL);
                        }
                        else if(  _lastKeyCode == 8 || (_lastKeyCode==127) ) // Delete 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::DELETE_KEY);
+                               toolCommand = &(DELETE_KEY);
                        }
                        else if(  _lastKeyCode == 14 && ctrlKey ) //'N' || 'n' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::CREATE_CONTOUR_KEY);
+                               toolCommand = &(CREATE_CONTOUR_KEY);
                        }
                        else if(  _lastKeyCode == 15 && ctrlKey ) //'O' || 'o' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::OPEN_TOOL);
+                               toolCommand = &(OPEN_TOOL);
                        }
                        else if(  _lastKeyCode == 19 && ctrlKey ) //'S' || 's' 
                        {
-                               toolCommand = &(wxContour_ActionCommandsID::SAVE_KEY);
+                               toolCommand = &(SAVE_KEY);
                        }
 
                        if ( toolCommand!=NULL )
                        {
+                               currentkey = toolCommand;
                                wxCommandEvent cevent( wxEVT_COMMAND_BUTTON_CLICKED );
                                cevent.SetClientData( (void *) toolCommand);
                                _eventHandler->ProcessEvent( cevent );
                        }                               
-               }
+               }*/
                
        
        //      long int endtime = clock();