VTK  9.2.6
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 =========================================================================*/
52 #ifndef vtkCheckerboardWidget_h
53 #define vtkCheckerboardWidget_h
54 
55 #include "vtkAbstractWidget.h"
56 #include "vtkInteractionWidgetsModule.h" // For export macro
57 
59 class vtkSliderWidget;
60 
61 class VTKINTERACTIONWIDGETS_EXPORT vtkCheckerboardWidget : public vtkAbstractWidget
62 {
63 public:
67  static vtkCheckerboardWidget* New();
68 
70 
74  void PrintSelf(ostream& os, vtkIndent indent) override;
76 
82  void SetEnabled(int) override;
83 
90  {
91  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
92  }
93 
98  {
99  return reinterpret_cast<vtkCheckerboardRepresentation*>(this->WidgetRep);
100  }
101 
105  void CreateDefaultRepresentation() override;
106 
107 protected:
109  ~vtkCheckerboardWidget() override;
110 
111  // The four slider widgets
116 
117  // Callback interface
118  void StartCheckerboardInteraction();
119  void CheckerboardInteraction(int sliderNum);
120  void EndCheckerboardInteraction();
121 
122  friend class vtkCWCallback;
123 
124 private:
126  void operator=(const vtkCheckerboardWidget&) = delete;
127 };
128 
129 #endif
vtkSliderWidget * RightSlider
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
void SetRepresentation(vtkCheckerboardRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene...
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkCheckerboardRepresentation * GetCheckerboardRepresentation()
Return the representation as a vtkCheckerboardRepresentation.
interactively set the number of divisions in 2D image checkerboard
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSliderWidget * BottomSlider
set a value by manipulating a slider
define the API for widget / widget representation
vtkSliderWidget * LeftSlider
void SetEnabled(int) override
Methods for activating this widget.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent the vtkCheckerboardWidget