VTK  9.6.2
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
84
85#ifndef vtkButtonWidget_h
86#define vtkButtonWidget_h
87
88#include "vtkAbstractWidget.h"
89#include "vtkInteractionWidgetsModule.h" // For export macro
90#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
91
92VTK_ABI_NAMESPACE_BEGIN
94
95class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkButtonWidget : public vtkAbstractWidget
96{
97public:
102
104
108 void PrintSelf(ostream& os, vtkIndent indent) override;
110
120
125 {
126 return reinterpret_cast<vtkButtonRepresentation*>(this->WidgetRep);
127 }
128
133
141 void SetEnabled(int) override;
142
143protected:
145 ~vtkButtonWidget() override = default;
146
147 // These are the events that are handled
151
152 // Manage the state of the widget
160
161private:
162 vtkButtonWidget(const vtkButtonWidget&) = delete;
163 void operator=(const vtkButtonWidget&) = delete;
164};
165
166VTK_ABI_NAMESPACE_END
167#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 *)
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:108
abstract class defines interface between the widget and widget representation classes
#define VTK_MARSHALAUTO