VTK
9.5.20251126
Interaction
Widgets
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
35
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
43
VTK_ABI_NAMESPACE_BEGIN
44
class
vtkMagnifierRepresentation
;
45
46
class
VTKINTERACTIONWIDGETS_EXPORT
VTK_MARSHALAUTO
vtkMagnifierWidget
:
public
vtkAbstractWidget
47
{
48
public
:
52
static
vtkMagnifierWidget
*
New
();
53
55
58
vtkTypeMacro(
vtkMagnifierWidget
,
vtkAbstractWidget
);
59
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
61
67
void
SetRepresentation
(
vtkMagnifierRepresentation
* r)
68
{
69
this->
Superclass::SetWidgetRepresentation
(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
70
}
71
75
vtkMagnifierRepresentation
*
GetMagnifierRepresentation
()
76
{
77
return
reinterpret_cast<
vtkMagnifierRepresentation
*
>
(this->
WidgetRep
);
78
}
79
83
void
CreateDefaultRepresentation
()
override
;
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
104
protected
:
105
vtkMagnifierWidget
();
106
~vtkMagnifierWidget
()
override
;
107
108
// Keypresses to change value
109
char
KeyPressIncreaseValue
;
110
char
KeyPressDecreaseValue
;
111
112
// process the registered events
113
static
void
MoveAction
(
vtkAbstractWidget
*);
114
static
void
CharAction
(
vtkAbstractWidget
*);
115
116
int
WidgetState
;
117
enum
WidgetStateType
118
{
119
Invisible
= 0,
120
Visible
121
};
122
123
private
:
124
vtkMagnifierWidget
(
const
vtkMagnifierWidget
&) =
delete
;
125
void
operator=(
const
vtkMagnifierWidget
&) =
delete
;
126
};
127
128
VTK_ABI_NAMESPACE_END
129
#endif
vtkAbstractWidget::vtkAbstractWidget
vtkAbstractWidget()
vtkAbstractWidget::SetWidgetRepresentation
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:200
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:108
vtkMagnifierRepresentation
represent a vtkBorderWidget
Definition
vtkMagnifierRepresentation.h:38
vtkMagnifierWidget
create a moving, magnifying renderer that can inspect the contents of an encapsulating renderer.
Definition
vtkMagnifierWidget.h:47
vtkMagnifierWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkMagnifierWidget::CharAction
static void CharAction(vtkAbstractWidget *)
vtkMagnifierWidget::WidgetStateType
WidgetStateType
Definition
vtkMagnifierWidget.h:118
vtkMagnifierWidget::Invisible
@ Invisible
Definition
vtkMagnifierWidget.h:119
vtkMagnifierWidget::Visible
@ Visible
Definition
vtkMagnifierWidget.h:120
vtkMagnifierWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for class.
vtkMagnifierWidget::WidgetState
int WidgetState
Definition
vtkMagnifierWidget.h:116
vtkMagnifierWidget::KeyPressIncreaseValue
char KeyPressIncreaseValue
Definition
vtkMagnifierWidget.h:109
vtkMagnifierWidget::SetEnabled
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the this widget must activate the representation.
vtkMagnifierWidget::KeyPressDecreaseValue
char KeyPressDecreaseValue
Definition
vtkMagnifierWidget.h:110
vtkMagnifierWidget::~vtkMagnifierWidget
~vtkMagnifierWidget() override
vtkMagnifierWidget::vtkMagnifierWidget
vtkMagnifierWidget()
vtkMagnifierWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkMagnifierWidget::SetRepresentation
void SetRepresentation(vtkMagnifierRepresentation *r)
Specify an instance of vtkMagnifierRepresentation used to represent this widget in the scene.
Definition
vtkMagnifierWidget.h:67
vtkMagnifierWidget::GetMagnifierRepresentation
vtkMagnifierRepresentation * GetMagnifierRepresentation()
Return the representation as a vtkBorderRepresentation.
Definition
vtkMagnifierWidget.h:75
vtkMagnifierWidget::New
static vtkMagnifierWidget * New()
Method to instantiate class.
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition
vtkWidgetRepresentation.h:68
vtkAbstractWidget.h
vtkWrappingHints.h
VTK_MARSHALAUTO
#define VTK_MARSHALAUTO
Definition
vtkWrappingHints.h:60
Generated on Wed Nov 26 2025 07:47:51 for VTK by
1.13.2