VTK  9.4.20250114
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
36#ifndef vtkMagnifierWidget_h
37#define vtkMagnifierWidget_h
38
39#include "vtkAbstractWidget.h"
40#include "vtkInteractionWidgetsModule.h" // For export macro
41#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
42
43VTK_ABI_NAMESPACE_BEGIN
45
46class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkMagnifierWidget : public vtkAbstractWidget
47{
48public:
53
55
59 void PrintSelf(ostream& os, vtkIndent indent) override;
61
68 {
69 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
70 }
71
76 {
77 return reinterpret_cast<vtkMagnifierRepresentation*>(this->WidgetRep);
78 }
79
84
89 void SetEnabled(int enabling) override;
90
92
98 vtkSetMacro(KeyPressIncreaseValue, char);
99 vtkGetMacro(KeyPressIncreaseValue, char);
100 vtkSetMacro(KeyPressDecreaseValue, char);
101 vtkGetMacro(KeyPressDecreaseValue, char);
103
104protected:
107
108 // Keypresses to change value
111
112 // process the registered events
115
118 {
119 Invisible = 0,
120 Visible
121 };
122
123private:
124 vtkMagnifierWidget(const vtkMagnifierWidget&) = delete;
125 void operator=(const vtkMagnifierWidget&) = delete;
126};
127
128VTK_ABI_NAMESPACE_END
129#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition vtkIndent.h:108
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_MARSHALAUTO