2 #include "wxVTKRenderWindowInteractorPlus.h"
3 #include "vtkInteractorStyleBaseView.h"
5 BEGIN_EVENT_TABLE( wxVTKRenderWindowInteractorPlus, wxVTKRenderWindowInteractor )
6 EVT_LEFT_DCLICK( wxVTKRenderWindowInteractorPlus::OnLeftDClick )
7 EVT_RIGHT_DCLICK( wxVTKRenderWindowInteractorPlus::OnRightDClick )
8 EVT_MIDDLE_DCLICK( wxVTKRenderWindowInteractorPlus::OnMiddleDClick )
9 EVT_MOUSEWHEEL( wxVTKRenderWindowInteractorPlus::OnMouseWheel )
12 //-------------------------------------------------------------------
13 wxVTKRenderWindowInteractorPlus::wxVTKRenderWindowInteractorPlus()
14 : wxVTKRenderWindowInteractor()
19 //-------------------------------------------------------------------
20 wxVTKRenderWindowInteractorPlus::wxVTKRenderWindowInteractorPlus(wxWindow *parent, wxVtkBaseView *wxvtkbaseview)
21 : wxVTKRenderWindowInteractor(parent, -1)
23 _wxvtkbaseview = wxvtkbaseview;
26 //-------------------------------------------------------------------
27 wxVTKRenderWindowInteractorPlus::~wxVTKRenderWindowInteractorPlus()
31 //---------------------------------------------------------------------------
32 wxVTKRenderWindowInteractorPlus * wxVTKRenderWindowInteractorPlus::New()
34 // we don't make use of the objectfactory, because we're not registered
35 return new wxVTKRenderWindowInteractorPlus;
38 //-------------------------------------------------------------------
39 void wxVTKRenderWindowInteractorPlus::OnLeftDClick( wxMouseEvent& event )
43 wxvtkbaseview->GetInteractorStyleBaseView()->OnLeftDClick();
45 ((vtkInteractorStyleBaseView*)_wxvtkbaseview->GetInteractorStyleBaseView())->OnLeftDClick();
47 //-------------------------------------------------------------------
48 void wxVTKRenderWindowInteractorPlus::OnRightDClick( wxMouseEvent& event )
52 _wxvtkbaseview->GetInteractorStyleBaseView()->OnRightDClick();
54 ((vtkInteractorStyleBaseView*)_wxvtkbaseview->GetInteractorStyleBaseView())->OnRightDClick();
56 //-------------------------------------------------------------------
57 void wxVTKRenderWindowInteractorPlus::OnMiddleDClick( wxMouseEvent& event )
62 _wxvtkbaseview->GetInteractorStyleBaseView()->OnMiddleDClick();
64 ((vtkInteractorStyleBaseView*)_wxvtkbaseview->GetInteractorStyleBaseView())->OnMiddleDClick();
66 //-------------------------------------------------------------------
67 void wxVTKRenderWindowInteractorPlus::OnMouseWheel( wxMouseEvent& event )
72 _wxvtkbaseview->GetInteractorStyleBaseView()->OnMouseWheel();
75 if(event.GetWheelRotation() > 0)
78 //EED InvokeEvent(vtkCommand::MouseWheelForwardEvent, NULL);
79 ((vtkInteractorStyleBaseView*)_wxvtkbaseview->GetInteractorStyleBaseView())->OnMouseWheelForward();
84 //EED InvokeEvent(vtkCommand::MouseWheelBackwardEvent, NULL);
85 ((vtkInteractorStyleBaseView*)_wxvtkbaseview->GetInteractorStyleBaseView())->OnMouseWheelBackward();