VTK  9.2.6
vtkInteractorStyleUser.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInteractorStyleUser.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
48 #ifndef vtkInteractorStyleUser_h
49 #define vtkInteractorStyleUser_h
50 
51 #include "vtkInteractionStyleModule.h" // For export macro
52 #include "vtkInteractorStyle.h"
53 
54 // new motion flag
55 #define VTKIS_USERINTERACTION 8
56 
57 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleUser : public vtkInteractorStyle
58 {
59 public:
62  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
65 
71  vtkGetVector2Macro(LastPos, int);
73 
75 
80  vtkGetVector2Macro(OldPos, int);
82 
84 
88  vtkGetMacro(ShiftKey, int);
89  vtkGetMacro(CtrlKey, int);
91 
93 
96  vtkGetMacro(Char, int);
98 
100 
104  vtkGetStringMacro(KeySym);
106 
108 
112  vtkGetMacro(Button, int);
114 
116 
119  void OnMouseMove() override;
120  void OnLeftButtonDown() override;
121  void OnLeftButtonUp() override;
122  void OnMiddleButtonDown() override;
123  void OnMiddleButtonUp() override;
124  void OnRightButtonDown() override;
125  void OnRightButtonUp() override;
126  void OnMouseWheelForward() override;
127  void OnMouseWheelBackward() override;
129 
131 
134  void OnChar() override;
135  void OnKeyPress() override;
136  void OnKeyRelease() override;
138 
140 
143  void OnExpose() override;
144  void OnConfigure() override;
145  void OnEnter() override;
146  void OnLeave() override;
148 
149  void OnTimer() override;
150 
151 protected:
154 
155  int LastPos[2];
156  int OldPos[2];
157 
158  int ShiftKey;
159  int CtrlKey;
160  int Char;
161  char* KeySym;
162  int Button;
163 
164 private:
166  void operator=(const vtkInteractorStyleUser&) = delete;
167 };
168 
169 #endif
a simple class to control print indentation
Definition: vtkIndent.h:49
provides customizable interaction routines
void OnRightButtonUp() override
Generic event bindings.
void OnLeave() override
These are more esoteric events, but are useful in some cases.
void OnMouseWheelForward() override
Generic event bindings.
void OnRightButtonDown() override
Generic event bindings.
void OnKeyRelease() override
Keyboard functions.
~vtkInteractorStyleUser() override
void OnMiddleButtonUp() override
Generic event bindings.
void OnEnter() override
These are more esoteric events, but are useful in some cases.
void OnMouseWheelBackward() override
Generic event bindings.
void OnExpose() override
These are more esoteric events, but are useful in some cases.
void OnChar() override
Keyboard functions.
void OnTimer() override
OnTimer calls Rotate, Rotate etc which should be overridden by style subclasses.
void OnLeftButtonDown() override
Generic event bindings.
void OnConfigure() override
These are more esoteric events, but are useful in some cases.
static vtkInteractorStyleUser * New()
void OnKeyPress() override
Keyboard functions.
void OnMouseMove() override
Generic event bindings.
void OnLeftButtonUp() override
Generic event bindings.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void OnMiddleButtonDown() override
Generic event bindings.
provide event-driven interface to the rendering window (defines trackball mode)