VTK  9.1.0
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 
68 #ifndef vtkInteractorStyleUser_h
69 #define vtkInteractorStyleUser_h
70 
71 #include "vtkInteractionStyleModule.h" // For export macro
72 #include "vtkInteractorStyle.h"
73 
74 // new motion flag
75 #define VTKIS_USERINTERACTION 8
76 
77 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleUser : public vtkInteractorStyle
78 {
79 public:
82  void PrintSelf(ostream& os, vtkIndent indent) override;
83 
85 
91  vtkGetVector2Macro(LastPos, int);
93 
95 
100  vtkGetVector2Macro(OldPos, int);
102 
104 
108  vtkGetMacro(ShiftKey, int);
109  vtkGetMacro(CtrlKey, int);
111 
113 
116  vtkGetMacro(Char, int);
118 
120 
124  vtkGetStringMacro(KeySym);
126 
128 
132  vtkGetMacro(Button, int);
134 
136 
139  void OnMouseMove() override;
140  void OnLeftButtonDown() override;
141  void OnLeftButtonUp() override;
142  void OnMiddleButtonDown() override;
143  void OnMiddleButtonUp() override;
144  void OnRightButtonDown() override;
145  void OnRightButtonUp() override;
146  void OnMouseWheelForward() override;
147  void OnMouseWheelBackward() override;
149 
151 
154  void OnChar() override;
155  void OnKeyPress() override;
156  void OnKeyRelease() override;
158 
160 
163  void OnExpose() override;
164  void OnConfigure() override;
165  void OnEnter() override;
166  void OnLeave() override;
168 
169  void OnTimer() override;
170 
171 protected:
174 
175  int LastPos[2];
176  int OldPos[2];
177 
178  int ShiftKey;
179  int CtrlKey;
180  int Char;
181  char* KeySym;
182  int Button;
183 
184 private:
186  void operator=(const vtkInteractorStyleUser&) = delete;
187 };
188 
189 #endif
vtkInteractorStyleUser::KeySym
char * KeySym
Definition: vtkInteractorStyleUser.h:181
vtkInteractorStyleUser::OnKeyRelease
void OnKeyRelease() override
Keyboard functions.
vtkInteractorStyle.h
vtkInteractorStyleUser::vtkInteractorStyleUser
vtkInteractorStyleUser()
vtkInteractorStyleUser::OnChar
void OnChar() override
Keyboard functions.
vtkInteractorStyleUser::New
static vtkInteractorStyleUser * New()
vtkInteractorStyleUser::OnLeftButtonDown
void OnLeftButtonDown() override
Generic event bindings.
vtkInteractorStyleUser::~vtkInteractorStyleUser
~vtkInteractorStyleUser() override
vtkInteractorStyleUser::ShiftKey
int ShiftKey
Definition: vtkInteractorStyleUser.h:178
vtkInteractorStyleUser::OnTimer
void OnTimer() override
OnTimer calls Rotate, Rotate etc which should be overridden by style subclasses.
vtkInteractorStyleUser::CtrlKey
int CtrlKey
Definition: vtkInteractorStyleUser.h:179
vtkInteractorStyleUser::OnLeave
void OnLeave() override
These are more esoteric events, but are useful in some cases.
vtkInteractorStyleUser::OnExpose
void OnExpose() override
These are more esoteric events, but are useful in some cases.
vtkInteractorStyleUser::OnMiddleButtonDown
void OnMiddleButtonDown() override
Generic event bindings.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkInteractorStyleUser::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInteractorStyleUser::Char
int Char
Definition: vtkInteractorStyleUser.h:180
vtkInteractorStyleUser::OnRightButtonUp
void OnRightButtonUp() override
Generic event bindings.
vtkInteractorStyleUser::OnMiddleButtonUp
void OnMiddleButtonUp() override
Generic event bindings.
vtkInteractorStyleUser::OnRightButtonDown
void OnRightButtonDown() override
Generic event bindings.
vtkInteractorStyle
provide event-driven interface to the rendering window (defines trackball mode)
Definition: vtkInteractorStyle.h:207
vtkInteractorStyleUser::OnMouseWheelForward
void OnMouseWheelForward() override
Generic event bindings.
vtkInteractorStyleUser::OnKeyPress
void OnKeyPress() override
Keyboard functions.
vtkInteractorStyleUser
provides customizable interaction routines
Definition: vtkInteractorStyleUser.h:78
vtkInteractorStyleUser::Button
int Button
Definition: vtkInteractorStyleUser.h:182
vtkInteractorStyleUser::OnMouseWheelBackward
void OnMouseWheelBackward() override
Generic event bindings.
vtkInteractorStyleUser::OnLeftButtonUp
void OnLeftButtonUp() override
Generic event bindings.
vtkInteractorStyleUser::OnMouseMove
void OnMouseMove() override
Generic event bindings.
vtkInteractorStyleUser::OnConfigure
void OnConfigure() override
These are more esoteric events, but are useful in some cases.
vtkInteractorStyleUser::OnEnter
void OnEnter() override
These are more esoteric events, but are useful in some cases.