VTK
dox/Widgets/vtkContinuousValueWidget.h
Go to the documentation of this file.
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 
00095   vtkContinuousValueWidgetRepresentation *GetContinuousValueWidgetRepresentation()
00096     {return reinterpret_cast<vtkContinuousValueWidgetRepresentation*>(this->WidgetRep);}
00098 
00100 
00101   double GetValue();
00102   void SetValue(double v);
00104 
00105 protected:
00106   vtkContinuousValueWidget();
00107   ~vtkContinuousValueWidget() {}
00108   
00109   // These are the events that are handled
00110   static void SelectAction(vtkAbstractWidget*);
00111   static void EndSelectAction(vtkAbstractWidget*);
00112   static void MoveAction(vtkAbstractWidget*);
00113 
00114 //BTX - manage the state of the widget
00115   int WidgetState;
00116   enum _WidgetState
00117   {
00118     Start=0,
00119     Highlighting,
00120     Adjusting
00121   };
00122 //ETX
00123 
00124   double Value;
00125 
00126 private:
00127   vtkContinuousValueWidget(const vtkContinuousValueWidget&);  //Not implemented
00128   void operator=(const vtkContinuousValueWidget&);  //Not implemented
00129 };
00130 
00131 #endif