00001 00002 00003 #include "vtkInteractorStyleBaseView2D.h" 00004 #include <vtkObjectFactory.h> 00005 00006 vtkStandardNewMacro(vtkInteractorStyleBaseView2D); 00007 00008 //--------------------------------------------------------------------------- 00009 vtkInteractorStyleBaseView2D::vtkInteractorStyleBaseView2D() 00010 { 00011 _manualinteractorwindowlevel= new manualInteractorWindowLevel(); 00012 AddInteractorStyleMaracas( _manualinteractorwindowlevel ); 00013 00014 _vtkInteractorScrollZ = new vtkInteractorScrollZ(); 00015 AddInteractorStyleMaracas(_vtkInteractorScrollZ); 00016 00017 } 00018 //--------------------------------------------------------------------------- 00019 vtkInteractorStyleBaseView2D::~vtkInteractorStyleBaseView2D() 00020 { 00021 } 00022 00023 //--------------------------------------------------------------------------- 00024 void vtkInteractorStyleBaseView2D::OnRightButtonDown() // virtual 00025 { 00026 vtkInteractorStyleBaseView::OnRightButtonDown(); 00027 00028 if ((GetInteractor()->GetControlKey()==1) && (GetInteractor()->GetShiftKey()==0) ){ 00029 this->vtkInteractorStyleImage::OnRightButtonDown(); 00030 } 00031 00032 } 00033 00034 //--------------------------------------------------------------------------- 00035 void vtkInteractorStyleBaseView2D::OnRightButtonUp() // virtual 00036 { 00037 vtkInteractorStyleBaseView::OnRightButtonUp(); 00038 this->vtkInteractorStyleImage::OnRightButtonUp(); 00039 } 00040 //--------------------------------------------------------------------------- 00041 void vtkInteractorStyleBaseView2D::OnMouseMove () // virtual 00042 { 00043 vtkInteractorStyleBaseView::OnMouseMove(); 00044 this->vtkInteractorStyleImage::OnMouseMove(); 00045 } 00046 //--------------------------------------------------------------------------- 00047 void vtkInteractorStyleBaseView2D::OnLeftButtonDown() // virtual 00048 { 00049 vtkInteractorStyleBaseView::OnLeftButtonDown(); 00050 00051 if ((GetInteractor()->GetControlKey()==0) && (GetInteractor()->GetShiftKey()==1) ) 00052 { 00053 this->vtkInteractorStyleImage::OnLeftButtonDown(); 00054 } 00055 } 00056 //--------------------------------------------------------------------------- 00057 void vtkInteractorStyleBaseView2D::OnLeftButtonUp () // virtual 00058 { 00059 vtkInteractorStyleBaseView::OnLeftButtonUp(); 00060 00061 this->vtkInteractorStyleImage::OnLeftButtonUp(); 00062 } 00063 //--------------------------------------------------------------------------- 00064 void vtkInteractorStyleBaseView2D::OnMiddleButtonDown () // virtual 00065 { 00066 vtkInteractorStyleBaseView::OnMiddleButtonDown(); 00067 00068 if ((GetInteractor()->GetControlKey()==1) || (GetInteractor()->GetShiftKey()==1) ) 00069 { 00070 this->vtkInteractorStyleImage::OnLeftButtonDown(); 00071 } 00072 } 00073 //--------------------------------------------------------------------------- 00074 void vtkInteractorStyleBaseView2D::OnMiddleButtonUp () // virtual 00075 { 00076 vtkInteractorStyleBaseView::OnMiddleButtonUp(); 00077 00078 if ((GetInteractor()->GetControlKey()==1) || (GetInteractor()->GetShiftKey()==1) ) 00079 { 00080 this->vtkInteractorStyleImage::OnLeftButtonUp(); 00081 } 00082 } 00083