VTK
9.3.0
Main Page
Related Pages
Topics
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
46
#ifndef vtkButtonWidget_h
47
#define vtkButtonWidget_h
48
49
#include "
vtkAbstractWidget.h
"
50
#include "
vtkDeprecation.h
"
// For VTK_DEPRECATED_IN_9_2_0
51
#include "vtkInteractionWidgetsModule.h"
// For export macro
52
#include "vtkLegacy.h"
// for VTK_LEGACY_REMOVE
53
54
VTK_ABI_NAMESPACE_BEGIN
55
class
vtkButtonRepresentation
;
56
57
class
VTKINTERACTIONWIDGETS_EXPORT
vtkButtonWidget
:
public
vtkAbstractWidget
58
{
59
public
:
63
static
vtkButtonWidget
*
New
();
64
66
69
vtkTypeMacro(
vtkButtonWidget
,
vtkAbstractWidget
);
70
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
72
78
void
SetRepresentation
(
vtkButtonRepresentation
* r)
79
{
80
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
81
}
82
86
vtkButtonRepresentation
*
GetSliderRepresentation
()
87
{
88
return
reinterpret_cast<
vtkButtonRepresentation
*
>
(this->
WidgetRep
);
89
}
90
94
void
CreateDefaultRepresentation
()
override
;
95
103
void
SetEnabled
(
int
)
override
;
104
105
protected
:
106
vtkButtonWidget
();
107
~vtkButtonWidget
()
override
=
default
;
108
109
// These are the events that are handled
110
static
void
SelectAction
(
vtkAbstractWidget
*);
111
static
void
MoveAction
(
vtkAbstractWidget
*);
112
static
void
EndSelectAction
(
vtkAbstractWidget
*);
113
114
// Manage the state of the widget
115
int
WidgetState
;
116
enum
WidgetStateType
117
{
118
Start = 0,
119
Hovering
,
120
Selecting
121
};
122
#if !defined(VTK_LEGACY_REMOVE)
123
VTK_DEPRECATED_IN_9_2_0
(
"because leading underscore is reserved"
)
124
typedef
WidgetStateType
_WidgetState
;
125
#endif
126
127
private
:
128
vtkButtonWidget
(
const
vtkButtonWidget
&) =
delete
;
129
void
operator=(
const
vtkButtonWidget
&) =
delete
;
130
};
131
132
VTK_ABI_NAMESPACE_END
133
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition
vtkAbstractWidget.h:52
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:166
vtkButtonRepresentation
abstract class defines the representation for a vtkButtonWidget
Definition
vtkButtonRepresentation.h:36
vtkButtonWidget
activate an n-state button
Definition
vtkButtonWidget.h:58
vtkButtonWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkButtonWidget::~vtkButtonWidget
~vtkButtonWidget() override=default
vtkButtonWidget::vtkButtonWidget
vtkButtonWidget()
vtkButtonWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkButtonWidget::WidgetState
int WidgetState
Definition
vtkButtonWidget.h:115
vtkButtonWidget::GetSliderRepresentation
vtkButtonRepresentation * GetSliderRepresentation()
Return the representation as a vtkButtonRepresentation.
Definition
vtkButtonWidget.h:86
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:78
vtkButtonWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
vtkButtonWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkButtonWidget::WidgetStateType
WidgetStateType
Definition
vtkButtonWidget.h:117
vtkButtonWidget::Hovering
@ Hovering
Definition
vtkButtonWidget.h:119
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:65
vtkAbstractWidget.h
vtkDeprecation.h
VTK_DEPRECATED_IN_9_2_0
#define VTK_DEPRECATED_IN_9_2_0(reason)
Definition
vtkDeprecation.h:108
Generated on Sat Feb 15 2025 13:13:19 for VTK by
1.9.8