VTK  9.3.20240422
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
59#ifndef vtkCheckerboardWidget_h
60#define vtkCheckerboardWidget_h
61
62#include "vtkAbstractWidget.h"
63#include "vtkInteractionWidgetsModule.h" // For export macro
64#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
65
66VTK_ABI_NAMESPACE_BEGIN
68class vtkSliderWidget;
69
70class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkCheckerboardWidget : public vtkAbstractWidget
71{
72public:
77
79
83 void PrintSelf(ostream& os, vtkIndent indent) override;
85
91 void SetEnabled(int) override;
92
99 {
100 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
101 }
102
107 {
108 return reinterpret_cast<vtkCheckerboardRepresentation*>(this->WidgetRep);
109 }
110
115
116protected:
119
120 // The four slider widgets
125
126 // Callback interface
128 void CheckerboardInteraction(int sliderNum);
130
131 friend class vtkCWCallback;
132
133private:
135 void operator=(const vtkCheckerboardWidget&) = delete;
136};
137
138VTK_ABI_NAMESPACE_END
139#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.
a simple class to control print indentation
Definition vtkIndent.h:108
set a value by manipulating a slider
abstract class defines interface between the widget and widget representation classes
#define VTK_MARSHALAUTO