VTK  9.1.0
vtkCheckerboardWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkCheckerboardWidget.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=========================================================================*/
71#ifndef vtkCheckerboardWidget_h
72#define vtkCheckerboardWidget_h
73
74#include "vtkAbstractWidget.h"
75#include "vtkInteractionWidgetsModule.h" // For export macro
76
78class vtkSliderWidget;
79
80class VTKINTERACTIONWIDGETS_EXPORT vtkCheckerboardWidget : public vtkAbstractWidget
81{
82public:
87
89
93 void PrintSelf(ostream& os, vtkIndent indent) override;
95
101 void SetEnabled(int) override;
102
109 {
110 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
111 }
112
117 {
118 return reinterpret_cast<vtkCheckerboardRepresentation*>(this->WidgetRep);
119 }
120
125
126protected:
129
130 // The four slider widgets
135
136 // Callback interface
138 void CheckerboardInteraction(int sliderNum);
140
141 friend class vtkCWCallback;
142
143private:
145 void operator=(const vtkCheckerboardWidget&) = delete;
146};
147
148#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)
vtkSliderWidget * BottomSlider
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for a VTK class.
vtkSliderWidget * LeftSlider
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:113
set a value by manipulating a slider
abstract class defines interface between the widget and widget representation classes