VTK  9.4.20251007
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
48
49#ifndef vtkButtonWidget_h
50#define vtkButtonWidget_h
51
52#include "vtkAbstractWidget.h"
53#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_4_0
54#include "vtkInteractionWidgetsModule.h" // For export macro
55#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
56
57VTK_ABI_NAMESPACE_BEGIN
59
60class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkButtonWidget : public vtkAbstractWidget
61{
62public:
67
69
73 void PrintSelf(ostream& os, vtkIndent indent) override;
75
85
90 {
91 return reinterpret_cast<vtkButtonRepresentation*>(this->WidgetRep);
92 }
93
97 VTK_DEPRECATED_IN_9_4_0("Please use GetButtonRepresentation() instead.")
99
104
112 void SetEnabled(int) override;
113
114protected:
116 ~vtkButtonWidget() override = default;
117
118 // These are the events that are handled
122
123 // Manage the state of the widget
131
132private:
133 vtkButtonWidget(const vtkButtonWidget&) = delete;
134 void operator=(const vtkButtonWidget&) = delete;
135};
136
137VTK_ABI_NAMESPACE_END
138#endif
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkWidgetRepresentation * WidgetRep
abstract class defines the representation for a vtkButtonWidget
activate an n-state button
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
~vtkButtonWidget() override=default
vtkButtonRepresentation * GetButtonRepresentation()
Return the representation as a vtkButtonRepresentation.
static void SelectAction(vtkAbstractWidget *)
vtkButtonRepresentation * GetSliderRepresentation()
Incorrect name for GetButtonRepresentation(), for backwards compatibility.
void SetEnabled(int) override
The method for activating and deactivating this widget.
static vtkButtonWidget * New()
Instantiate the class.
static void MoveAction(vtkAbstractWidget *)
void SetRepresentation(vtkButtonRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
static void EndSelectAction(vtkAbstractWidget *)
a simple class to control print indentation
Definition vtkIndent.h:29
abstract class defines interface between the widget and widget representation classes
#define VTK_DEPRECATED_IN_9_4_0(reason)
#define VTK_MARSHALAUTO