VTK
dox/Interaction/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 "vtkInteractionWidgetsModule.h" // For export macro
00070 #include "vtkAbstractWidget.h"
00071 
00072 class vtkContinuousValueWidgetRepresentation;
00073 
00074 
00075 class VTKINTERACTIONWIDGETS_EXPORT vtkContinuousValueWidget : public vtkAbstractWidget
00076 {
00077 public:
00079 
00080   vtkTypeMacro(vtkContinuousValueWidget,vtkAbstractWidget);
00081   void PrintSelf(ostream& os, vtkIndent indent);
00083 
00085 
00088   void SetRepresentation(vtkContinuousValueWidgetRepresentation *r)
00089   {this->Superclass::SetWidgetRepresentation
00090      (reinterpret_cast<vtkWidgetRepresentation*>(r));}
00092 
00094 
00096   vtkContinuousValueWidgetRepresentation *GetContinuousValueWidgetRepresentation()
00097     {return reinterpret_cast<vtkContinuousValueWidgetRepresentation*>(this->WidgetRep);}
00099 
00101 
00102   double GetValue();
00103   void SetValue(double v);
00105 
00106 protected:
00107   vtkContinuousValueWidget();
00108   ~vtkContinuousValueWidget() {}
00109 
00110   // These are the events that are handled
00111   static void SelectAction(vtkAbstractWidget*);
00112   static void EndSelectAction(vtkAbstractWidget*);
00113   static void MoveAction(vtkAbstractWidget*);
00114 
00115 //BTX - manage the state of the widget
00116   int WidgetState;
00117   enum _WidgetState
00118   {
00119     Start=0,
00120     Highlighting,
00121     Adjusting
00122   };
00123 //ETX
00124 
00125   double Value;
00126 
00127 private:
00128   vtkContinuousValueWidget(const vtkContinuousValueWidget&);  //Not implemented
00129   void operator=(const vtkContinuousValueWidget&);  //Not implemented
00130 };
00131 
00132 #endif