VTK
|
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 "vtkInteractionWidgetsModule.h" // For export macro 00033 #include "vtkWidgetRepresentation.h" 00034 00035 class VTKINTERACTIONWIDGETS_EXPORT vtkContinuousValueWidgetRepresentation : 00036 public vtkWidgetRepresentation 00037 { 00038 public: 00040 00041 vtkTypeMacro(vtkContinuousValueWidgetRepresentation, 00042 vtkWidgetRepresentation); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00050 virtual void PlaceWidget(double bounds[6]); 00051 virtual void BuildRepresentation() {} 00052 virtual void StartWidgetInteraction(double eventPos[2]) = 0; 00053 virtual void WidgetInteraction(double eventPos[2]) = 0; 00054 // virtual void Highlight(int); 00056 00057 //BTX 00058 // Enums are used to describe what is selected 00059 enum _InteractionState 00060 { 00061 Outside=0, 00062 Inside, 00063 Adjusting 00064 }; 00065 //ETX 00066 00067 // Set/Get the value 00068 virtual void SetValue(double value); 00069 virtual double GetValue() {return this->Value;}; 00070 00071 protected: 00072 vtkContinuousValueWidgetRepresentation(); 00073 ~vtkContinuousValueWidgetRepresentation(); 00074 00075 double Value; 00076 00077 private: 00078 vtkContinuousValueWidgetRepresentation 00079 (const vtkContinuousValueWidgetRepresentation&); //Not implemented 00080 void operator=(const vtkContinuousValueWidgetRepresentation&); // Not implemented 00081 }; 00082 00083 #endif