00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkImplicitPlaneWidget2.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 =========================================================================*/ 00097 #ifndef __vtkImplicitPlaneWidget2_h 00098 #define __vtkImplicitPlaneWidget2_h 00099 00100 #include "vtkAbstractWidget.h" 00101 00102 class vtkImplicitPlaneRepresentation; 00103 00104 00105 class VTK_WIDGETS_EXPORT vtkImplicitPlaneWidget2 : public vtkAbstractWidget 00106 { 00107 public: 00109 static vtkImplicitPlaneWidget2 *New(); 00110 00112 00113 vtkTypeMacro(vtkImplicitPlaneWidget2,vtkAbstractWidget); 00114 void PrintSelf(ostream& os, vtkIndent indent); 00116 00118 00121 void SetRepresentation(vtkImplicitPlaneRepresentation *r) 00122 {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));} 00124 00126 00127 vtkImplicitPlaneRepresentation *GetImplicitPlaneRepresentation() 00128 {return reinterpret_cast<vtkImplicitPlaneRepresentation*>(this->WidgetRep);} 00130 00132 void CreateDefaultRepresentation(); 00133 00134 protected: 00135 vtkImplicitPlaneWidget2(); 00136 ~vtkImplicitPlaneWidget2(); 00137 00138 //BTX - manage the state of the widget 00139 int WidgetState; 00140 enum _WidgetState {Start=0,Active}; 00141 //ETX 00142 00143 // These methods handle events 00144 static void SelectAction(vtkAbstractWidget*); 00145 static void TranslateAction(vtkAbstractWidget*); 00146 static void ScaleAction(vtkAbstractWidget*); 00147 static void EndSelectAction(vtkAbstractWidget*); 00148 static void MoveAction(vtkAbstractWidget*); 00149 00152 int UpdateCursorShape( int interactionState ); 00153 00154 private: 00155 vtkImplicitPlaneWidget2(const vtkImplicitPlaneWidget2&); //Not implemented 00156 void operator=(const vtkImplicitPlaneWidget2&); //Not implemented 00157 }; 00158 00159 #endif