VTK  9.4.20241221
vtkMagnifierRepresentation.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
20#ifndef vtkMagnifierRepresentation_h
21#define vtkMagnifierRepresentation_h
22
23#include "vtkCoordinate.h" //Because of the viewport coordinate macro
24#include "vtkInteractionWidgetsModule.h" // For export macro
26#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
27
28VTK_ABI_NAMESPACE_BEGIN
30class vtkPoints;
31class vtkPolyData;
33class vtkActor2D;
34class vtkProperty2D;
35
36class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkMagnifierRepresentation
38{
39public:
44
46
50 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54
57 void SetRenderer(vtkRenderer* ren) override { this->Superclass::SetRenderer(ren); }
59
61
68 vtkSetClampMacro(MagnificationFactor, double, 0.001, 1000.0);
69 vtkGetMacro(MagnificationFactor, double);
71
73
81 void AddViewProp(vtkProp*);
82 vtkPropCollection* GetViewProps() { return this->Props; }
85 void RemoveViewProp(vtkProp*);
87 void RemoveAllViewProps();
89
91
94 vtkSetVector2Macro(Size, int);
95 vtkGetVector2Macro(Size, int);
97
99
103 vtkSetMacro(Border, bool);
104 vtkGetMacro(Border, bool);
105 vtkBooleanMacro(Border, bool);
107
109
112 vtkGetObjectMacro(BorderProperty, vtkProperty2D);
114
119 {
120 Invisible = 0,
121 Visible
122 };
123
125
129 void BuildRepresentation() override;
130 void WidgetInteraction(double eventPos[2]) override;
132
139 vtkSetClampMacro(InteractionState, int, Invisible, Visible);
140
145 vtkRenderer* GetMagnificationRenderer() { return this->MagnificationRenderer; }
146
148
158
164
165protected:
168
169 // Ivars
172 int Size[2];
173 bool Border;
175
176 // The internal magnification renderer and supporting classes
180
181 // Border representation.
186
187private:
189 void operator=(const vtkMagnifierRepresentation&) = delete;
190};
191
192VTK_ABI_NAMESPACE_END
193#endif
a actor that draws 2D data
Definition vtkActor2D.h:145
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Definition vtkIndent.h:108
represent a vtkBorderWidget
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
int RenderOpaqueGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
int RenderOverlay(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
vtkRenderer * GetMagnificationRenderer()
Provide access to the magnification renderer.
int HasViewProp(vtkProp *)
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
vtkTypeBool HasTranslucentPolygonalGeometry() override
These methods are necessary to make this representation behave as a vtkProp.
void ReleaseGraphicsResources(vtkWindow *) override
These methods are necessary to make this representation behave as a vtkProp.
InteractionStateType
Define the various states that the representation can be in.
static vtkMagnifierRepresentation * New()
Instantiate this class.
~vtkMagnifierRepresentation() override
void SetRenderer(vtkRenderer *ren) override
Specify the renderer viewport in which to place the magnifier.
vtkMTimeType GetMTime() override
Return the MTime of this object.
void BuildRepresentation() override
Subclasses should implement these methods.
void WidgetInteraction(double eventPos[2]) override
Subclasses should implement these methods.
void PrintSelf(ostream &os, vtkIndent indent) override
Define standard methods.
represent and manipulate 3D points
Definition vtkPoints.h:139
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:66
represent surface properties of a 2D image
abstract specification for renderers
abstract specification for Viewports
Definition vtkViewport.h:65
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
#define VTK_MARSHALAUTO
#define VTK_MARSHALEXCLUDE(reason)