VTK
9.5.2
Main Page
Related Pages
Topics
Namespaces
Classes
Files
Examples
File List
File Members
Interaction
Widgets
vtkHandleWidget.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
54
55
#ifndef vtkHandleWidget_h
56
#define vtkHandleWidget_h
57
58
#include "
vtkAbstractWidget.h
"
59
#include "vtkInteractionWidgetsModule.h"
// For export macro
60
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
61
62
VTK_ABI_NAMESPACE_BEGIN
63
class
vtkHandleRepresentation
;
64
65
class
VTKINTERACTIONWIDGETS_EXPORT
VTK_MARSHALAUTO
vtkHandleWidget
:
public
vtkAbstractWidget
66
{
67
public
:
71
static
vtkHandleWidget
*
New
();
72
74
77
vtkTypeMacro(
vtkHandleWidget
,
vtkAbstractWidget
);
78
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
80
86
void
SetRepresentation
(
vtkHandleRepresentation
* r)
87
{
88
this->
Superclass::SetWidgetRepresentation
(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
89
}
90
94
vtkHandleRepresentation
*
GetHandleRepresentation
()
95
{
96
return
reinterpret_cast<
vtkHandleRepresentation
*
>
(this->
WidgetRep
);
97
}
98
103
void
CreateDefaultRepresentation
()
override
;
104
106
111
vtkSetMacro(
EnableAxisConstraint
,
vtkTypeBool
);
112
vtkGetMacro(
EnableAxisConstraint
,
vtkTypeBool
);
113
vtkBooleanMacro(
EnableAxisConstraint
,
vtkTypeBool
);
115
117
120
vtkSetMacro(
EnableTranslation
,
vtkTypeBool
);
121
vtkGetMacro(
EnableTranslation
,
vtkTypeBool
);
122
vtkBooleanMacro(
EnableTranslation
,
vtkTypeBool
);
124
126
130
vtkSetMacro(
AllowHandleResize
,
vtkTypeBool
);
131
vtkGetMacro(
AllowHandleResize
,
vtkTypeBool
);
132
vtkBooleanMacro(
AllowHandleResize
,
vtkTypeBool
);
134
136
139
vtkGetMacro(
WidgetState
,
int
);
141
143
148
vtkSetMacro(
ShowInactive
,
vtkTypeBool
);
149
vtkGetMacro(
ShowInactive
,
vtkTypeBool
);
150
vtkBooleanMacro(
ShowInactive
,
vtkTypeBool
);
152
153
// Manage the state of the widget
154
enum
WidgetStateType
155
{
156
Start
= 0,
157
Active
,
158
Inactive
159
};
160
165
void
SetEnabled
(
int
enabling)
override
;
166
167
protected
:
168
vtkHandleWidget
();
169
~vtkHandleWidget
()
override
;
170
171
// These are the callbacks for this widget
172
static
void
GenericAction
(
vtkHandleWidget
*);
173
static
void
SelectAction
(
vtkAbstractWidget
*);
174
static
void
EndSelectAction
(
vtkAbstractWidget
*);
175
static
void
TranslateAction
(
vtkAbstractWidget
*);
176
static
void
ScaleAction
(
vtkAbstractWidget
*);
177
static
void
MoveAction
(
vtkAbstractWidget
*);
178
static
void
SelectAction3D
(
vtkAbstractWidget
*);
179
static
void
MoveAction3D
(
vtkAbstractWidget
*);
180
static
void
ProcessKeyEvents
(
vtkObject
*,
unsigned
long
,
void
*,
void
*);
181
182
// helper methods for cursor management
183
void
SetCursor
(
int
state)
override
;
184
185
int
WidgetState
;
186
vtkTypeBool
EnableAxisConstraint
;
187
vtkTypeBool
EnableTranslation
;
188
189
// Allow resizing of handles.
190
vtkTypeBool
AllowHandleResize
;
191
192
// Keep representation visible when disabled
193
vtkTypeBool
ShowInactive
;
194
195
vtkCallbackCommand
*
KeyEventCallbackCommand
;
196
197
private
:
198
vtkHandleWidget
(
const
vtkHandleWidget
&) =
delete
;
199
void
operator=(
const
vtkHandleWidget
&) =
delete
;
200
};
201
202
VTK_ABI_NAMESPACE_END
203
#endif
vtkAbstractWidget::vtkAbstractWidget
vtkAbstractWidget()
vtkAbstractWidget::SetWidgetRepresentation
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:168
vtkCallbackCommand
supports function callbacks
Definition
vtkCallbackCommand.h:40
vtkHandleRepresentation
abstract class for representing widget handles
Definition
vtkHandleRepresentation.h:50
vtkHandleWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK class macros.
vtkHandleWidget::vtkHandleWidget
vtkHandleWidget()
vtkHandleWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkHandleWidget::ProcessKeyEvents
static void ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
vtkHandleWidget::KeyEventCallbackCommand
vtkCallbackCommand * KeyEventCallbackCommand
Definition
vtkHandleWidget.h:195
vtkHandleWidget::GetHandleRepresentation
vtkHandleRepresentation * GetHandleRepresentation()
Return the representation as a vtkHandleRepresentation.
Definition
vtkHandleWidget.h:94
vtkHandleWidget::ShowInactive
vtkTypeBool ShowInactive
Definition
vtkHandleWidget.h:193
vtkHandleWidget::SetRepresentation
void SetRepresentation(vtkHandleRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition
vtkHandleWidget.h:86
vtkHandleWidget::New
static vtkHandleWidget * New()
Instantiate this class.
vtkHandleWidget::GenericAction
static void GenericAction(vtkHandleWidget *)
vtkHandleWidget::MoveAction3D
static void MoveAction3D(vtkAbstractWidget *)
vtkHandleWidget::AllowHandleResize
vtkTypeBool AllowHandleResize
Definition
vtkHandleWidget.h:190
vtkHandleWidget::SetCursor
void SetCursor(int state) override
vtkHandleWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkHandleWidget::SetEnabled
void SetEnabled(int enabling) override
Enable/disable widget.
vtkHandleWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkHandleWidget::WidgetState
int WidgetState
Definition
vtkHandleWidget.h:185
vtkHandleWidget::ScaleAction
static void ScaleAction(vtkAbstractWidget *)
vtkHandleWidget::~vtkHandleWidget
~vtkHandleWidget() override
vtkHandleWidget::EnableAxisConstraint
vtkTypeBool EnableAxisConstraint
Definition
vtkHandleWidget.h:186
vtkHandleWidget::SelectAction3D
static void SelectAction3D(vtkAbstractWidget *)
vtkHandleWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkHandleWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkHandleWidget::WidgetStateType
WidgetStateType
Definition
vtkHandleWidget.h:155
vtkHandleWidget::Start
@ Start
Definition
vtkHandleWidget.h:156
vtkHandleWidget::Active
@ Active
Definition
vtkHandleWidget.h:157
vtkHandleWidget::Inactive
@ Inactive
Definition
vtkHandleWidget.h:158
vtkHandleWidget::EnableTranslation
vtkTypeBool EnableTranslation
Definition
vtkHandleWidget.h:187
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:29
vtkObject::vtkObject
vtkObject()
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