VTK  9.3.1
vtkButtonRepresentation.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
29#ifndef vtkButtonRepresentation_h
30#define vtkButtonRepresentation_h
31
32#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
33#include "vtkInteractionWidgetsModule.h" // For export macro
34#include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
36
37VTK_ABI_NAMESPACE_BEGIN
38class VTKINTERACTIONWIDGETS_EXPORT vtkButtonRepresentation : public vtkWidgetRepresentation
39{
40public:
42
46 void PrintSelf(ostream& os, vtkIndent indent) override;
48
50
53 vtkSetClampMacro(NumberOfStates, int, 1, VTK_INT_MAX);
55
57
60 vtkGetMacro(State, int);
62
64
70 virtual void SetState(int state);
71 virtual void NextState();
72 virtual void PreviousState();
74
76 {
77 Outside = 0,
78 Inside
79 };
80#if !defined(VTK_LEGACY_REMOVE)
81 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
83#endif
84
86
100#if !defined(VTK_LEGACY_REMOVE)
101 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
103#endif
104 void Highlight(int) override;
105 vtkGetMacro(HighlightState, int);
107
111 void ShallowCopy(vtkProp* prop) override;
112
113protected:
116
117 // Values
119 int State;
121
122private:
124 void operator=(const vtkButtonRepresentation&) = delete;
125};
126
127VTK_ABI_NAMESPACE_END
128#endif
abstract class defines the representation for a vtkButtonWidget
void Highlight(int) override
These methods control the appearance of the button as it is being interacted with.
void ShallowCopy(vtkProp *prop) override
Satisfy some of vtkProp's API.
virtual void SetState(int state)
Manipulate the state.
HighlightStateType
These methods control the appearance of the button as it is being interacted with.
~vtkButtonRepresentation() override
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
virtual void NextState()
Manipulate the state.
virtual void PreviousState()
Manipulate the state.
a simple class to control print indentation
Definition vtkIndent.h:29
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:46
abstract class defines interface between the widget and widget representation classes
#define VTK_DEPRECATED_IN_9_2_0(reason)
#define VTK_INT_MAX
Definition vtkType.h:144