VTK
9.5.2
Main Page
Related Pages
Topics
Namespaces
Classes
Files
Examples
File List
File Members
Interaction
Widgets
vtkBorderWidget.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2
// SPDX-License-Identifier: BSD-3-Clause
122
123
#ifndef vtkBorderWidget_h
124
#define vtkBorderWidget_h
125
126
#include "
vtkAbstractWidget.h
"
127
#include "vtkInteractionWidgetsModule.h"
// For export macro
128
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
129
130
VTK_ABI_NAMESPACE_BEGIN
131
class
vtkBorderRepresentation
;
132
133
class
VTKINTERACTIONWIDGETS_EXPORT
VTK_MARSHALAUTO
vtkBorderWidget
:
public
vtkAbstractWidget
134
{
135
public
:
139
static
vtkBorderWidget
*
New
();
140
142
145
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
146
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
148
150
156
vtkSetMacro(
Selectable
,
vtkTypeBool
);
157
vtkGetMacro(
Selectable
,
vtkTypeBool
);
158
vtkBooleanMacro(
Selectable
,
vtkTypeBool
);
160
162
167
vtkSetMacro(
Resizable
,
vtkTypeBool
);
168
vtkGetMacro(
Resizable
,
vtkTypeBool
);
169
vtkBooleanMacro(
Resizable
,
vtkTypeBool
);
171
177
void
SetRepresentation
(
vtkBorderRepresentation
* r)
178
{
179
this->
Superclass::SetWidgetRepresentation
(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
180
}
181
185
vtkBorderRepresentation
*
GetBorderRepresentation
()
186
{
187
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);
188
}
189
193
void
CreateDefaultRepresentation
()
override
;
194
199
vtkTypeBool
GetProcessEvents
()
override
;
200
201
protected
:
202
vtkBorderWidget
();
203
~vtkBorderWidget
()
override
;
204
210
virtual
void
SelectRegion
(
double
eventPos[2]);
211
212
// enable the selection of the region interior to the widget
213
vtkTypeBool
Selectable
;
214
vtkTypeBool
Resizable
;
215
216
// processes the registered events
217
static
void
SelectAction
(
vtkAbstractWidget
*);
218
static
void
TranslateAction
(
vtkAbstractWidget
*);
219
static
void
EndSelectAction
(
vtkAbstractWidget
*);
220
static
void
MoveAction
(
vtkAbstractWidget
*);
221
static
void
HoverLeaveAction
(
vtkAbstractWidget
*);
222
223
// Special internal methods to support subclasses handling events.
224
// If a non-zero value is returned, the subclass is handling the event.
225
virtual
int
SubclassSelectAction
() {
return
0; }
226
virtual
int
SubclassTranslateAction
() {
return
0; }
227
virtual
int
SubclassEndSelectAction
() {
return
0; }
228
virtual
int
SubclassMoveAction
() {
return
0; }
229
230
// helper methods for cursoe management
231
void
SetCursor
(
int
State)
override
;
232
233
// widget state
234
int
WidgetState
;
235
enum
WidgetStateType
236
{
237
Start
= 0,
238
Define
,
239
Manipulate
,
240
Selected
241
};
242
243
private
:
244
vtkBorderWidget
(
const
vtkBorderWidget
&) =
delete
;
245
void
operator=(
const
vtkBorderWidget
&) =
delete
;
246
};
247
248
VTK_ABI_NAMESPACE_END
249
#endif
vtkAbstractWidget::vtkAbstractWidget
vtkAbstractWidget()
vtkAbstractWidget::SetWidgetRepresentation
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:197
vtkBorderRepresentation
represent a vtkBorderWidget
Definition
vtkBorderRepresentation.h:111
vtkBorderWidget
place a border around a 2D rectangular region
Definition
vtkBorderWidget.h:134
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::Resizable
vtkTypeBool Resizable
Definition
vtkBorderWidget.h:214
vtkBorderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkBorderWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBorderWidget::WidgetState
int WidgetState
Definition
vtkBorderWidget.h:234
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:213
vtkBorderWidget::WidgetStateType
WidgetStateType
Definition
vtkBorderWidget.h:236
vtkBorderWidget::Start
@ Start
Definition
vtkBorderWidget.h:237
vtkBorderWidget::Selected
@ Selected
Definition
vtkBorderWidget.h:240
vtkBorderWidget::Define
@ Define
Definition
vtkBorderWidget.h:238
vtkBorderWidget::Manipulate
@ Manipulate
Definition
vtkBorderWidget.h:239
vtkBorderWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition
vtkBorderWidget.h:225
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:228
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
vtkBorderWidget::SubclassEndSelectAction
virtual int SubclassEndSelectAction()
Definition
vtkBorderWidget.h:227
vtkBorderWidget::SubclassTranslateAction
virtual int SubclassTranslateAction()
Definition
vtkBorderWidget.h:226
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition
vtkBorderWidget.h:177
vtkBorderWidget::GetProcessEvents
vtkTypeBool GetProcessEvents() override
Reimplement ProcessEvents to disable it when using relative location with windowLocation.
vtkBorderWidget::GetBorderRepresentation
vtkBorderRepresentation * GetBorderRepresentation()
Return the representation as a vtkBorderRepresentation.
Definition
vtkBorderWidget.h:185
vtkBorderWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:108
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition
vtkWidgetRepresentation.h:68
vtkTypeBool
int vtkTypeBool
Definition
vtkABI.h:64
vtkAbstractWidget.h
vtkWrappingHints.h
VTK_MARSHALAUTO
#define VTK_MARSHALAUTO
Definition
vtkWrappingHints.h:53
Generated on
for VTK by
1.15.0