VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Charts
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
32
class
vtkRenderWindowInteractor
;
33
34
class
vtkContextMouseEvent
35
{
36
public
:
38
39
enum
{
40
NO_BUTTON
= 0,
41
LEFT_BUTTON
= 1,
42
MIDDLE_BUTTON
= 2,
43
RIGHT_BUTTON
= 4
44
};
46
48
49
enum
{
50
NO_MODIFIER
= 0,
51
ALT_MODIFIER
= 1,
52
SHIFT_MODIFIER
= 2,
53
CONTROL_MODIFIER
= 4
54
};
56
57
vtkContextMouseEvent
()
58
{
59
}
60
61
~vtkContextMouseEvent
()
62
{
63
}
64
66
67
void
SetInteractor
(
vtkRenderWindowInteractor
*interactor)
68
{
69
this->
Interactor
= interactor;
70
}
72
74
76
vtkRenderWindowInteractor
*
GetInteractor
()
const
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
136
vtkVector2f
Pos
;
137
139
vtkVector2f
ScenePos
;
140
142
vtkVector2i
ScreenPos
;
143
145
vtkVector2f
LastPos
;
146
148
vtkVector2f
LastScenePos
;
149
151
vtkVector2i
LastScreenPos
;
152
154
int
Button
;
155
156
protected
:
157
vtkRenderWindowInteractor
*
Interactor
;
158
};
159
160
#endif // __vtkContextMouseEvent_h
Generated on Tue Jan 8 2013 05:45:22 for VTK by
1.8.1.2