VTK
9.4.20250204
Main Page
Related Pages
Modules
Namespaces
Classes
Files
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
78
#ifndef vtkButtonWidget_h
79
#define vtkButtonWidget_h
80
81
#include "
vtkAbstractWidget.h
"
82
#include "
vtkDeprecation.h
"
// For VTK_DEPRECATED_IN_9_4_0
83
#include "vtkInteractionWidgetsModule.h"
// For export macro
84
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
85
86
VTK_ABI_NAMESPACE_BEGIN
87
class
vtkButtonRepresentation
;
88
89
class
VTKINTERACTIONWIDGETS_EXPORT
VTK_MARSHALAUTO
vtkButtonWidget
:
public
vtkAbstractWidget
90
{
91
public
:
95
static
vtkButtonWidget
*
New
();
96
98
101
vtkTypeMacro(
vtkButtonWidget
,
vtkAbstractWidget
);
102
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
104
110
void
SetRepresentation
(
vtkButtonRepresentation
* r)
111
{
112
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
113
}
114
118
vtkButtonRepresentation
*
GetButtonRepresentation
()
119
{
120
return
reinterpret_cast<
vtkButtonRepresentation
*
>
(this->
WidgetRep
);
121
}
122
126
VTK_DEPRECATED_IN_9_4_0
(
"Please use GetButtonRepresentation() instead."
)
127
vtkButtonRepresentation
* GetSliderRepresentation() {
return
this->GetButtonRepresentation(); }
128
132
void
CreateDefaultRepresentation
()
override
;
133
141
void
SetEnabled
(
int
)
override
;
142
143
protected
:
144
vtkButtonWidget
();
145
~vtkButtonWidget
()
override
=
default
;
146
147
// These are the events that are handled
148
static
void
SelectAction
(
vtkAbstractWidget
*);
149
static
void
MoveAction
(
vtkAbstractWidget
*);
150
static
void
EndSelectAction
(
vtkAbstractWidget
*);
151
152
// Manage the state of the widget
153
int
WidgetState
;
154
enum
WidgetStateType
155
{
156
Start = 0,
157
Hovering
,
158
Selecting
159
};
160
161
private
:
162
vtkButtonWidget
(
const
vtkButtonWidget
&) =
delete
;
163
void
operator=(
const
vtkButtonWidget
&) =
delete
;
164
};
165
166
VTK_ABI_NAMESPACE_END
167
#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:39
vtkButtonWidget
activate an n-state button
Definition
vtkButtonWidget.h:90
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:118
vtkButtonWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkButtonWidget::WidgetState
int WidgetState
Definition
vtkButtonWidget.h:153
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:110
vtkButtonWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
vtkButtonWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkButtonWidget::WidgetStateType
WidgetStateType
Definition
vtkButtonWidget.h:155
vtkButtonWidget::Hovering
@ Hovering
Definition
vtkButtonWidget.h:157
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:50
Generated on Tue Feb 4 2025 21:24:14 for VTK by
1.9.7