00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkContinuousValueWidgetRepresentation.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 /*------------------------------------------------------------------------- 00017 Copyright 2008 Sandia Corporation. 00018 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00019 the U.S. Government retains certain rights in this software. 00020 -------------------------------------------------------------------------*/ 00021 00029 #ifndef __vtkContinuousValueWidgetRepresentation_h 00030 #define __vtkContinuousValueWidgetRepresentation_h 00031 00032 #include "vtkWidgetRepresentation.h" 00033 00034 class VTK_WIDGETS_EXPORT vtkContinuousValueWidgetRepresentation : 00035 public vtkWidgetRepresentation 00036 { 00037 public: 00039 00040 vtkTypeMacro(vtkContinuousValueWidgetRepresentation, 00041 vtkWidgetRepresentation); 00042 void PrintSelf(ostream& os, vtkIndent indent); 00044 00046 00049 virtual void PlaceWidget(double bounds[6]); 00050 virtual void BuildRepresentation() {}; 00051 virtual void StartWidgetInteraction(double eventPos[2]) = 0; 00052 virtual void WidgetInteraction(double eventPos[2]) = 0; 00053 // virtual void Highlight(int); 00055 00056 //BTX 00057 // Enums are used to describe what is selected 00058 enum _InteractionState 00059 { 00060 Outside=0, 00061 Inside, 00062 Adjusting 00063 }; 00064 //ETX 00065 00066 // Set/Get the value 00067 virtual void SetValue(double value); 00068 virtual double GetValue() {return this->Value;}; 00069 00070 protected: 00071 vtkContinuousValueWidgetRepresentation(); 00072 ~vtkContinuousValueWidgetRepresentation(); 00073 00074 double Value; 00075 00076 private: 00077 vtkContinuousValueWidgetRepresentation 00078 (const vtkContinuousValueWidgetRepresentation&); //Not implemented 00079 void operator=(const vtkContinuousValueWidgetRepresentation&); // Not implemented 00080 }; 00081 00082 #endif