00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkContinuousValueWidget.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 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00020 00066 #ifndef __vtkContinuousValueWidget_h 00067 #define __vtkContinuousValueWidget_h 00068 00069 #include "vtkAbstractWidget.h" 00070 00071 class vtkContinuousValueWidgetRepresentation; 00072 00073 00074 class VTK_WIDGETS_EXPORT vtkContinuousValueWidget : public vtkAbstractWidget 00075 { 00076 public: 00078 00079 vtkTypeMacro(vtkContinuousValueWidget,vtkAbstractWidget); 00080 void PrintSelf(ostream& os, vtkIndent indent); 00082 00084 00087 void SetRepresentation(vtkContinuousValueWidgetRepresentation *r) 00088 {this->Superclass::SetWidgetRepresentation 00089 (reinterpret_cast<vtkWidgetRepresentation*>(r));} 00091 00093 00094 double GetValue(); 00095 void SetValue(double v); 00097 00098 protected: 00099 vtkContinuousValueWidget(); 00100 ~vtkContinuousValueWidget() {} 00101 00102 // These are the events that are handled 00103 static void SelectAction(vtkAbstractWidget*); 00104 static void EndSelectAction(vtkAbstractWidget*); 00105 static void MoveAction(vtkAbstractWidget*); 00106 00107 //BTX - manage the state of the widget 00108 int WidgetState; 00109 enum _WidgetState 00110 { 00111 Start=0, 00112 Highlighting, 00113 Adjusting 00114 }; 00115 //ETX 00116 00117 double Value; 00118 00119 private: 00120 vtkContinuousValueWidget(const vtkContinuousValueWidget&); //Not implemented 00121 void operator=(const vtkContinuousValueWidget&); //Not implemented 00122 }; 00123 00124 #endif