VTK  9.5.20251125
vtkHandleWidget.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
57
58#ifndef vtkHandleWidget_h
59#define vtkHandleWidget_h
60
61#include "vtkAbstractWidget.h"
62#include "vtkInteractionWidgetsModule.h" // For export macro
63#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
64
65VTK_ABI_NAMESPACE_BEGIN
67
68class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkHandleWidget : public vtkAbstractWidget
69{
70public:
75
77
81 void PrintSelf(ostream& os, vtkIndent indent) override;
83
93
98 {
99 return reinterpret_cast<vtkHandleRepresentation*>(this->WidgetRep);
100 }
101
107
109
118
120
127
129
137
139
142 vtkGetMacro(WidgetState, int);
144
146
153 vtkBooleanMacro(ShowInactive, vtkTypeBool);
155
156 // Manage the state of the widget
163
168 void SetEnabled(int enabling) override;
169
170protected:
173
174 // These are the callbacks for this widget
183 static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
184
185 // helper methods for cursor management
186 void SetCursor(int state) override;
187
191
192 // Allow resizing of handles.
194
195 // Keep representation visible when disabled
197
199
200private:
201 vtkHandleWidget(const vtkHandleWidget&) = delete;
202 void operator=(const vtkHandleWidget&) = delete;
203};
204
205VTK_ABI_NAMESPACE_END
206#endif
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkWidgetRepresentation * WidgetRep
supports function callbacks
abstract class for representing widget handles
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK class macros.
static void SelectAction(vtkAbstractWidget *)
static void ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
vtkCallbackCommand * KeyEventCallbackCommand
vtkHandleRepresentation * GetHandleRepresentation()
Return the representation as a vtkHandleRepresentation.
vtkTypeBool ShowInactive
void SetRepresentation(vtkHandleRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
static vtkHandleWidget * New()
Instantiate this class.
static void GenericAction(vtkHandleWidget *)
static void MoveAction3D(vtkAbstractWidget *)
vtkTypeBool AllowHandleResize
void SetCursor(int state) override
static void MoveAction(vtkAbstractWidget *)
void SetEnabled(int enabling) override
Enable/disable widget.
static void TranslateAction(vtkAbstractWidget *)
static void ScaleAction(vtkAbstractWidget *)
~vtkHandleWidget() override
vtkTypeBool EnableAxisConstraint
static void SelectAction3D(vtkAbstractWidget *)
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
static void EndSelectAction(vtkAbstractWidget *)
vtkTypeBool EnableTranslation
a simple class to control print indentation
Definition vtkIndent.h:108
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO