VTK  9.3.0
vtkBiDimensionalWidget.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
85#ifndef vtkBiDimensionalWidget_h
86#define vtkBiDimensionalWidget_h
87
88#include "vtkAbstractWidget.h"
89#include "vtkInteractionWidgetsModule.h" // For export macro
90
91VTK_ABI_NAMESPACE_BEGIN
93class vtkHandleWidget;
94class vtkBiDimensionalWidgetCallback;
95
96class VTKINTERACTIONWIDGETS_EXPORT vtkBiDimensionalWidget : public vtkAbstractWidget
97{
98public:
103
105
109 void PrintSelf(ostream& os, vtkIndent indent) override;
111
117 void SetEnabled(int) override;
118
125 {
126 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
127 }
128
133 {
134 return reinterpret_cast<vtkBiDimensionalRepresentation*>(this->WidgetRep);
135 }
136
141
147
151 enum
152 {
153 EndWidgetSelectEvent = 10050
154 };
155
161
168 enum
169 {
170 Start = 0,
172 Manipulate
173 };
174
176
186 virtual void SetWidgetStateToStart();
189
193 virtual int GetWidgetState() { return this->WidgetState; }
194
195protected:
198
199 // The state of the widget
209
210 // Callback interface to capture events when
211 // placing the widget.
215
216 // The positioning handle widgets
221 vtkBiDimensionalWidgetCallback* BiDimensionalWidgetCallback1;
222 vtkBiDimensionalWidgetCallback* BiDimensionalWidgetCallback2;
223 vtkBiDimensionalWidgetCallback* BiDimensionalWidgetCallback3;
224 vtkBiDimensionalWidgetCallback* BiDimensionalWidgetCallback4;
225
226 // Methods invoked when the handles at the
227 // end points of the widget are manipulated
230
231 friend class vtkBiDimensionalWidgetCallback;
232
233private:
235 void operator=(const vtkBiDimensionalWidget&) = delete;
236};
237
238VTK_ABI_NAMESPACE_END
239#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:29
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:64