VTK  9.2.6
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=========================================================================*/
116#ifndef vtkBiDimensionalWidget_h
117#define vtkBiDimensionalWidget_h
118
119#include "vtkAbstractWidget.h"
120#include "vtkInteractionWidgetsModule.h" // For export macro
121
123class vtkHandleWidget;
124class vtkBiDimensionalWidgetCallback;
125
126class VTKINTERACTIONWIDGETS_EXPORT vtkBiDimensionalWidget : public vtkAbstractWidget
127{
128public:
133
135
139 void PrintSelf(ostream& os, vtkIndent indent) override;
141
147 void SetEnabled(int) override;
148
155 {
156 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
157 }
158
163 {
164 return reinterpret_cast<vtkBiDimensionalRepresentation*>(this->WidgetRep);
165 }
166
171
177
181 enum
182 {
183 EndWidgetSelectEvent = 10050
184 };
185
191
198 enum
199 {
200 Start = 0,
202 Manipulate
203 };
204
206
216 virtual void SetWidgetStateToStart();
219
223 virtual int GetWidgetState() { return this->WidgetState; }
224
225protected:
228
229 // The state of the widget
239
240 // Callback interface to capture events when
241 // placing the widget.
245
246 // The positioning handle widgets
251 vtkBiDimensionalWidgetCallback* BiDimensionalWidgetCallback1;
252 vtkBiDimensionalWidgetCallback* BiDimensionalWidgetCallback2;
253 vtkBiDimensionalWidgetCallback* BiDimensionalWidgetCallback3;
254 vtkBiDimensionalWidgetCallback* BiDimensionalWidgetCallback4;
255
256 // Methods invoked when the handles at the
257 // end points of the widget are manipulated
260
261 friend class vtkBiDimensionalWidgetCallback;
262
263private:
265 void operator=(const vtkBiDimensionalWidget&) = delete;
266};
267
268#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
represent the vtkBiDimensionalWidget
measure the bi-dimensional lengths of an object
vtkBiDimensionalRepresentation * GetBiDimensionalRepresentation()
Return the representation as a vtkBiDimensionalRepresentation.
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
virtual int GetWidgetState()
Return the current widget state.
vtkBiDimensionalWidgetCallback * BiDimensionalWidgetCallback1
static vtkBiDimensionalWidget * New()
Instantiate this class.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for a VTK class.
void SetProcessEvents(vtkTypeBool) override
Methods to change the whether the widget responds to interaction.
vtkBiDimensionalWidgetCallback * BiDimensionalWidgetCallback3
static void EndSelectAction(vtkAbstractWidget *)
vtkBiDimensionalWidgetCallback * BiDimensionalWidgetCallback4
virtual void EndBiDimensionalInteraction()
virtual void SetWidgetStateToStart()
Set the state of the widget.
~vtkBiDimensionalWidget() override
vtkBiDimensionalWidgetCallback * BiDimensionalWidgetCallback2
int IsMeasureValid()
A flag indicates whether the bi-dimensional measure is valid.
void SetRepresentation(vtkBiDimensionalRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
void SetEnabled(int) override
The method for activating and deactivating this widget.
static void MoveAction(vtkAbstractWidget *)
virtual void SetWidgetStateToManipulate()
Set the state of the widget.
static void AddPointAction(vtkAbstractWidget *)
void StartBiDimensionalInteraction()
a general widget for moving handles
a simple class to control print indentation
Definition: vtkIndent.h:119
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition: vtkABI.h:69