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

dox/Widgets/vtkBorderWidget.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkBorderWidget.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 =========================================================================*/
00078 #ifndef __vtkBorderWidget_h
00079 #define __vtkBorderWidget_h
00080 
00081 #include "vtkAbstractWidget.h"
00082 
00083 class vtkBorderRepresentation;
00084 
00085 
00086 class VTK_WIDGETS_EXPORT vtkBorderWidget : public vtkAbstractWidget
00087 {
00088 public:
00090   static vtkBorderWidget *New();
00091 
00093 
00094   vtkTypeRevisionMacro(vtkBorderWidget,vtkAbstractWidget);
00095   void PrintSelf(ostream& os, vtkIndent indent);
00097 
00099 
00103   vtkSetMacro(Selectable,int);
00104   vtkGetMacro(Selectable,int);
00105   vtkBooleanMacro(Selectable,int);
00107 
00108 
00110 
00113   vtkSetMacro(Resizable,int);
00114   vtkGetMacro(Resizable,int);
00115   vtkBooleanMacro(Resizable,int);
00117 
00118 
00120 
00123   void SetRepresentation(vtkBorderRepresentation *r)
00124     {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
00126   
00128   virtual void CreateDefaultRepresentation();
00129 
00130 protected:
00131   vtkBorderWidget();
00132   ~vtkBorderWidget();
00133 
00137   virtual void SelectRegion(double eventPos[2]);
00138 
00139   //enable the selection of the region interior to the widget
00140   int Selectable;
00141   int Resizable;
00142 
00143   //processes the registered events
00144   static void SelectAction(vtkAbstractWidget*);
00145   static void TranslateAction(vtkAbstractWidget*);
00146   static void EndSelectAction(vtkAbstractWidget*);
00147   static void MoveAction(vtkAbstractWidget*);
00148 
00149   // Special internal methods to support subclasses handling events.
00150   // If a non-zero value is returned, the subclass is handling the event.
00151   virtual int SubclassSelectAction() {return 0;}
00152   virtual int SubclassTranslateAction() {return 0;}
00153   virtual int SubclassEndSelectAction() {return 0;}
00154   virtual int SubclassMoveAction() {return 0;}
00155   
00156   // helper methods for cursoe management
00157   virtual void SetCursor(int State);
00158 
00159 //BTX
00160   //widget state
00161   int WidgetState;
00162   enum _WidgetState{Start=0,Define,Manipulate,Selected};
00163 //ETX
00164 
00165 private:
00166   vtkBorderWidget(const vtkBorderWidget&);  //Not implemented
00167   void operator=(const vtkBorderWidget&);  //Not implemented
00168 };
00169 
00170 #endif

Generated by  doxygen 1.7.1