VTK
9.1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
=========================================================================*/
132
#ifndef vtkBorderWidget_h
133
#define vtkBorderWidget_h
134
135
#include "
vtkAbstractWidget.h
"
136
#include "vtkInteractionWidgetsModule.h"
// For export macro
137
138
class
vtkBorderRepresentation
;
139
140
class
VTKINTERACTIONWIDGETS_EXPORT
vtkBorderWidget
:
public
vtkAbstractWidget
141
{
142
public
:
146
static
vtkBorderWidget
*
New
();
147
149
152
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
153
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
155
157
163
vtkSetMacro(Selectable,
vtkTypeBool
);
164
vtkGetMacro(Selectable,
vtkTypeBool
);
165
vtkBooleanMacro(Selectable,
vtkTypeBool
);
167
169
174
vtkSetMacro(Resizable,
vtkTypeBool
);
175
vtkGetMacro(Resizable,
vtkTypeBool
);
176
vtkBooleanMacro(Resizable,
vtkTypeBool
);
178
184
void
SetRepresentation
(
vtkBorderRepresentation
* r)
185
{
186
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
187
}
188
192
vtkBorderRepresentation
*
GetBorderRepresentation
()
193
{
194
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);
195
}
196
200
void
CreateDefaultRepresentation
()
override
;
201
202
protected
:
203
vtkBorderWidget
();
204
~vtkBorderWidget
()
override
;
205
211
virtual
void
SelectRegion
(
double
eventPos[2]);
212
213
// enable the selection of the region interior to the widget
214
vtkTypeBool
Selectable
;
215
vtkTypeBool
Resizable
;
216
217
// processes the registered events
218
static
void
SelectAction
(
vtkAbstractWidget
*);
219
static
void
TranslateAction
(
vtkAbstractWidget
*);
220
static
void
EndSelectAction
(
vtkAbstractWidget
*);
221
static
void
MoveAction
(
vtkAbstractWidget
*);
222
static
void
HoverLeaveAction
(
vtkAbstractWidget
*);
223
224
// Special internal methods to support subclasses handling events.
225
// If a non-zero value is returned, the subclass is handling the event.
226
virtual
int
SubclassSelectAction
() {
return
0; }
227
virtual
int
SubclassTranslateAction
() {
return
0; }
228
virtual
int
SubclassEndSelectAction
() {
return
0; }
229
virtual
int
SubclassMoveAction
() {
return
0; }
230
231
// helper methods for cursoe management
232
void
SetCursor
(
int
State)
override
;
233
234
// widget state
235
int
WidgetState
;
236
enum
_WidgetState
237
{
238
Start = 0,
239
Define
,
240
Manipulate
,
241
Selected
242
};
243
244
private
:
245
vtkBorderWidget
(
const
vtkBorderWidget
&) =
delete
;
246
void
operator=(
const
vtkBorderWidget
&) =
delete
;
247
};
248
249
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:63
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition:
vtkAbstractWidget.h:172
vtkBorderRepresentation
represent a vtkBorderWidget
Definition:
vtkBorderRepresentation.h:117
vtkBorderWidget
place a border around a 2D rectangular region
Definition:
vtkBorderWidget.h:141
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::Resizable
vtkTypeBool Resizable
Definition:
vtkBorderWidget.h:215
vtkBorderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkBorderWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBorderWidget::_WidgetState
_WidgetState
Definition:
vtkBorderWidget.h:237
vtkBorderWidget::Define
@ Define
Definition:
vtkBorderWidget.h:239
vtkBorderWidget::Manipulate
@ Manipulate
Definition:
vtkBorderWidget.h:240
vtkBorderWidget::WidgetState
int WidgetState
Definition:
vtkBorderWidget.h:235
vtkBorderWidget::SelectRegion
virtual void SelectRegion(double eventPos[2])
Subclasses generally implement this method.
vtkBorderWidget::~vtkBorderWidget
~vtkBorderWidget() override
vtkBorderWidget::SetCursor
void SetCursor(int State) override
vtkBorderWidget::vtkBorderWidget
vtkBorderWidget()
vtkBorderWidget::Selectable
vtkTypeBool Selectable
Definition:
vtkBorderWidget.h:214
vtkBorderWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition:
vtkBorderWidget.h:226
vtkBorderWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkBorderWidget::HoverLeaveAction
static void HoverLeaveAction(vtkAbstractWidget *)
vtkBorderWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkBorderWidget::SubclassMoveAction
virtual int SubclassMoveAction()
Definition:
vtkBorderWidget.h:229
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
vtkBorderWidget::SubclassEndSelectAction
virtual int SubclassEndSelectAction()
Definition:
vtkBorderWidget.h:228
vtkBorderWidget::SubclassTranslateAction
virtual int SubclassTranslateAction()
Definition:
vtkBorderWidget.h:227
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition:
vtkBorderWidget.h:184
vtkBorderWidget::GetBorderRepresentation
vtkBorderRepresentation * GetBorderRepresentation()
Return the representation as a vtkBorderRepresentation.
Definition:
vtkBorderWidget.h:192
vtkBorderWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:113
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition:
vtkWidgetRepresentation.h:60
vtkTypeBool
int vtkTypeBool
Definition:
vtkABI.h:69
vtkAbstractWidget.h
Generated on Sat Feb 25 2023 08:59:35 for VTK by
1.9.4