VTK
dox
Interaction
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
=========================================================================*/
76
#ifndef vtkBorderWidget_h
77
#define vtkBorderWidget_h
78
79
#include "vtkInteractionWidgetsModule.h"
// For export macro
80
#include "
vtkAbstractWidget.h
"
81
82
class
vtkBorderRepresentation
;
83
84
85
class
VTKINTERACTIONWIDGETS_EXPORT
vtkBorderWidget
:
public
vtkAbstractWidget
86
{
87
public
:
91
static
vtkBorderWidget
*
New
();
92
94
97
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
98
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
100
102
108
vtkSetMacro(Selectable,
vtkTypeBool
);
109
vtkGetMacro(Selectable,
vtkTypeBool
);
110
vtkBooleanMacro(Selectable,
vtkTypeBool
);
112
113
115
120
vtkSetMacro(Resizable,
vtkTypeBool
);
121
vtkGetMacro(Resizable,
vtkTypeBool
);
122
vtkBooleanMacro(Resizable,
vtkTypeBool
);
124
125
131
void
SetRepresentation
(
vtkBorderRepresentation
*r)
132
{this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));}
133
137
vtkBorderRepresentation
*
GetBorderRepresentation
()
138
{
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);}
139
143
void
CreateDefaultRepresentation
()
override
;
144
145
protected
:
146
vtkBorderWidget
();
147
~vtkBorderWidget
()
override
;
148
154
virtual
void
SelectRegion
(
double
eventPos[2]);
155
156
//enable the selection of the region interior to the widget
157
vtkTypeBool
Selectable
;
158
vtkTypeBool
Resizable
;
159
160
//processes the registered events
161
static
void
SelectAction
(
vtkAbstractWidget
*);
162
static
void
TranslateAction
(
vtkAbstractWidget
*);
163
static
void
EndSelectAction
(
vtkAbstractWidget
*);
164
static
void
MoveAction
(
vtkAbstractWidget
*);
165
166
// Special internal methods to support subclasses handling events.
167
// If a non-zero value is returned, the subclass is handling the event.
168
virtual
int
SubclassSelectAction
() {
return
0;}
169
virtual
int
SubclassTranslateAction
() {
return
0;}
170
virtual
int
SubclassEndSelectAction
() {
return
0;}
171
virtual
int
SubclassMoveAction
() {
return
0;}
172
173
// helper methods for cursoe management
174
void
SetCursor
(
int
State)
override
;
175
176
//widget state
177
int
WidgetState
;
178
enum
_WidgetState
{Start=0,Define,Manipulate,Selected};
179
180
private
:
181
vtkBorderWidget
(
const
vtkBorderWidget
&) =
delete
;
182
void
operator=(
const
vtkBorderWidget
&) =
delete
;
183
};
184
185
#endif
vtkBorderWidget::SubclassEndSelectAction
virtual int SubclassEndSelectAction()
Definition:
vtkBorderWidget.h:170
vtkBorderRepresentation
represent a vtkBorderWidget
Definition:
vtkBorderRepresentation.h:59
vtkBorderWidget
place a border around a 2D rectangular region
Definition:
vtkBorderWidget.h:86
vtkBorderWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkBorderWidget::GetBorderRepresentation
vtkBorderRepresentation * GetBorderRepresentation()
Return the representation as a vtkBorderRepresentation.
Definition:
vtkBorderWidget.h:137
vtkAbstractWidget.h
vtkBorderWidget::Selectable
vtkTypeBool Selectable
Definition:
vtkBorderWidget.h:157
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition:
vtkWidgetRepresentation.h:61
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition:
vtkAbstractWidget.h:174
vtkBorderWidget::SubclassMoveAction
virtual int SubclassMoveAction()
Definition:
vtkBorderWidget.h:171
vtkBorderWidget::Resizable
vtkTypeBool Resizable
Definition:
vtkBorderWidget.h:158
vtkBorderWidget::WidgetState
int WidgetState
Definition:
vtkBorderWidget.h:177
vtkBorderWidget::vtkBorderWidget
vtkBorderWidget()
vtkBorderWidget::SelectRegion
virtual void SelectRegion(double eventPos[2])
Subclasses generally implement this method.
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:64
vtkBorderWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition:
vtkBorderWidget.h:168
vtkBorderWidget::_WidgetState
_WidgetState
Definition:
vtkBorderWidget.h:178
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:40
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::SetCursor
void SetCursor(int State) override
vtkBorderWidget::SubclassTranslateAction
virtual int SubclassTranslateAction()
Definition:
vtkBorderWidget.h:169
vtkBorderWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkBorderWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBorderWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkBorderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition:
vtkBorderWidget.h:131
vtkBorderWidget::~vtkBorderWidget
~vtkBorderWidget() override
vtkTypeBool
int vtkTypeBool
Definition:
vtkABI.h:69
Generated by
1.8.18