VTK
vtkContextMouseEvent.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkContextMouseEvent.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 
27 #ifndef __vtkContextMouseEvent_h
28 #define __vtkContextMouseEvent_h
29 
30 #include "vtkVector.h" // Needed for vtkVector2f and vtkVector2i
31 
33 
35 {
36 public:
38 
39  enum {
40  NO_BUTTON = 0,
44  };
46 
48 
49  enum {
54  };
56 
58  {
59  }
60 
62  {
63  }
64 
66 
68  {
69  this->Interactor = interactor;
70  }
72 
74 
77  {
78  return this->Interactor;
79  }
81 
83 
84  void SetPos(const vtkVector2f &pos) { this->Pos = pos; }
85  vtkVector2f GetPos() const { return this->Pos; }
87 
89 
90  void SetScenePos(const vtkVector2f &pos) { this->ScenePos = pos; }
91  vtkVector2f GetScenePos() const { return this->ScenePos; }
93 
95 
96  void SetScreenPos(const vtkVector2i &pos) { this->ScreenPos = pos; }
97  vtkVector2i GetScreenPos() const { return this->ScreenPos; }
99 
101 
102  void SetLastPos(const vtkVector2f &pos) { this->LastPos = pos; }
103  vtkVector2f GetLastPos() const { return this->LastPos; }
105 
107 
108  void SetLastScenePos(const vtkVector2f &pos) { this->LastScenePos = pos; }
109  vtkVector2f GetLastScenePos() const { return this->LastScenePos; }
111 
113 
114  void SetLastScreenPos(const vtkVector2i &pos) { this->LastScreenPos = pos; }
115  vtkVector2i GetLastScreenPos() const { return this->LastScreenPos; }
117 
119 
121  void SetButton(int button) { this->Button = button; }
122  int GetButton() const { return this->Button; }
124 
128  int GetModifiers() const;
129 
130 #ifdef VTK_LEGACY_REMOVE
131  // Deprecating the public exposure of member variables for mouse events
132  // Deprecated in VTK 5.9.
133 protected:
134 #endif
135 
137 
140 
143 
146 
149 
152 
154  int Button;
155 
156 protected:
158 };
159 
160 #endif // __vtkContextMouseEvent_h