VTK  9.3.0
vtkMagnifierWidget.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
33#ifndef vtkMagnifierWidget_h
34#define vtkMagnifierWidget_h
35
36#include "vtkAbstractWidget.h"
37#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
38#include "vtkInteractionWidgetsModule.h" // For export macro
39#include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
40
41VTK_ABI_NAMESPACE_BEGIN
43
44class VTKINTERACTIONWIDGETS_EXPORT vtkMagnifierWidget : public vtkAbstractWidget
45{
46public:
51
53
57 void PrintSelf(ostream& os, vtkIndent indent) override;
59
66 {
67 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
68 }
69
74 {
75 return reinterpret_cast<vtkMagnifierRepresentation*>(this->WidgetRep);
76 }
77
82
87 void SetEnabled(int enabling) override;
88
90
96 vtkSetMacro(KeyPressIncreaseValue, char);
97 vtkGetMacro(KeyPressIncreaseValue, char);
98 vtkSetMacro(KeyPressDecreaseValue, char);
99 vtkGetMacro(KeyPressDecreaseValue, char);
101
102protected:
105
106 // Keypresses to change value
109
110 // process the registered events
113
116 {
117 Invisible = 0,
118 Visible
119 };
120#if !defined(VTK_LEGACY_REMOVE)
121 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
123#endif
124
125private:
126 vtkMagnifierWidget(const vtkMagnifierWidget&) = delete;
127 void operator=(const vtkMagnifierWidget&) = delete;
128};
129
130VTK_ABI_NAMESPACE_END
131#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition vtkIndent.h:29
represent a vtkBorderWidget
create a moving, magnifying renderer that can inspect the contents of an encapsulating renderer.
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
static void CharAction(vtkAbstractWidget *)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the this widget must activate the representation.
~vtkMagnifierWidget() override
static void MoveAction(vtkAbstractWidget *)
void SetRepresentation(vtkMagnifierRepresentation *r)
Specify an instance of vtkMagnifierRepresentation used to represent this widget in the scene.
vtkMagnifierRepresentation * GetMagnifierRepresentation()
Return the representation as a vtkBorderRepresentation.
static vtkMagnifierWidget * New()
Method to instantiate class.
abstract class defines interface between the widget and widget representation classes
#define VTK_DEPRECATED_IN_9_2_0(reason)