00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
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 vtkTypeMacro(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
00129 vtkBorderRepresentation *GetBorderRepresentation()
00130 {return reinterpret_cast<vtkBorderRepresentation*>(this->WidgetRep);}
00132
00134 virtual void CreateDefaultRepresentation();
00135
00136 protected:
00137 vtkBorderWidget();
00138 ~vtkBorderWidget();
00139
00143 virtual void SelectRegion(double eventPos[2]);
00144
00145
00146 int Selectable;
00147 int Resizable;
00148
00149
00150 static void SelectAction(vtkAbstractWidget*);
00151 static void TranslateAction(vtkAbstractWidget*);
00152 static void EndSelectAction(vtkAbstractWidget*);
00153 static void MoveAction(vtkAbstractWidget*);
00154
00155
00156
00157 virtual int SubclassSelectAction() {return 0;}
00158 virtual int SubclassTranslateAction() {return 0;}
00159 virtual int SubclassEndSelectAction() {return 0;}
00160 virtual int SubclassMoveAction() {return 0;}
00161
00162
00163 virtual void SetCursor(int State);
00164
00165
00166
00167 int WidgetState;
00168 enum _WidgetState{Start=0,Define,Manipulate,Selected};
00169
00170
00171 private:
00172 vtkBorderWidget(const vtkBorderWidget&);
00173 void operator=(const vtkBorderWidget&);
00174 };
00175
00176 #endif