]> Creatis software - clitk.git/blob - vv/vvInteractorStyleNavigator.h
removed headers
[clitk.git] / vv / vvInteractorStyleNavigator.h
1 #ifndef __vvInteractorStyleNavigator_h
2 #define __vvInteractorStyleNavigator_h
3 #include "vtkInteractorStyle.h"
4
5 // Motion flags
6
7 #define VTKIS_WINDOW_LEVEL 1024
8 #define VTKIS_PICK         1025
9
10 class vvInteractorStyleNavigator : public vtkInteractorStyle
11
12 {
13 public:
14     static vvInteractorStyleNavigator *New();
15     vtkTypeRevisionMacro(vvInteractorStyleNavigator, vtkInteractorStyle);
16     void PrintSelf(ostream& os, vtkIndent indent);
17
18     // Description:
19     // Some useful information for handling window level
20     vtkGetVector2Macro(WindowLevelStartPosition,int);
21     vtkGetVector2Macro(WindowLevelCurrentPosition,int);
22
23     // Description:
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();
37
38     // Description:
39     // Override the "fly-to" (f keypress) for images.
40     virtual void OnChar();
41
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();
47     virtual void Pick();
48
49     // Interaction mode entry points used internally.
50     virtual void StartWindowLevel();
51     virtual void EndWindowLevel();
52     virtual void StartPick();
53     virtual void EndPick();
54     virtual void Dolly();
55     virtual void Pan();
56
57     // We need to reimplement this because otherwise it returns the top renderer,
58     // not the active one
59     virtual void FindPokedRenderer(int, int);
60
61 protected:
62     vvInteractorStyleNavigator();
63     ~vvInteractorStyleNavigator();
64
65     static void ProcessEvents(vtkObject* object,
66                               unsigned long event,
67                               void* clientdata,
68                               void* calldata);
69
70     double MotionFactor;
71
72     virtual void Dolly(double factor);
73
74     int WindowLevelStartPosition[2];
75     int WindowLevelCurrentPosition[2];
76
77 private:
78     vvInteractorStyleNavigator(const vvInteractorStyleNavigator&);  // Not implemented.
79     void operator=(const vvInteractorStyleNavigator&);  // Not implemented.
80 };
81
82 #endif