VTK  9.2.6
vtkHandleWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkHandleWidget.h
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=========================================================================*/
69
70#ifndef vtkHandleWidget_h
71#define vtkHandleWidget_h
72
73#include "vtkAbstractWidget.h"
74#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
75#include "vtkInteractionWidgetsModule.h" // For export macro
76
78
79class VTKINTERACTIONWIDGETS_EXPORT vtkHandleWidget : public vtkAbstractWidget
80{
81public:
86
88
92 void PrintSelf(ostream& os, vtkIndent indent) override;
94
104
109 {
110 return reinterpret_cast<vtkHandleRepresentation*>(this->WidgetRep);
111 }
112
118
120
129
131
138
140
148
150
153 vtkGetMacro(WidgetState, int);
155
157
164 vtkBooleanMacro(ShowInactive, vtkTypeBool);
166
167 // Manage the state of the widget
174#if !defined(VTK_LEGACY_REMOVE)
175 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
177#endif
178
183 void SetEnabled(int enabling) override;
184
185protected:
188
189 // These are the callbacks for this widget
198 static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
199
200 // helper methods for cursor management
201 void SetCursor(int state) override;
202
206
207 // Allow resizing of handles.
209
210 // Keep representation visible when disabled
212
214
215private:
216 vtkHandleWidget(const vtkHandleWidget&) = delete;
217 void operator=(const vtkHandleWidget&) = delete;
218};
219
220#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 *)
WidgetStateType _WidgetState
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:40
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_DEPRECATED_IN_9_2_0(reason)