VTK  9.0.1
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 =========================================================================*/
46 #ifndef vtkCheckerboardWidget_h
47 #define vtkCheckerboardWidget_h
48 
49 #include "vtkAbstractWidget.h"
50 #include "vtkInteractionWidgetsModule.h" // For export macro
51 
53 class vtkSliderWidget;
54 
55 class VTKINTERACTIONWIDGETS_EXPORT vtkCheckerboardWidget : public vtkAbstractWidget
56 {
57 public:
62 
64 
68  void PrintSelf(ostream& os, vtkIndent indent) override;
70 
76  void SetEnabled(int) override;
77 
84  {
85  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
86  }
87 
92  {
93  return reinterpret_cast<vtkCheckerboardRepresentation*>(this->WidgetRep);
94  }
95 
99  void CreateDefaultRepresentation() override;
100 
101 protected:
104 
105  // The four slider widgets
110 
111  // Callback interface
113  void CheckerboardInteraction(int sliderNum);
115 
116  friend class vtkCWCallback;
117 
118 private:
120  void operator=(const vtkCheckerboardWidget&) = delete;
121 };
122 
123 #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
void EndCheckerboardInteraction()
void CheckerboardInteraction(int sliderNum)
vtkSliderWidget * BottomSlider
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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.
static vtkCheckerboardWidget * New()
Instantiate this class.
vtkSliderWidget * RightSlider
a simple class to control print indentation
Definition: vtkIndent.h:34
set a value by manipulating a slider
abstract class defines interface between the widget and widget representation classes