]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx
v1.0.3 BUG 1404
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / vtkInteractorStyleBaseView.cxx
index 6ed188aeb752215aca6d00cb5569d0548f1b4a87..012e2d9a46f4e1b65101660a93a4c3636756b6c2 100644 (file)
@@ -17,6 +17,9 @@ vtkInteractorStyleBaseView::vtkInteractorStyleBaseView()
        _refresh_waiting                = false;
        _parent_refresh_waiting = false;
        _blockRefresh                   = false;
+       
+       //EED27Juillet2011
+       SetMouseWheelMotionFactor(0.5);
 }
 //---------------------------------------------------------------------------
 vtkInteractorStyleBaseView::~vtkInteractorStyleBaseView()
@@ -75,11 +78,21 @@ void vtkInteractorStyleBaseView::OnRightDClick()  // virtual
 {
        CallLstInteractorStyleMaracas( 12 );
 }
-//---------------------------------------------------------------------------
-void vtkInteractorStyleBaseView::OnMouseWheel()  // virtual
+
+
+void  vtkInteractorStyleBaseView::OnMouseWheelForward()  // virtual
 {
-       CallLstInteractorStyleMaracas( 14 );
+       CallLstInteractorStyleMaracas( 15 );
 }
+
+void vtkInteractorStyleBaseView::OnMouseWheelBackward() // virtual
+{
+       CallLstInteractorStyleMaracas( 16 );
+}
+
+
+
+
 //---------------------------------------------------------------------------
 void vtkInteractorStyleBaseView::AddInteractorStyleMaracas(InteractorStyleMaracas* interactorStyleMaracas)
 {
@@ -131,7 +144,7 @@ void vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas(int type)
 
        for (i=0;i<size;i++)
        {
-               if (i < _lstInteractorStyleMaracas.size() )
+               if (i < (int)_lstInteractorStyleMaracas.size() )
                {
                        intStyMar = _lstInteractorStyleMaracas[i];
                } else {
@@ -215,13 +228,23 @@ void vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas(int type)
                                        i=size;
                                }
                        }
-                       if (type==14)
-                       {  // OnMouseWheel
-                               if (intStyMar->OnMouseWheel()==false)
+                       // 14 ... old OnMouseWheelFordward
+                       if (type==15)
+                       {  // OnMouseWheelForward
+                               if (intStyMar->OnMouseWheelForward()==false)
+                               {
+                                       i=size;
+                               }
+                       }
+                       if (type==16)
+                       {  // OnMouseWheelBackward
+                               if (intStyMar->OnMouseWheelBackward()==false)
                                {
                                        i=size;
                                }
                        }
+                       
+                       
                } // if active
        } // for