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 
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:
45  static vtkInteractorStyleUser *New();
47  void PrintSelf(ostream& os, vtkIndent indent);
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  virtual void OnMouseMove();
105  virtual void OnLeftButtonDown();
106  virtual void OnLeftButtonUp();
107  virtual void OnMiddleButtonDown();
108  virtual void OnMiddleButtonUp();
109  virtual void OnRightButtonDown();
110  virtual void OnRightButtonUp();
111  virtual void OnMouseWheelForward();
112  virtual void OnMouseWheelBackward();
114 
116 
119  virtual void OnChar();
120  virtual void OnKeyPress();
121  virtual void OnKeyRelease();
123 
125 
128  virtual void OnExpose();
129  virtual void OnConfigure();
130  virtual void OnEnter();
131  virtual void OnLeave();
133 
134  virtual void OnTimer();
135 
136 protected:
137 
140 
141  int LastPos[2];
142  int OldPos[2];
143 
144  int ShiftKey;
145  int CtrlKey;
146  int Char;
147  char *KeySym;
148  int Button;
149 
150 private:
151  vtkInteractorStyleUser(const vtkInteractorStyleUser&) VTK_DELETE_FUNCTION;
152  void operator=(const vtkInteractorStyleUser&) VTK_DELETE_FUNCTION;
153 };
154 
155 #endif
virtual void OnLeftButtonDown()
virtual void OnMiddleButtonDown()
virtual void OnRightButtonDown()
virtual void OnLeftButtonUp()
static vtkInteractorStyle * New()
This class must be supplied with a vtkRenderWindowInteractor wrapper or parent.
virtual void OnMiddleButtonUp()
virtual void OnMouseWheelForward()
virtual void OnKeyRelease()
virtual void OnKeyPress()
virtual void OnTimer()
OnTimer calls Rotate, Rotate etc which should be overridden by style subclasses.
virtual void OnEnter()
virtual void OnRightButtonUp()
virtual void OnExpose()
These are more esoteric events, but are useful in some cases.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void OnConfigure()
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void OnMouseWheelBackward()
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
virtual void OnChar()
OnChar is triggered when an ASCII key is pressed.
provide event-driven interface to the rendering window (defines trackball mode)
virtual void OnLeave()
provides customizable interaction routines
virtual void OnMouseMove()
Generic event bindings can be overridden in subclasses.