VTK
dox/Widgets/vtkSphereWidget2.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkSphereWidget2.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 =========================================================================*/
00095 #ifndef __vtkSphereWidget2_h
00096 #define __vtkSphereWidget2_h
00097 
00098 #include "vtkAbstractWidget.h"
00099 
00100 class vtkSphereRepresentation;
00101 class vtkHandleWidget;
00102 
00103 
00104 class VTK_WIDGETS_EXPORT vtkSphereWidget2 : public vtkAbstractWidget
00105 {
00106 public:
00108   static vtkSphereWidget2 *New();
00109 
00111 
00112   vtkTypeMacro(vtkSphereWidget2,vtkAbstractWidget);
00113   void PrintSelf(ostream& os, vtkIndent indent);
00115 
00117 
00120   void SetRepresentation(vtkSphereRepresentation *r)
00121     {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
00123   
00125 
00127   vtkSetMacro(TranslationEnabled,int);
00128   vtkGetMacro(TranslationEnabled,int);
00129   vtkBooleanMacro(TranslationEnabled,int);
00130   vtkSetMacro(ScalingEnabled,int);
00131   vtkGetMacro(ScalingEnabled,int);
00132   vtkBooleanMacro(ScalingEnabled,int);
00134 
00137   void CreateDefaultRepresentation();
00138 
00139 protected:
00140   vtkSphereWidget2();
00141   ~vtkSphereWidget2();
00142 
00143 //BTX - manage the state of the widget
00144   int WidgetState;
00145   enum _WidgetState {Start=0,Active};
00146 //ETX
00147   
00148   // These methods handle events
00149   static void SelectAction(vtkAbstractWidget*);
00150   static void EndSelectAction(vtkAbstractWidget*);
00151   static void TranslateAction(vtkAbstractWidget*);
00152   static void ScaleAction(vtkAbstractWidget*);
00153   static void MoveAction(vtkAbstractWidget*);
00154 
00155   // Control whether scaling and translation are supported
00156   int TranslationEnabled;
00157   int ScalingEnabled;
00158 
00159 private:
00160   vtkSphereWidget2(const vtkSphereWidget2&);  //Not implemented
00161   void operator=(const vtkSphereWidget2&);  //Not implemented
00162 };
00163 
00164 #endif