VTK
9.5.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
Interaction
Widgets
vtkButtonWidget.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
88
#ifndef vtkButtonWidget_h
89
#define vtkButtonWidget_h
90
91
#include "
vtkAbstractWidget.h
"
92
#include "
vtkDeprecation.h
"
// For VTK_DEPRECATED_IN_9_4_0
93
#include "vtkInteractionWidgetsModule.h"
// For export macro
94
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
95
96
VTK_ABI_NAMESPACE_BEGIN
97
class
vtkButtonRepresentation
;
98
99
class
VTKINTERACTIONWIDGETS_EXPORT
VTK_MARSHALAUTO
vtkButtonWidget
:
public
vtkAbstractWidget
100
{
101
public
:
105
static
vtkButtonWidget
*
New
();
106
108
111
vtkTypeMacro(
vtkButtonWidget
,
vtkAbstractWidget
);
112
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
114
120
void
SetRepresentation
(
vtkButtonRepresentation
* r)
121
{
122
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
123
}
124
128
vtkButtonRepresentation
*
GetButtonRepresentation
()
129
{
130
return
reinterpret_cast<
vtkButtonRepresentation
*
>
(this->
WidgetRep
);
131
}
132
136
VTK_DEPRECATED_IN_9_4_0
(
"Please use GetButtonRepresentation() instead."
)
137
vtkButtonRepresentation
* GetSliderRepresentation() {
return
this->GetButtonRepresentation(); }
138
142
void
CreateDefaultRepresentation
()
override
;
143
151
void
SetEnabled
(
int
)
override
;
152
153
protected
:
154
vtkButtonWidget
();
155
~vtkButtonWidget
()
override
=
default
;
156
157
// These are the events that are handled
158
static
void
SelectAction
(
vtkAbstractWidget
*);
159
static
void
MoveAction
(
vtkAbstractWidget
*);
160
static
void
EndSelectAction
(
vtkAbstractWidget
*);
161
162
// Manage the state of the widget
163
int
WidgetState
;
164
enum
WidgetStateType
165
{
166
Start = 0,
167
Hovering
,
168
Selecting
169
};
170
171
private
:
172
vtkButtonWidget
(
const
vtkButtonWidget
&) =
delete
;
173
void
operator=(
const
vtkButtonWidget
&) =
delete
;
174
};
175
176
VTK_ABI_NAMESPACE_END
177
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition
vtkAbstractWidget.h:86
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:200
vtkButtonRepresentation
abstract class defines the representation for a vtkButtonWidget
Definition
vtkButtonRepresentation.h:58
vtkButtonWidget
activate an n-state button
Definition
vtkButtonWidget.h:100
vtkButtonWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkButtonWidget::~vtkButtonWidget
~vtkButtonWidget() override=default
vtkButtonWidget::vtkButtonWidget
vtkButtonWidget()
vtkButtonWidget::GetButtonRepresentation
vtkButtonRepresentation * GetButtonRepresentation()
Return the representation as a vtkButtonRepresentation.
Definition
vtkButtonWidget.h:128
vtkButtonWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkButtonWidget::WidgetState
int WidgetState
Definition
vtkButtonWidget.h:163
vtkButtonWidget::SetEnabled
void SetEnabled(int) override
The method for activating and deactivating this widget.
vtkButtonWidget::New
static vtkButtonWidget * New()
Instantiate the class.
vtkButtonWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkButtonWidget::SetRepresentation
void SetRepresentation(vtkButtonRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition
vtkButtonWidget.h:120
vtkButtonWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
vtkButtonWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkButtonWidget::WidgetStateType
WidgetStateType
Definition
vtkButtonWidget.h:165
vtkButtonWidget::Hovering
@ Hovering
Definition
vtkButtonWidget.h:167
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
vtkAbstractWidget.h
vtkDeprecation.h
VTK_DEPRECATED_IN_9_4_0
#define VTK_DEPRECATED_IN_9_4_0(reason)
Definition
vtkDeprecation.h:108
vtkWrappingHints.h
VTK_MARSHALAUTO
#define VTK_MARSHALAUTO
Definition
vtkWrappingHints.h:53
Generated on Wed Sep 17 2025 20:13:37 for VTK by
1.9.7