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 
36 #ifndef vtkInteractorStyleUser_h
37 #define vtkInteractorStyleUser_h
38 
39 #include "vtkInteractionStyleModule.h" // For export macro
40 #include "vtkInteractorStyle.h"
41 
42 // new motion flag
43 #define VTKIS_USERINTERACTION 8
44 
45 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleUser : public vtkInteractorStyle
46 {
47 public:
48  static vtkInteractorStyleUser *New();
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
59  vtkGetVector2Macro(LastPos,int);
61 
63 
68  vtkGetVector2Macro(OldPos,int);
70 
72 
76  vtkGetMacro(ShiftKey,int);
77  vtkGetMacro(CtrlKey,int);
79 
81 
84  vtkGetMacro(Char,int);
86 
88 
92  vtkGetStringMacro(KeySym);
94 
96 
100  vtkGetMacro(Button,int);
102 
104 
107  virtual void OnMouseMove();
108  virtual void OnLeftButtonDown();
109  virtual void OnLeftButtonUp();
110  virtual void OnMiddleButtonDown();
111  virtual void OnMiddleButtonUp();
112  virtual void OnRightButtonDown();
113  virtual void OnRightButtonUp();
114  virtual void OnMouseWheelForward();
115  virtual void OnMouseWheelBackward();
117 
119 
122  virtual void OnChar();
123  virtual void OnKeyPress();
124  virtual void OnKeyRelease();
126 
128 
131  virtual void OnExpose();
132  virtual void OnConfigure();
133  virtual void OnEnter();
134  virtual void OnLeave();
136 
137  virtual void OnTimer();
138 
139 protected:
140 
143 
144  int LastPos[2];
145  int OldPos[2];
146 
147  int ShiftKey;
148  int CtrlKey;
149  int Char;
150  char *KeySym;
151  int Button;
152 
153 private:
154  vtkInteractorStyleUser(const vtkInteractorStyleUser&) VTK_DELETE_FUNCTION;
155  void operator=(const vtkInteractorStyleUser&) VTK_DELETE_FUNCTION;
156 };
157 
158 #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.