VTK
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 "vtkInteractionWidgetsModule.h" // For export macro
50 #include "vtkAbstractWidget.h"
51 
53 class vtkSliderWidget;
54 
55 
56 class VTKINTERACTIONWIDGETS_EXPORT vtkCheckerboardWidget : public vtkAbstractWidget
57 {
58 public:
62  static vtkCheckerboardWidget *New();
63 
65 
69  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
71 
77  void SetEnabled(int) VTK_OVERRIDE;
78 
84  void SetRepresentation(vtkCheckerboardRepresentation *r)
85  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
86 
91  {return reinterpret_cast<vtkCheckerboardRepresentation*>(this->WidgetRep);}
92 
96  void CreateDefaultRepresentation() VTK_OVERRIDE;
97 
98 protected:
100  ~vtkCheckerboardWidget() VTK_OVERRIDE;
101 
102  // The four slider widgets
103  vtkSliderWidget *TopSlider;
104  vtkSliderWidget *RightSlider;
105  vtkSliderWidget *BottomSlider;
106  vtkSliderWidget *LeftSlider;
107 
108  // Callback interface
109  void StartCheckerboardInteraction();
110  void CheckerboardInteraction(int sliderNum);
111  void EndCheckerboardInteraction();
112 
113  friend class vtkCWCallback;
114 
115 private:
116  vtkCheckerboardWidget(const vtkCheckerboardWidget&) VTK_DELETE_FUNCTION;
117  void operator=(const vtkCheckerboardWidget&) VTK_DELETE_FUNCTION;
118 };
119 
120 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
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:33
set a value by manipulating a slider
define the API for widget / widget representation
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