VTK  9.3.0
vtkCheckerboardWidget.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
37#ifndef vtkCheckerboardWidget_h
38#define vtkCheckerboardWidget_h
39
40#include "vtkAbstractWidget.h"
41#include "vtkInteractionWidgetsModule.h" // For export macro
42
43VTK_ABI_NAMESPACE_BEGIN
45class vtkSliderWidget;
46
47class VTKINTERACTIONWIDGETS_EXPORT vtkCheckerboardWidget : public vtkAbstractWidget
48{
49public:
54
56
60 void PrintSelf(ostream& os, vtkIndent indent) override;
62
68 void SetEnabled(int) override;
69
76 {
77 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
78 }
79
84 {
85 return reinterpret_cast<vtkCheckerboardRepresentation*>(this->WidgetRep);
86 }
87
92
93protected:
96
97 // The four slider widgets
102
103 // Callback interface
105 void CheckerboardInteraction(int sliderNum);
107
108 friend class vtkCWCallback;
109
110private:
112 void operator=(const vtkCheckerboardWidget&) = delete;
113};
114
115VTK_ABI_NAMESPACE_END
116#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
represent the vtkCheckerboardWidget
interactively set the number of divisions in 2D image checkerboard
void SetRepresentation(vtkCheckerboardRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
~vtkCheckerboardWidget() override
static vtkCheckerboardWidget * New()
Instantiate this class.
void EndCheckerboardInteraction()
void CheckerboardInteraction(int sliderNum)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for a VTK class.
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
void StartCheckerboardInteraction()
void SetEnabled(int) override
The method for activating and deactivating this widget.
vtkCheckerboardRepresentation * GetCheckerboardRepresentation()
Return the representation as a vtkCheckerboardRepresentation.
vtkSliderWidget * RightSlider
a simple class to control print indentation
Definition vtkIndent.h:29
set a value by manipulating a slider
abstract class defines interface between the widget and widget representation classes