VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Widgets
vtkLineWidget2.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkLineWidget2.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
=========================================================================*/
90
#ifndef __vtkLineWidget2_h
91
#define __vtkLineWidget2_h
92
93
#include "
vtkAbstractWidget.h
"
94
95
class
vtkLineRepresentation
;
96
class
vtkHandleWidget
;
97
98
99
class
VTK_WIDGETS_EXPORT
vtkLineWidget2
:
public
vtkAbstractWidget
100
{
101
public
:
103
static
vtkLineWidget2
*
New
();
104
106
107
vtkTypeMacro(
vtkLineWidget2
,
vtkAbstractWidget
);
108
void
PrintSelf
(ostream& os,
vtkIndent
indent);
110
113
virtual
void
SetEnabled
(
int
enabling);
114
116
119
void
SetRepresentation(
vtkLineRepresentation
*r)
120
{this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
122
124
125
vtkLineRepresentation
*GetLineRepresentation()
126
{
return
reinterpret_cast<
vtkLineRepresentation
*
>
(this->
WidgetRep
);}
128
130
void
CreateDefaultRepresentation
();
131
134
virtual
void
SetProcessEvents
(
int
);
135
136
protected
:
137
vtkLineWidget2
();
138
~
vtkLineWidget2
();
139
140
//BTX - manage the state of the widget
141
int
WidgetState
;
142
enum
_WidgetState
{Start=0,Active};
143
//ETX
144
int
CurrentHandle
;
145
146
// These methods handle events
147
static
void
SelectAction(
vtkAbstractWidget
*);
148
static
void
TranslateAction(
vtkAbstractWidget
*);
149
static
void
ScaleAction(
vtkAbstractWidget
*);
150
static
void
EndSelectAction(
vtkAbstractWidget
*);
151
static
void
MoveAction(
vtkAbstractWidget
*);
152
153
// The positioning handle widgets
154
vtkHandleWidget
*
Point1Widget
;
//first end point
155
vtkHandleWidget
*
Point2Widget
;
//second end point
156
vtkHandleWidget
*
LineHandle
;
//used when selecting the line
157
158
private
:
159
vtkLineWidget2
(
const
vtkLineWidget2
&);
//Not implemented
160
void
operator=(
const
vtkLineWidget2
&);
//Not implemented
161
};
162
163
#endif
Generated on Wed Nov 21 2012 21:34:08 for VTK by
1.8.2