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
63
64
#ifndef vtkBorderWidget_h
65
#define vtkBorderWidget_h
66
67
#include "
vtkAbstractWidget.h
"
68
#include "vtkInteractionWidgetsModule.h"
// For export macro
69
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
70
71
VTK_ABI_NAMESPACE_BEGIN
72
class
vtkBorderRepresentation
;
73
74
class
VTKINTERACTIONWIDGETS_EXPORT
VTK_MARSHALAUTO
vtkBorderWidget
:
public
vtkAbstractWidget
75
{
76
public
:
80
static
vtkBorderWidget
*
New
();
81
83
86
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
87
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
89
91
97
vtkSetMacro(
Selectable
,
vtkTypeBool
);
98
vtkGetMacro(
Selectable
,
vtkTypeBool
);
99
vtkBooleanMacro(
Selectable
,
vtkTypeBool
);
101
103
108
vtkSetMacro(
Resizable
,
vtkTypeBool
);
109
vtkGetMacro(
Resizable
,
vtkTypeBool
);
110
vtkBooleanMacro(
Resizable
,
vtkTypeBool
);
112
118
void
SetRepresentation
(
vtkBorderRepresentation
* r)
119
{
120
this->
Superclass::SetWidgetRepresentation
(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
121
}
122
126
vtkBorderRepresentation
*
GetBorderRepresentation
()
127
{
128
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);
129
}
130
134
void
CreateDefaultRepresentation
()
override
;
135
140
vtkTypeBool
GetProcessEvents
()
override
;
141
142
protected
:
143
vtkBorderWidget
();
144
~vtkBorderWidget
()
override
;
145
151
virtual
void
SelectRegion
(
double
eventPos[2]);
152
153
// enable the selection of the region interior to the widget
154
vtkTypeBool
Selectable
;
155
vtkTypeBool
Resizable
;
156
157
// processes the registered events
158
static
void
SelectAction
(
vtkAbstractWidget
*);
159
static
void
TranslateAction
(
vtkAbstractWidget
*);
160
static
void
EndSelectAction
(
vtkAbstractWidget
*);
161
static
void
MoveAction
(
vtkAbstractWidget
*);
162
static
void
HoverLeaveAction
(
vtkAbstractWidget
*);
163
164
// Special internal methods to support subclasses handling events.
165
// If a non-zero value is returned, the subclass is handling the event.
166
virtual
int
SubclassSelectAction
() {
return
0; }
167
virtual
int
SubclassTranslateAction
() {
return
0; }
168
virtual
int
SubclassEndSelectAction
() {
return
0; }
169
virtual
int
SubclassMoveAction
() {
return
0; }
170
171
// helper methods for cursoe management
172
void
SetCursor
(
int
State)
override
;
173
174
// widget state
175
int
WidgetState
;
176
enum
WidgetStateType
177
{
178
Start
= 0,
179
Define
,
180
Manipulate
,
181
Selected
182
};
183
184
private
:
185
vtkBorderWidget
(
const
vtkBorderWidget
&) =
delete
;
186
void
operator=(
const
vtkBorderWidget
&) =
delete
;
187
};
188
189
VTK_ABI_NAMESPACE_END
190
#endif
vtkAbstractWidget::vtkAbstractWidget
vtkAbstractWidget()
vtkAbstractWidget::SetWidgetRepresentation
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:168
vtkBorderRepresentation
represent a vtkBorderWidget
Definition
vtkBorderRepresentation.h:52
vtkBorderWidget
place a border around a 2D rectangular region
Definition
vtkBorderWidget.h:75
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::Resizable
vtkTypeBool Resizable
Definition
vtkBorderWidget.h:155
vtkBorderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkBorderWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBorderWidget::WidgetState
int WidgetState
Definition
vtkBorderWidget.h:175
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:154
vtkBorderWidget::WidgetStateType
WidgetStateType
Definition
vtkBorderWidget.h:177
vtkBorderWidget::Start
@ Start
Definition
vtkBorderWidget.h:178
vtkBorderWidget::Selected
@ Selected
Definition
vtkBorderWidget.h:181
vtkBorderWidget::Define
@ Define
Definition
vtkBorderWidget.h:179
vtkBorderWidget::Manipulate
@ Manipulate
Definition
vtkBorderWidget.h:180
vtkBorderWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition
vtkBorderWidget.h:166
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:169
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
vtkBorderWidget::SubclassEndSelectAction
virtual int SubclassEndSelectAction()
Definition
vtkBorderWidget.h:168
vtkBorderWidget::SubclassTranslateAction
virtual int SubclassTranslateAction()
Definition
vtkBorderWidget.h:167
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition
vtkBorderWidget.h:118
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:126
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:53
Generated on
for VTK by
1.15.0