00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkCheckerboardWidget.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00051 #ifndef __vtkCheckerboardWidget_h 00052 #define __vtkCheckerboardWidget_h 00053 00054 #include "vtkAbstractWidget.h" 00055 00056 class vtkCheckerboardRepresentation; 00057 class vtkSliderWidget; 00058 00059 00060 class VTK_WIDGETS_EXPORT vtkCheckerboardWidget : public vtkAbstractWidget 00061 { 00062 public: 00064 static vtkCheckerboardWidget *New(); 00065 00067 00068 vtkTypeMacro(vtkCheckerboardWidget,vtkAbstractWidget); 00069 void PrintSelf(ostream& os, vtkIndent indent); 00071 00075 virtual void SetEnabled(int); 00076 00078 00081 void SetRepresentation(vtkCheckerboardRepresentation *r) 00082 {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));} 00084 00086 00087 vtkCheckerboardRepresentation *GetCheckerboardRepresentation() 00088 {return reinterpret_cast<vtkCheckerboardRepresentation*>(this->WidgetRep);} 00090 00092 void CreateDefaultRepresentation(); 00093 00094 protected: 00095 vtkCheckerboardWidget(); 00096 ~vtkCheckerboardWidget(); 00097 00098 // The four slider widgets 00099 vtkSliderWidget *TopSlider; 00100 vtkSliderWidget *RightSlider; 00101 vtkSliderWidget *BottomSlider; 00102 vtkSliderWidget *LeftSlider; 00103 00104 // Callback interface 00105 void StartCheckerboardInteraction(); 00106 void CheckerboardInteraction(int sliderNum); 00107 void EndCheckerboardInteraction(); 00108 00109 //BTX 00110 friend class vtkCWCallback; 00111 //ETX 00112 00113 private: 00114 vtkCheckerboardWidget(const vtkCheckerboardWidget&); //Not implemented 00115 void operator=(const vtkCheckerboardWidget&); //Not implemented 00116 }; 00117 00118 #endif