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
42#ifndef vtkInteractorStyleUser_h
43#define vtkInteractorStyleUser_h
44
45#include "vtkInteractionStyleModule.h" // For export macro
46#include "vtkInteractorStyle.h"
47
48// new motion flag
49#define VTKIS_USERINTERACTION 8
50
51class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleUser : public vtkInteractorStyle
52{
53public:
56 void PrintSelf(ostream& os, vtkIndent indent) override;
57
59
65 vtkGetVector2Macro(LastPos, int);
67
69
74 vtkGetVector2Macro(OldPos, int);
76
78
82 vtkGetMacro(ShiftKey, int);
83 vtkGetMacro(CtrlKey, int);
85
87
90 vtkGetMacro(Char, int);
92
94
98 vtkGetStringMacro(KeySym);
100
102
106 vtkGetMacro(Button, int);
108
110
113 void OnMouseMove() override;
114 void OnLeftButtonDown() override;
115 void OnLeftButtonUp() override;
116 void OnMiddleButtonDown() override;
117 void OnMiddleButtonUp() override;
118 void OnRightButtonDown() override;
119 void OnRightButtonUp() override;
120 void OnMouseWheelForward() override;
121 void OnMouseWheelBackward() override;
123
125
128 void OnChar() override;
129 void OnKeyPress() override;
130 void OnKeyRelease() override;
132
134
137 void OnExpose() override;
138 void OnConfigure() override;
139 void OnEnter() override;
140 void OnLeave() override;
142
143 void OnTimer() override;
144
145protected:
148
149 int LastPos[2];
150 int OldPos[2];
151
154 int Char;
155 char* KeySym;
157
158private:
160 void operator=(const vtkInteractorStyleUser&) = delete;
161};
162
163#endif
a simple class to control print indentation
Definition: vtkIndent.h:43
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.
static vtkInteractorStyleUser * New()
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.
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)