1 #ifndef __vvInteractorStyleNavigator_h
2 #define __vvInteractorStyleNavigator_h
3 #include "vtkInteractorStyle.h"
7 #define VTKIS_WINDOW_LEVEL 1024
8 #define VTKIS_PICK 1025
10 class vvInteractorStyleNavigator : public vtkInteractorStyle
14 static vvInteractorStyleNavigator *New();
15 vtkTypeRevisionMacro(vvInteractorStyleNavigator, vtkInteractorStyle);
16 void PrintSelf(ostream& os, vtkIndent indent);
19 // Some useful information for handling window level
20 vtkGetVector2Macro(WindowLevelStartPosition,int);
21 vtkGetVector2Macro(WindowLevelCurrentPosition,int);
24 // Event bindings controlling the effects of pressing mouse buttons
25 // or moving the mouse.
26 virtual void OnMouseMove();
27 virtual void OnLeftButtonDown();
28 virtual void OnLeftButtonUp();
29 virtual void OnRightButtonDown();
30 virtual void OnRightButtonUp();
31 virtual void OnMiddleButtonDown();
32 virtual void OnMiddleButtonUp();
33 virtual void OnEnter();
34 virtual void OnLeave();
35 virtual void OnMouseWheelForward();
36 virtual void OnMouseWheelBackward();
39 // Override the "fly-to" (f keypress) for images.
40 virtual void OnChar();
42 // These methods for the different interactions in different modes
43 // are overridden in subclasses to perform the correct motion. Since
44 // they might be called from OnTimer, they do not have mouse coord parameters
45 // (use interactor's GetEventPosition and GetLastEventPosition)
46 virtual void WindowLevel();
49 // Interaction mode entry points used internally.
50 virtual void StartWindowLevel();
51 virtual void EndWindowLevel();
52 virtual void StartPick();
53 virtual void EndPick();
57 // We need to reimplement this because otherwise it returns the top renderer,
59 virtual void FindPokedRenderer(int, int);
62 vvInteractorStyleNavigator();
63 ~vvInteractorStyleNavigator();
65 static void ProcessEvents(vtkObject* object,
72 virtual void Dolly(double factor);
74 int WindowLevelStartPosition[2];
75 int WindowLevelCurrentPosition[2];
78 vvInteractorStyleNavigator(const vvInteractorStyleNavigator&); // Not implemented.
79 void operator=(const vvInteractorStyleNavigator&); // Not implemented.