VTK
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 
39 #ifndef vtkInteractorStyleUser_h
40 #define vtkInteractorStyleUser_h
41 
42 #include "vtkInteractionStyleModule.h" // For export macro
43 #include "vtkInteractorStyle.h"
44 
45 // new motion flag
46 #define VTKIS_USERINTERACTION 8
47 
48 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleUser : public vtkInteractorStyle
49 {
50 public:
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56 
62  vtkGetVector2Macro(LastPos,int);
64 
66 
71  vtkGetVector2Macro(OldPos,int);
73 
75 
79  vtkGetMacro(ShiftKey,int);
80  vtkGetMacro(CtrlKey,int);
82 
84 
87  vtkGetMacro(Char,int);
89 
91 
95  vtkGetStringMacro(KeySym);
97 
99 
103  vtkGetMacro(Button,int);
105 
107 
110  void OnMouseMove() override;
111  void OnLeftButtonDown() override;
112  void OnLeftButtonUp() override;
113  void OnMiddleButtonDown() override;
114  void OnMiddleButtonUp() override;
115  void OnRightButtonDown() override;
116  void OnRightButtonUp() override;
117  void OnMouseWheelForward() override;
118  void OnMouseWheelBackward() override;
120 
122 
125  void OnChar() override;
126  void OnKeyPress() override;
127  void OnKeyRelease() override;
129 
131 
134  void OnExpose() override;
135  void OnConfigure() override;
136  void OnEnter() override;
137  void OnLeave() override;
139 
140  void OnTimer() override;
141 
142 protected:
143 
146 
147  int LastPos[2];
148  int OldPos[2];
149 
150  int ShiftKey;
151  int CtrlKey;
152  int Char;
153  char *KeySym;
154  int Button;
155 
156 private:
158  void operator=(const vtkInteractorStyleUser&) = delete;
159 };
160 
161 #endif
vtkInteractorStyleUser::KeySym
char * KeySym
Definition: vtkInteractorStyleUser.h:153
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:150
vtkInteractorStyleUser::OnTimer
void OnTimer() override
OnTimer calls Rotate, Rotate etc which should be overridden by style subclasses.
vtkInteractorStyleUser::CtrlKey
int CtrlKey
Definition: vtkInteractorStyleUser.h:151
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:40
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:152
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:142
vtkInteractorStyleUser::OnMouseWheelForward
void OnMouseWheelForward() override
vtkInteractorStyleUser::OnKeyPress
void OnKeyPress() override
vtkInteractorStyleUser
provides customizable interaction routines
Definition: vtkInteractorStyleUser.h:49
vtkInteractorStyleUser::Button
int Button
Definition: vtkInteractorStyleUser.h:154
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