VTK
9.6.1
Main Page
Related Pages
Topics
Namespaces
Classes
Files
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
66
67
#ifndef vtkBorderWidget_h
68
#define vtkBorderWidget_h
69
70
#include "
vtkAbstractWidget.h
"
71
#include "vtkInteractionWidgetsModule.h"
// For export macro
72
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
73
74
VTK_ABI_NAMESPACE_BEGIN
75
class
vtkBorderRepresentation
;
76
77
class
VTKINTERACTIONWIDGETS_EXPORT
VTK_MARSHALAUTO
vtkBorderWidget
:
public
vtkAbstractWidget
78
{
79
public
:
83
static
vtkBorderWidget
*
New
();
84
86
89
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
90
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
92
94
100
vtkSetMacro(
Selectable
,
vtkTypeBool
);
101
vtkGetMacro(
Selectable
,
vtkTypeBool
);
102
vtkBooleanMacro(
Selectable
,
vtkTypeBool
);
104
106
111
vtkSetMacro(
Resizable
,
vtkTypeBool
);
112
vtkGetMacro(
Resizable
,
vtkTypeBool
);
113
vtkBooleanMacro(
Resizable
,
vtkTypeBool
);
115
121
void
SetRepresentation
(
vtkBorderRepresentation
* r)
122
{
123
this->
Superclass::SetWidgetRepresentation
(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
124
}
125
129
vtkBorderRepresentation
*
GetBorderRepresentation
()
130
{
131
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);
132
}
133
137
void
CreateDefaultRepresentation
()
override
;
138
143
vtkTypeBool
GetProcessEvents
()
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
static
void
HoverLeaveAction
(
vtkAbstractWidget
*);
166
167
// Special internal methods to support subclasses handling events.
168
// If a non-zero value is returned, the subclass is handling the event.
169
virtual
int
SubclassSelectAction
() {
return
0; }
170
virtual
int
SubclassTranslateAction
() {
return
0; }
171
virtual
int
SubclassEndSelectAction
() {
return
0; }
172
virtual
int
SubclassMoveAction
() {
return
0; }
173
174
// helper methods for cursoe management
175
void
SetCursor
(
int
State)
override
;
176
177
// widget state
178
int
WidgetState
;
179
enum
WidgetStateType
180
{
181
Start
= 0,
182
Define
,
183
Manipulate
,
184
Selected
185
};
186
187
private
:
188
vtkBorderWidget
(
const
vtkBorderWidget
&) =
delete
;
189
void
operator=(
const
vtkBorderWidget
&) =
delete
;
190
};
191
192
VTK_ABI_NAMESPACE_END
193
#endif
vtkAbstractWidget::vtkAbstractWidget
vtkAbstractWidget()
vtkAbstractWidget::SetWidgetRepresentation
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:171
vtkBorderRepresentation
represent a vtkBorderWidget
Definition
vtkBorderRepresentation.h:52
vtkBorderWidget
place a border around a 2D rectangular region
Definition
vtkBorderWidget.h:78
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::Resizable
vtkTypeBool Resizable
Definition
vtkBorderWidget.h:158
vtkBorderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkBorderWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBorderWidget::WidgetState
int WidgetState
Definition
vtkBorderWidget.h:178
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:157
vtkBorderWidget::WidgetStateType
WidgetStateType
Definition
vtkBorderWidget.h:180
vtkBorderWidget::Start
@ Start
Definition
vtkBorderWidget.h:181
vtkBorderWidget::Selected
@ Selected
Definition
vtkBorderWidget.h:184
vtkBorderWidget::Define
@ Define
Definition
vtkBorderWidget.h:182
vtkBorderWidget::Manipulate
@ Manipulate
Definition
vtkBorderWidget.h:183
vtkBorderWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition
vtkBorderWidget.h:169
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:172
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
vtkBorderWidget::SubclassEndSelectAction
virtual int SubclassEndSelectAction()
Definition
vtkBorderWidget.h:171
vtkBorderWidget::SubclassTranslateAction
virtual int SubclassTranslateAction()
Definition
vtkBorderWidget.h:170
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition
vtkBorderWidget.h:121
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:129
vtkBorderWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:29
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:60
Generated on
for VTK by
1.16.1