VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Widgets
vtkBorderWidget.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkBorderWidget.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
=========================================================================*/
78
#ifndef __vtkBorderWidget_h
79
#define __vtkBorderWidget_h
80
81
#include "
vtkAbstractWidget.h
"
82
83
class
vtkBorderRepresentation
;
84
85
86
class
VTK_WIDGETS_EXPORT
vtkBorderWidget
:
public
vtkAbstractWidget
87
{
88
public
:
90
static
vtkBorderWidget
*
New
();
91
93
94
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
95
void
PrintSelf
(ostream& os,
vtkIndent
indent);
97
99
103
vtkSetMacro(Selectable,
int
);
104
vtkGetMacro(Selectable,
int
);
105
vtkBooleanMacro(Selectable,
int
);
107
108
110
113
vtkSetMacro(Resizable,
int
);
114
vtkGetMacro(Resizable,
int
);
115
vtkBooleanMacro(Resizable,
int
);
117
118
120
123
void
SetRepresentation
(
vtkBorderRepresentation
*r)
124
{this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
126
128
129
vtkBorderRepresentation
*
GetBorderRepresentation
()
130
{
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);}
132
134
virtual
void
CreateDefaultRepresentation
();
135
136
protected
:
137
vtkBorderWidget
();
138
~
vtkBorderWidget
();
139
143
virtual
void
SelectRegion(
double
eventPos[2]);
144
145
//enable the selection of the region interior to the widget
146
int
Selectable
;
147
int
Resizable
;
148
149
//processes the registered events
150
static
void
SelectAction(
vtkAbstractWidget
*);
151
static
void
TranslateAction(
vtkAbstractWidget
*);
152
static
void
EndSelectAction(
vtkAbstractWidget
*);
153
static
void
MoveAction(
vtkAbstractWidget
*);
154
155
// Special internal methods to support subclasses handling events.
156
// If a non-zero value is returned, the subclass is handling the event.
157
virtual
int
SubclassSelectAction
() {
return
0;}
158
virtual
int
SubclassTranslateAction
() {
return
0;}
159
virtual
int
SubclassEndSelectAction
() {
return
0;}
160
virtual
int
SubclassMoveAction
() {
return
0;}
161
162
// helper methods for cursoe management
163
virtual
void
SetCursor
(
int
State);
164
165
//BTX
166
//widget state
167
int
WidgetState
;
168
enum
_WidgetState
{Start=0,Define,Manipulate,Selected};
169
//ETX
170
171
private
:
172
vtkBorderWidget
(
const
vtkBorderWidget
&);
//Not implemented
173
void
operator=(
const
vtkBorderWidget
&);
//Not implemented
174
};
175
176
#endif
Generated on Fri Aug 2 2013 12:20:03 for VTK by
1.8.4