VTK
vtkBiDimensionalWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBiDimensionalWidget.h,v
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
99 #ifndef __vtkBiDimensionalWidget_h
100 #define __vtkBiDimensionalWidget_h
101 
102 #include "vtkAbstractWidget.h"
103 
105 class vtkHandleWidget;
106 class vtkBiDimensionalWidgetCallback;
107 
108 
110 {
111 public:
113  static vtkBiDimensionalWidget *New();
114 
116 
118  void PrintSelf(ostream& os, vtkIndent indent);
120 
124  virtual void SetEnabled(int);
125 
127 
131  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
133 
135 
137  {return reinterpret_cast<vtkBiDimensionalRepresentation*>(this->WidgetRep);}
139 
142 
145  int IsMeasureValid();
146 
147  //BTX
149 
150  enum
151  {
152  EndWidgetSelectEvent = 10050
153  };
154  //ETX
156 
159  virtual void SetProcessEvents(int);
160 
162 
166  enum {Start=0,Define,Manipulate};
167  //ETX
169 
171 
179  virtual void SetWidgetStateToStart();
180  virtual void SetWidgetStateToManipulate();
182 
184 
185  virtual int GetWidgetState()
186  {return this->WidgetState;}
188 
189 protected:
192 
193  // The state of the widget
203 
204  // Callback interface to capture events when
205  // placing the widget.
206  static void AddPointAction(vtkAbstractWidget*);
207  static void MoveAction(vtkAbstractWidget*);
208  static void EndSelectAction(vtkAbstractWidget*);
209 
210  // The positioning handle widgets
215  vtkBiDimensionalWidgetCallback *BiDimensionalWidgetCallback1;
216  vtkBiDimensionalWidgetCallback *BiDimensionalWidgetCallback2;
217  vtkBiDimensionalWidgetCallback *BiDimensionalWidgetCallback3;
218  vtkBiDimensionalWidgetCallback *BiDimensionalWidgetCallback4;
219 
220  // Methods invoked when the handles at the
221  // end points of the widget are manipulated
222  void StartBiDimensionalInteraction();
223  virtual void EndBiDimensionalInteraction();
224 
225 //BTX
226  friend class vtkBiDimensionalWidgetCallback;
227 //ETX
228 
229 private:
230  vtkBiDimensionalWidget(const vtkBiDimensionalWidget&); //Not implemented
231  void operator=(const vtkBiDimensionalWidget&); //Not implemented
232 };
233 
234 #endif
measure the bi-dimensional lengths of an object
void PrintSelf(ostream &os, vtkIndent indent)
vtkBiDimensionalWidgetCallback * BiDimensionalWidgetCallback1
represent the vtkBiDimensionalWidget
virtual void SetProcessEvents(int)
a general widget for moving handles
virtual void CreateDefaultRepresentation()=0
vtkBiDimensionalWidgetCallback * BiDimensionalWidgetCallback4
vtkWidgetRepresentation * WidgetRep
void SetRepresentation(vtkBiDimensionalRepresentation *r)
vtkBiDimensionalWidgetCallback * BiDimensionalWidgetCallback2
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_WIDGETS_EXPORT
define the API for widget / widget representation
static vtkObject * New()
virtual void SetEnabled(int)
vtkBiDimensionalWidgetCallback * BiDimensionalWidgetCallback3
vtkBiDimensionalRepresentation * GetBiDimensionalRepresentation()