• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Widgets/vtkAngleWidget.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkAngleWidget.h,v
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 =========================================================================*/
00076 #ifndef __vtkAngleWidget_h
00077 #define __vtkAngleWidget_h
00078 
00079 #include "vtkAbstractWidget.h"
00080 
00081 class vtkAngleRepresentation;
00082 class vtkHandleWidget;
00083 class vtkAngleWidgetCallback;
00084 
00085 
00086 class VTK_WIDGETS_EXPORT vtkAngleWidget : public vtkAbstractWidget
00087 {
00088 public:
00090   static vtkAngleWidget *New();
00091 
00093 
00094   vtkTypeRevisionMacro(vtkAngleWidget,vtkAbstractWidget);
00095   void PrintSelf(ostream& os, vtkIndent indent);
00097 
00101   virtual void SetEnabled(int);
00102 
00104 
00107   void SetRepresentation(vtkAngleRepresentation *r)
00108     {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
00110   
00112   void CreateDefaultRepresentation();
00113 
00116   int IsAngleValid();
00117 
00120   virtual void SetProcessEvents(int);
00121 
00122 protected:
00123   vtkAngleWidget();
00124   ~vtkAngleWidget();
00125 
00126   // The state of the widget
00127 //BTX
00128   enum {Start=0,Define,Manipulate};
00129 //ETX
00130   int WidgetState;
00131   int CurrentHandle;
00132 
00133   // Callback interface to capture events when
00134   // placing the widget.
00135   static void AddPointAction(vtkAbstractWidget*);
00136   static void MoveAction(vtkAbstractWidget*);
00137   static void EndSelectAction(vtkAbstractWidget*);
00138   
00139   // The positioning handle widgets
00140   vtkHandleWidget *Point1Widget;
00141   vtkHandleWidget *CenterWidget;
00142   vtkHandleWidget *Point2Widget;
00143   vtkAngleWidgetCallback *AngleWidgetCallback1;
00144   vtkAngleWidgetCallback *AngleWidgetCenterCallback;
00145   vtkAngleWidgetCallback *AngleWidgetCallback2;
00146   
00147   // Methods invoked when the handles at the
00148   // end points of the widget are manipulated
00149   void StartAngleInteraction(int handleNum);
00150   void AngleInteraction(int handleNum);
00151   void EndAngleInteraction(int handleNum);
00152   
00153 //BTX
00154   friend class vtkAngleWidgetCallback;
00155 //ETX  
00156 
00157 private:
00158   vtkAngleWidget(const vtkAngleWidget&);  //Not implemented
00159   void operator=(const vtkAngleWidget&);  //Not implemented
00160 };
00161 
00162 #endif

Generated by  doxygen 1.7.1