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 
36 #ifndef vtkInteractorStyleUser_h
37 #define vtkInteractorStyleUser_h
38 
39 #include "vtkInteractionStyleModule.h" // For export macro
40 #include "vtkInteractorStyle.h"
41 
42 // new motion flag
43 #define VTKIS_USERINTERACTION 8
44 
45 VTK_ABI_NAMESPACE_BEGIN
46 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleUser : public vtkInteractorStyle
47 {
48 public:
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
54 
60  vtkGetVector2Macro(LastPos, int);
62 
64 
69  vtkGetVector2Macro(OldPos, int);
71 
73 
77  vtkGetMacro(ShiftKey, int);
78  vtkGetMacro(CtrlKey, int);
80 
82 
85  vtkGetMacro(Char, int);
87 
89 
93  vtkGetStringMacro(KeySym);
95 
97 
101  vtkGetMacro(Button, int);
103 
105 
108  void OnMouseMove() override;
109  void OnLeftButtonDown() override;
110  void OnLeftButtonUp() override;
111  void OnMiddleButtonDown() override;
112  void OnMiddleButtonUp() override;
113  void OnRightButtonDown() override;
114  void OnRightButtonUp() override;
115  void OnMouseWheelForward() override;
116  void OnMouseWheelBackward() override;
118 
120 
123  void OnChar() override;
124  void OnKeyPress() override;
125  void OnKeyRelease() override;
127 
129 
132  void OnExpose() override;
133  void OnConfigure() override;
134  void OnEnter() override;
135  void OnLeave() override;
137 
138  void OnTimer() override;
139 
140 protected:
143 
144  int LastPos[2];
145  int OldPos[2];
146 
147  int ShiftKey;
148  int CtrlKey;
149  int Char;
150  char* KeySym;
151  int Button;
152 
153 private:
155  void operator=(const vtkInteractorStyleUser&) = delete;
156 };
157 
158 VTK_ABI_NAMESPACE_END
159 #endif
a simple class to control print indentation
Definition: vtkIndent.h:38
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)