VTK  9.3.20240419
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 
56 #ifndef vtkInteractorStyleUser_h
57 #define vtkInteractorStyleUser_h
58 
59 #include "vtkInteractionStyleModule.h" // For export macro
60 #include "vtkInteractorStyle.h"
61 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
62 
63 // new motion flag
64 #define VTKIS_USERINTERACTION 8
65 
66 VTK_ABI_NAMESPACE_BEGIN
67 class VTKINTERACTIONSTYLE_EXPORT VTK_MARSHALAUTO vtkInteractorStyleUser : public vtkInteractorStyle
68 {
69 public:
72  void PrintSelf(ostream& os, vtkIndent indent) override;
73 
75 
81  vtkGetVector2Macro(LastPos, int);
83 
85 
90  vtkGetVector2Macro(OldPos, int);
92 
94 
98  vtkGetMacro(ShiftKey, int);
99  vtkGetMacro(CtrlKey, int);
101 
103 
106  vtkGetMacro(Char, int);
108 
110 
114  vtkGetStringMacro(KeySym);
116 
118 
122  vtkGetMacro(Button, int);
124 
126 
129  void OnMouseMove() override;
130  void OnLeftButtonDown() override;
131  void OnLeftButtonUp() override;
132  void OnMiddleButtonDown() override;
133  void OnMiddleButtonUp() override;
134  void OnRightButtonDown() override;
135  void OnRightButtonUp() override;
136  void OnMouseWheelForward() override;
137  void OnMouseWheelBackward() override;
139 
141 
144  void OnChar() override;
145  void OnKeyPress() override;
146  void OnKeyRelease() override;
148 
150 
153  void OnExpose() override;
154  void OnConfigure() override;
155  void OnEnter() override;
156  void OnLeave() override;
158 
159  void OnTimer() override;
160 
161 protected:
164 
165  int LastPos[2];
166  int OldPos[2];
167 
168  int ShiftKey;
169  int CtrlKey;
170  int Char;
171  char* KeySym;
172  int Button;
173 
174 private:
176  void operator=(const vtkInteractorStyleUser&) = delete;
177 };
178 
179 VTK_ABI_NAMESPACE_END
180 #endif
a simple class to control print indentation
Definition: vtkIndent.h:108
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)
#define VTK_MARSHALAUTO