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

dox/Widgets/vtkHandleWidget.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkHandleWidget.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 =========================================================================*/
00069 #ifndef __vtkHandleWidget_h
00070 #define __vtkHandleWidget_h
00071 
00072 #include "vtkAbstractWidget.h"
00073 
00074 class vtkHandleRepresentation;
00075 
00076 
00077 class VTK_WIDGETS_EXPORT vtkHandleWidget : public vtkAbstractWidget
00078 {
00079 public:
00081   static vtkHandleWidget *New();
00082 
00084 
00085   vtkTypeRevisionMacro(vtkHandleWidget,vtkAbstractWidget);
00086   void PrintSelf(ostream& os, vtkIndent indent);
00088 
00090 
00093   void SetRepresentation(vtkHandleRepresentation *r)
00094     {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
00096   
00099   void CreateDefaultRepresentation();
00100   
00102 
00105   vtkSetMacro( EnableAxisConstraint, int );
00106   vtkGetMacro( EnableAxisConstraint, int );
00107   vtkBooleanMacro( EnableAxisConstraint, int );
00109 
00111 
00113   vtkSetMacro( AllowHandleResize, int );
00114   vtkGetMacro( AllowHandleResize, int );
00115   vtkBooleanMacro( AllowHandleResize, int );
00117 
00119 
00120   vtkGetMacro( WidgetState, int );
00122 
00123   //BTX - manage the state of the widget
00124   enum _WidgetState {Start=0,Active};
00125   //ETX
00126   
00127 protected:
00128   vtkHandleWidget();
00129   ~vtkHandleWidget();
00130 
00131   // These are the callbacks for this widget
00132   static void GenericAction(vtkHandleWidget*);
00133   static void SelectAction(vtkAbstractWidget*);
00134   static void EndSelectAction(vtkAbstractWidget*);
00135   static void TranslateAction(vtkAbstractWidget*);
00136   static void ScaleAction(vtkAbstractWidget*);
00137   static void MoveAction(vtkAbstractWidget*);
00138 
00139   // helper methods for cursor management
00140   void SetCursor(int state);
00141 
00142   int WidgetState;
00143   int EnableAxisConstraint;
00144 
00145   // Allow resizing of handles.
00146   int AllowHandleResize;
00147 
00148 private:
00149   vtkHandleWidget(const vtkHandleWidget&);  //Not implemented
00150   void operator=(const vtkHandleWidget&);  //Not implemented
00151 };
00152 
00153 #endif

Generated by  doxygen 1.7.1