VTK
|
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 "vtkInteractionWidgetsModule.h" // For export macro 00055 #include "vtkAbstractWidget.h" 00056 00057 class vtkCheckerboardRepresentation; 00058 class vtkSliderWidget; 00059 00060 00061 class VTKINTERACTIONWIDGETS_EXPORT vtkCheckerboardWidget : public vtkAbstractWidget 00062 { 00063 public: 00065 static vtkCheckerboardWidget *New(); 00066 00068 00069 vtkTypeMacro(vtkCheckerboardWidget,vtkAbstractWidget); 00070 void PrintSelf(ostream& os, vtkIndent indent); 00072 00076 virtual void SetEnabled(int); 00077 00079 00082 void SetRepresentation(vtkCheckerboardRepresentation *r) 00083 {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));} 00085 00087 00088 vtkCheckerboardRepresentation *GetCheckerboardRepresentation() 00089 {return reinterpret_cast<vtkCheckerboardRepresentation*>(this->WidgetRep);} 00091 00093 void CreateDefaultRepresentation(); 00094 00095 protected: 00096 vtkCheckerboardWidget(); 00097 ~vtkCheckerboardWidget(); 00098 00099 // The four slider widgets 00100 vtkSliderWidget *TopSlider; 00101 vtkSliderWidget *RightSlider; 00102 vtkSliderWidget *BottomSlider; 00103 vtkSliderWidget *LeftSlider; 00104 00105 // Callback interface 00106 void StartCheckerboardInteraction(); 00107 void CheckerboardInteraction(int sliderNum); 00108 void EndCheckerboardInteraction(); 00109 00110 //BTX 00111 friend class vtkCWCallback; 00112 //ETX 00113 00114 private: 00115 vtkCheckerboardWidget(const vtkCheckerboardWidget&); //Not implemented 00116 void operator=(const vtkCheckerboardWidget&); //Not implemented 00117 }; 00118 00119 #endif