VTK  9.0.1
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 
33 #ifndef vtkInteractorStyleUser_h
34 #define vtkInteractorStyleUser_h
35 
36 #include "vtkInteractionStyleModule.h" // For export macro
37 #include "vtkInteractorStyle.h"
38 
39 // new motion flag
40 #define VTKIS_USERINTERACTION 8
41 
42 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleUser : public vtkInteractorStyle
43 {
44 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
56  vtkGetVector2Macro(LastPos, int);
58 
60 
65  vtkGetVector2Macro(OldPos, int);
67 
69 
73  vtkGetMacro(ShiftKey, int);
74  vtkGetMacro(CtrlKey, int);
76 
78 
81  vtkGetMacro(Char, int);
83 
85 
89  vtkGetStringMacro(KeySym);
91 
93 
97  vtkGetMacro(Button, int);
99 
101 
104  void OnMouseMove() override;
105  void OnLeftButtonDown() override;
106  void OnLeftButtonUp() override;
107  void OnMiddleButtonDown() override;
108  void OnMiddleButtonUp() override;
109  void OnRightButtonDown() override;
110  void OnRightButtonUp() override;
111  void OnMouseWheelForward() override;
112  void OnMouseWheelBackward() override;
114 
116 
119  void OnChar() override;
120  void OnKeyPress() override;
121  void OnKeyRelease() override;
123 
125 
128  void OnExpose() override;
129  void OnConfigure() override;
130  void OnEnter() override;
131  void OnLeave() override;
133 
134  void OnTimer() override;
135 
136 protected:
139 
140  int LastPos[2];
141  int OldPos[2];
142 
143  int ShiftKey;
144  int CtrlKey;
145  int Char;
146  char* KeySym;
147  int Button;
148 
149 private:
151  void operator=(const vtkInteractorStyleUser&) = delete;
152 };
153 
154 #endif
vtkInteractorStyleUser::KeySym
char * KeySym
Definition: vtkInteractorStyleUser.h:146
vtkInteractorStyleUser::OnKeyRelease
void OnKeyRelease() override
vtkInteractorStyle.h
vtkInteractorStyleUser::vtkInteractorStyleUser
vtkInteractorStyleUser()
vtkInteractorStyleUser::OnChar
void OnChar() override
Keyboard functions.
vtkInteractorStyleUser::New
static vtkInteractorStyleUser * New()
vtkInteractorStyleUser::OnLeftButtonDown
void OnLeftButtonDown() override
vtkInteractorStyleUser::~vtkInteractorStyleUser
~vtkInteractorStyleUser() override
vtkInteractorStyleUser::ShiftKey
int ShiftKey
Definition: vtkInteractorStyleUser.h:143
vtkInteractorStyleUser::OnTimer
void OnTimer() override
OnTimer calls Rotate, Rotate etc which should be overridden by style subclasses.
vtkInteractorStyleUser::CtrlKey
int CtrlKey
Definition: vtkInteractorStyleUser.h:144
vtkInteractorStyleUser::OnLeave
void OnLeave() override
vtkInteractorStyleUser::OnExpose
void OnExpose() override
These are more esoteric events, but are useful in some cases.
vtkInteractorStyleUser::OnMiddleButtonDown
void OnMiddleButtonDown() override
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
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:145
vtkInteractorStyleUser::OnRightButtonUp
void OnRightButtonUp() override
vtkInteractorStyleUser::OnMiddleButtonUp
void OnMiddleButtonUp() override
vtkInteractorStyleUser::OnRightButtonDown
void OnRightButtonDown() override
vtkInteractorStyle
provide event-driven interface to the rendering window (defines trackball mode)
Definition: vtkInteractorStyle.h:139
vtkInteractorStyleUser::OnMouseWheelForward
void OnMouseWheelForward() override
vtkInteractorStyleUser::OnKeyPress
void OnKeyPress() override
vtkInteractorStyleUser
provides customizable interaction routines
Definition: vtkInteractorStyleUser.h:43
vtkInteractorStyleUser::Button
int Button
Definition: vtkInteractorStyleUser.h:147
vtkInteractorStyleUser::OnMouseWheelBackward
void OnMouseWheelBackward() override
vtkInteractorStyleUser::OnLeftButtonUp
void OnLeftButtonUp() override
vtkInteractorStyleUser::OnMouseMove
void OnMouseMove() override
Generic event bindings.
vtkInteractorStyleUser::OnConfigure
void OnConfigure() override
vtkInteractorStyleUser::OnEnter
void OnEnter() override