VTK
9.4.20241221
Main Page
Related Pages
Modules
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
126
#ifndef vtkBorderWidget_h
127
#define vtkBorderWidget_h
128
129
#include "
vtkAbstractWidget.h
"
130
#include "vtkInteractionWidgetsModule.h"
// For export macro
131
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
132
133
VTK_ABI_NAMESPACE_BEGIN
134
class
vtkBorderRepresentation
;
135
136
class
VTKINTERACTIONWIDGETS_EXPORT
VTK_MARSHALAUTO
vtkBorderWidget
:
public
vtkAbstractWidget
137
{
138
public
:
142
static
vtkBorderWidget
*
New
();
143
145
148
vtkTypeMacro(
vtkBorderWidget
,
vtkAbstractWidget
);
149
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
151
153
159
vtkSetMacro(Selectable,
vtkTypeBool
);
160
vtkGetMacro(Selectable,
vtkTypeBool
);
161
vtkBooleanMacro(Selectable,
vtkTypeBool
);
163
165
170
vtkSetMacro(Resizable,
vtkTypeBool
);
171
vtkGetMacro(Resizable,
vtkTypeBool
);
172
vtkBooleanMacro(Resizable,
vtkTypeBool
);
174
180
void
SetRepresentation
(
vtkBorderRepresentation
* r)
181
{
182
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
183
}
184
188
vtkBorderRepresentation
*
GetBorderRepresentation
()
189
{
190
return
reinterpret_cast<
vtkBorderRepresentation
*
>
(this->
WidgetRep
);
191
}
192
196
void
CreateDefaultRepresentation
()
override
;
197
202
vtkTypeBool
GetProcessEvents
()
override
;
203
204
protected
:
205
vtkBorderWidget
();
206
~vtkBorderWidget
()
override
;
207
213
virtual
void
SelectRegion
(
double
eventPos[2]);
214
215
// enable the selection of the region interior to the widget
216
vtkTypeBool
Selectable
;
217
vtkTypeBool
Resizable
;
218
219
// processes the registered events
220
static
void
SelectAction
(
vtkAbstractWidget
*);
221
static
void
TranslateAction
(
vtkAbstractWidget
*);
222
static
void
EndSelectAction
(
vtkAbstractWidget
*);
223
static
void
MoveAction
(
vtkAbstractWidget
*);
224
static
void
HoverLeaveAction
(
vtkAbstractWidget
*);
225
226
// Special internal methods to support subclasses handling events.
227
// If a non-zero value is returned, the subclass is handling the event.
228
virtual
int
SubclassSelectAction
() {
return
0; }
229
virtual
int
SubclassTranslateAction
() {
return
0; }
230
virtual
int
SubclassEndSelectAction
() {
return
0; }
231
virtual
int
SubclassMoveAction
() {
return
0; }
232
233
// helper methods for cursoe management
234
void
SetCursor
(
int
State)
override
;
235
236
// widget state
237
int
WidgetState
;
238
enum
WidgetStateType
239
{
240
Start = 0,
241
Define
,
242
Manipulate
,
243
Selected
244
};
245
246
private
:
247
vtkBorderWidget
(
const
vtkBorderWidget
&) =
delete
;
248
void
operator=(
const
vtkBorderWidget
&) =
delete
;
249
};
250
251
VTK_ABI_NAMESPACE_END
252
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition
vtkAbstractWidget.h:86
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:200
vtkBorderRepresentation
represent a vtkBorderWidget
Definition
vtkBorderRepresentation.h:111
vtkBorderWidget
place a border around a 2D rectangular region
Definition
vtkBorderWidget.h:137
vtkBorderWidget::New
static vtkBorderWidget * New()
Method to instantiate class.
vtkBorderWidget::Resizable
vtkTypeBool Resizable
Definition
vtkBorderWidget.h:217
vtkBorderWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkBorderWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBorderWidget::WidgetState
int WidgetState
Definition
vtkBorderWidget.h:237
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:216
vtkBorderWidget::WidgetStateType
WidgetStateType
Definition
vtkBorderWidget.h:239
vtkBorderWidget::Define
@ Define
Definition
vtkBorderWidget.h:241
vtkBorderWidget::Manipulate
@ Manipulate
Definition
vtkBorderWidget.h:242
vtkBorderWidget::SubclassSelectAction
virtual int SubclassSelectAction()
Definition
vtkBorderWidget.h:228
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:231
vtkBorderWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
vtkBorderWidget::SubclassEndSelectAction
virtual int SubclassEndSelectAction()
Definition
vtkBorderWidget.h:230
vtkBorderWidget::SubclassTranslateAction
virtual int SubclassTranslateAction()
Definition
vtkBorderWidget.h:229
vtkBorderWidget::SetRepresentation
void SetRepresentation(vtkBorderRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition
vtkBorderWidget.h:180
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:188
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:50
Generated on Sat Dec 21 2024 12:52:46 for VTK by
1.9.7