]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView2D.cxx
changes in vtkInteractorStyleBaseView2D. Check out the constructor of this class...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / vtkInteractorStyleBaseView2D.cxx
1
2
3 #include "vtkInteractorStyleBaseView2D.h"
4 #include <vtkObjectFactory.h>
5
6 vtkStandardNewMacro(vtkInteractorStyleBaseView2D);
7
8 //---------------------------------------------------------------------------
9 vtkInteractorStyleBaseView2D::vtkInteractorStyleBaseView2D()
10 {
11         ////////////
12         // RaC 04-2010 This mechanism of adding new functionalities has to be made externally in order 
13         // to maintain a plugin architecture. 
14         // Remember: The manualInteractorWindowLevel changes the window level over the image
15         //           The vtkInteractorScrollZ changes the slice with right click interaction
16         //                       This vtkInteractorStyleBaseView2D gives the minimal interaction with a 2D scene
17         //
18         // _manualinteractorwindowlevel= new manualInteractorWindowLevel();
19         // AddInteractorStyleMaracas( _manualinteractorwindowlevel );
20         //
21         // _vtkInteractorScrollZ = new vtkInteractorScrollZ();
22         // AddInteractorStyleMaracas(_vtkInteractorScrollZ);
23         ////////////
24 }
25 //---------------------------------------------------------------------------
26 vtkInteractorStyleBaseView2D::~vtkInteractorStyleBaseView2D()
27 {
28 }
29
30 //---------------------------------------------------------------------------
31 void  vtkInteractorStyleBaseView2D::SetInteractorScrollZ(vtkInteractorScrollZ* interactorScroll)
32 {    
33         _vtkInteractorScrollZ = interactorScroll;
34         AddInteractorStyleMaracas(_vtkInteractorScrollZ);
35 }
36
37 //---------------------------------------------------------------------------
38 void  vtkInteractorStyleBaseView2D::SetInteractorWindowLevel(manualInteractorWindowLevel* interactorWindowLevel)
39 {    
40         _manualinteractorwindowlevel = interactorWindowLevel;
41         AddInteractorStyleMaracas(_manualinteractorwindowlevel);
42 }
43
44 //---------------------------------------------------------------------------
45 void  vtkInteractorStyleBaseView2D::OnRightButtonDown()  // virtual
46 {    
47         vtkInteractorStyleBaseView::OnRightButtonDown();
48
49         if ((GetInteractor()->GetControlKey()==1) && (GetInteractor()->GetShiftKey()==0) ){
50                 this->vtkInteractorStyleImage::OnRightButtonDown();
51         }
52
53 }
54
55 //---------------------------------------------------------------------------
56 void  vtkInteractorStyleBaseView2D::OnRightButtonUp()  // virtual
57 {
58         vtkInteractorStyleBaseView::OnRightButtonUp();
59         this->vtkInteractorStyleImage::OnRightButtonUp();
60 }
61 //---------------------------------------------------------------------------
62 void  vtkInteractorStyleBaseView2D::OnMouseMove () // virtual
63 {
64         vtkInteractorStyleBaseView::OnMouseMove();
65         this->vtkInteractorStyleImage::OnMouseMove();
66 }
67 //---------------------------------------------------------------------------
68 void  vtkInteractorStyleBaseView2D::OnLeftButtonDown() // virtual
69 {
70         vtkInteractorStyleBaseView::OnLeftButtonDown();
71
72         if ((GetInteractor()->GetControlKey()==0) && (GetInteractor()->GetShiftKey()==1) )
73         {
74                 this->vtkInteractorStyleImage::OnLeftButtonDown();
75         }
76 }
77 //---------------------------------------------------------------------------
78 void  vtkInteractorStyleBaseView2D::OnLeftButtonUp () // virtual
79 {
80         vtkInteractorStyleBaseView::OnLeftButtonUp();
81
82         this->vtkInteractorStyleImage::OnLeftButtonUp();
83 }
84 //---------------------------------------------------------------------------
85 void  vtkInteractorStyleBaseView2D::OnMiddleButtonDown () // virtual
86 {
87         vtkInteractorStyleBaseView::OnMiddleButtonDown();
88
89         if ((GetInteractor()->GetControlKey()==1) || (GetInteractor()->GetShiftKey()==1) )
90         {
91                 this->vtkInteractorStyleImage::OnLeftButtonDown();
92         }
93 }
94 //---------------------------------------------------------------------------
95 void vtkInteractorStyleBaseView2D::OnMiddleButtonUp () // virtual
96 {
97         vtkInteractorStyleBaseView::OnMiddleButtonUp();
98
99         if ((GetInteractor()->GetControlKey()==1) || (GetInteractor()->GetShiftKey()==1) )
100         {
101                 this->vtkInteractorStyleImage::OnLeftButtonUp();
102         }
103 }
104