VTK  9.3.0
vtkInteractorStyleUser.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
27 #ifndef vtkInteractorStyleUser_h
28 #define vtkInteractorStyleUser_h
29 
30 #include "vtkInteractionStyleModule.h" // For export macro
31 #include "vtkInteractorStyle.h"
32 
33 // new motion flag
34 #define VTKIS_USERINTERACTION 8
35 
36 VTK_ABI_NAMESPACE_BEGIN
37 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleUser : public vtkInteractorStyle
38 {
39 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
51  vtkGetVector2Macro(LastPos, int);
53 
55 
60  vtkGetVector2Macro(OldPos, int);
62 
64 
68  vtkGetMacro(ShiftKey, int);
69  vtkGetMacro(CtrlKey, int);
71 
73 
76  vtkGetMacro(Char, int);
78 
80 
84  vtkGetStringMacro(KeySym);
86 
88 
92  vtkGetMacro(Button, int);
94 
96 
99  void OnMouseMove() override;
100  void OnLeftButtonDown() override;
101  void OnLeftButtonUp() override;
102  void OnMiddleButtonDown() override;
103  void OnMiddleButtonUp() override;
104  void OnRightButtonDown() override;
105  void OnRightButtonUp() override;
106  void OnMouseWheelForward() override;
107  void OnMouseWheelBackward() override;
109 
111 
114  void OnChar() override;
115  void OnKeyPress() override;
116  void OnKeyRelease() override;
118 
120 
123  void OnExpose() override;
124  void OnConfigure() override;
125  void OnEnter() override;
126  void OnLeave() override;
128 
129  void OnTimer() override;
130 
131 protected:
134 
135  int LastPos[2];
136  int OldPos[2];
137 
138  int ShiftKey;
139  int CtrlKey;
140  int Char;
141  char* KeySym;
142  int Button;
143 
144 private:
146  void operator=(const vtkInteractorStyleUser&) = delete;
147 };
148 
149 VTK_ABI_NAMESPACE_END
150 #endif
a simple class to control print indentation
Definition: vtkIndent.h:29
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)