VTK  9.2.6
vtkButtonWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkButtonWidget.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
57
58#ifndef vtkButtonWidget_h
59#define vtkButtonWidget_h
60
61#include "vtkAbstractWidget.h"
62#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
63#include "vtkInteractionWidgetsModule.h" // For export macro
64
66
67class VTKINTERACTIONWIDGETS_EXPORT vtkButtonWidget : public vtkAbstractWidget
68{
69public:
74
76
80 void PrintSelf(ostream& os, vtkIndent indent) override;
82
92
97 {
98 return reinterpret_cast<vtkButtonRepresentation*>(this->WidgetRep);
99 }
100
105
113 void SetEnabled(int) override;
114
115protected:
117 ~vtkButtonWidget() override = default;
118
119 // These are the events that are handled
123
124 // Manage the state of the widget
132#if !defined(VTK_LEGACY_REMOVE)
133 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
135#endif
136
137private:
138 vtkButtonWidget(const vtkButtonWidget&) = delete;
139 void operator=(const vtkButtonWidget&) = delete;
140};
141
142#endif
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkWidgetRepresentation * WidgetRep
abstract class defines the representation for a vtkButtonWidget
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
~vtkButtonWidget() override=default
static void SelectAction(vtkAbstractWidget *)
vtkButtonRepresentation * GetSliderRepresentation()
Return the representation as a vtkButtonRepresentation.
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.
WidgetStateType _WidgetState
static void EndSelectAction(vtkAbstractWidget *)
a simple class to control print indentation
Definition vtkIndent.h:34
abstract class defines interface between the widget and widget representation classes
#define VTK_DEPRECATED_IN_9_2_0(reason)