VTK  9.5.2
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
54
55#ifndef vtkHandleWidget_h
56#define vtkHandleWidget_h
57
58#include "vtkAbstractWidget.h"
59#include "vtkInteractionWidgetsModule.h" // For export macro
60#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
61
62VTK_ABI_NAMESPACE_BEGIN
64
65class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkHandleWidget : public vtkAbstractWidget
66{
67public:
72
74
78 void PrintSelf(ostream& os, vtkIndent indent) override;
80
90
95 {
96 return reinterpret_cast<vtkHandleRepresentation*>(this->WidgetRep);
97 }
98
104
106
115
117
124
126
134
136
139 vtkGetMacro(WidgetState, int);
141
143
150 vtkBooleanMacro(ShowInactive, vtkTypeBool);
152
153 // Manage the state of the widget
160
165 void SetEnabled(int enabling) override;
166
167protected:
170
171 // These are the callbacks for this widget
180 static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
181
182 // helper methods for cursor management
183 void SetCursor(int state) override;
184
188
189 // Allow resizing of handles.
191
192 // Keep representation visible when disabled
194
196
197private:
198 vtkHandleWidget(const vtkHandleWidget&) = delete;
199 void operator=(const vtkHandleWidget&) = delete;
200};
201
202VTK_ABI_NAMESPACE_END
203#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:29
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO