VTK  9.2.6
vtkCaptionRepresentation.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkCaptionRepresentation.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=========================================================================*/
48#ifndef vtkCaptionRepresentation_h
49#define vtkCaptionRepresentation_h
50
52#include "vtkInteractionWidgetsModule.h" // For export macro
53
54class vtkRenderer;
56class vtkConeSource;
58
59class VTKINTERACTIONWIDGETS_EXPORT vtkCaptionRepresentation : public vtkBorderRepresentation
60{
61public:
66
68
72 void PrintSelf(ostream& os, vtkIndent indent) override;
74
76
80 void SetAnchorPosition(double pos[3]);
81 void GetAnchorPosition(double pos[3]);
83
85
90 vtkGetObjectMacro(CaptionActor2D, vtkCaptionActor2D);
92
94
100 vtkGetObjectMacro(AnchorRepresentation, vtkPointHandleRepresentation3D);
102
106 void BuildRepresentation() override;
107 void GetSize(double size[2]) override
108 {
109 size[0] = 2.0;
110 size[1] = 2.0;
111 }
112
114
125
127
131 vtkSetClampMacro(FontFactor, double, 0.1, 10.0);
132 vtkGetMacro(FontFactor, double);
134
135protected:
138
139 // the text to manage
142
144 int DisplayAttachmentPoint[2];
146
147 // Internal representation for the anchor
149
150 // Check and adjust boundaries according to the size of the caption text
151 virtual void AdjustCaptionBoundary();
152
153private:
155 void operator=(const vtkCaptionRepresentation&) = delete;
156};
157
158#endif
represent a vtkBorderWidget
draw text label associated with a point
represents vtkCaptionWidget in the scene
int RenderOpaqueGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
static vtkCaptionRepresentation * New()
Instantiate this class.
vtkTypeBool HasTranslucentPolygonalGeometry() override
These methods are necessary to make this representation behave as a vtkProp.
void SetAnchorRepresentation(vtkPointHandleRepresentation3D *)
Set and get the instances of vtkPointHandleRepresention3D used to implement this representation.
void GetActors2D(vtkPropCollection *) override
These methods are necessary to make this representation behave as a vtkProp.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK class methods.
virtual void AdjustCaptionBoundary()
vtkPointHandleRepresentation3D * AnchorRepresentation
void ReleaseGraphicsResources(vtkWindow *) override
These methods are necessary to make this representation behave as a vtkProp.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
void BuildRepresentation() override
Satisfy the superclasses API.
int RenderOverlay(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
void GetAnchorPosition(double pos[3])
Specify the position of the anchor (i.e., the point that the caption is anchored to).
~vtkCaptionRepresentation() override
void SetAnchorPosition(double pos[3])
Specify the position of the anchor (i.e., the point that the caption is anchored to).
void GetSize(double size[2]) override
Subclasses should implement these methods.
void SetCaptionActor2D(vtkCaptionActor2D *captionActor)
Specify the vtkCaptionActor2D to manage.
generate polygonal cone
a simple class to control print indentation
Definition vtkIndent.h:49
represent the position of a point in 3D space
an ordered list of Props
abstract specification for renderers
Definition vtkRenderer.h:82
abstract specification for Viewports
Definition vtkViewport.h:65
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:69