VTK
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 =========================================================================*/
39 #ifndef vtkCaptionRepresentation_h
40 #define vtkCaptionRepresentation_h
41 
42 #include "vtkInteractionWidgetsModule.h" // For export macro
44 
45 class vtkRenderer;
46 class vtkCaptionActor2D;
47 class vtkConeSource;
49 
50 
51 class VTKINTERACTIONWIDGETS_EXPORT vtkCaptionRepresentation : public vtkBorderRepresentation
52 {
53 public:
58 
60 
64  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
68 
72  void SetAnchorPosition(double pos[3]);
73  void GetAnchorPosition(double pos[3]);
75 
77 
81  void SetCaptionActor2D(vtkCaptionActor2D *captionActor);
82  vtkGetObjectMacro(CaptionActor2D,vtkCaptionActor2D);
84 
86 
92  vtkGetObjectMacro(AnchorRepresentation,vtkPointHandleRepresentation3D);
94 
98  void BuildRepresentation() override;
99  void GetSize(double size[2]) override
100  {size[0]=2.0; size[1]=2.0;}
101 
103 
109  int RenderOverlay(vtkViewport*) override;
114 
116 
120  vtkSetClampMacro(FontFactor, double, 0.1, 10.0);
121  vtkGetMacro(FontFactor, double);
123 
124 protected:
127 
128  // the text to manage
131 
133  int DisplayAttachmentPoint[2];
134  double FontFactor;
135 
136  // Internal representation for the anchor
138 
139  // Check and adjust boundaries according to the size of the caption text
140  virtual void AdjustCaptionBoundary();
141 
142 private:
144  void operator=(const vtkCaptionRepresentation&) = delete;
145 };
146 
147 #endif
vtkCaptionRepresentation::GetSize
void GetSize(double size[2]) override
Definition: vtkCaptionRepresentation.h:99
vtkCaptionRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCaptionRepresentation::CaptionActor2D
vtkCaptionActor2D * CaptionActor2D
Definition: vtkCaptionRepresentation.h:129
vtkCaptionRepresentation::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
vtkCaptionRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
vtkCaptionRepresentation::FontFactor
double FontFactor
Definition: vtkCaptionRepresentation.h:134
vtkBorderRepresentation
represent a vtkBorderWidget
Definition: vtkBorderRepresentation.h:59
vtkCaptionRepresentation::HasTranslucentPolygonalGeometry
vtkTypeBool HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkCaptionRepresentation::PointWidgetState
int PointWidgetState
Definition: vtkCaptionRepresentation.h:132
vtkPointHandleRepresentation3D
represent the position of a point in 3D space
Definition: vtkPointHandleRepresentation3D.h:44
vtkCaptionRepresentation
represents vtkCaptionWidget in the scene
Definition: vtkCaptionRepresentation.h:52
vtkConeSource
generate polygonal cone
Definition: vtkConeSource.h:45
vtkCaptionRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
vtkCaptionRepresentation::GetActors2D
void GetActors2D(vtkPropCollection *) override
These methods are necessary to make this representation behave as a vtkProp.
vtkCaptionRepresentation::RenderOverlay
int RenderOverlay(vtkViewport *) override
vtkCaptionRepresentation::vtkCaptionRepresentation
vtkCaptionRepresentation()
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkCaptionRepresentation::SetCaptionActor2D
void SetCaptionActor2D(vtkCaptionActor2D *captionActor)
Specify the vtkCaptionActor2D to manage.
vtkCaptionRepresentation::AnchorRepresentation
vtkPointHandleRepresentation3D * AnchorRepresentation
Definition: vtkCaptionRepresentation.h:137
vtkBorderRepresentation.h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkCaptionRepresentation::CaptionGlyph
vtkConeSource * CaptionGlyph
Definition: vtkCaptionRepresentation.h:130
vtkX3D::size
@ size
Definition: vtkX3D.h:253
vtkCaptionRepresentation::~vtkCaptionRepresentation
~vtkCaptionRepresentation() override
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:48
vtkCaptionRepresentation::BuildRepresentation
void BuildRepresentation() override
Satisfy the superclasses API.
vtkCaptionActor2D
draw text label associated with a point
Definition: vtkCaptionActor2D.h:78
vtkCaptionRepresentation::SetAnchorPosition
void SetAnchorPosition(double pos[3])
Specify the position of the anchor (i.e., the point that the caption is anchored to).
vtkCaptionRepresentation::GetAnchorPosition
void GetAnchorPosition(double pos[3])
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkCaptionRepresentation::New
static vtkCaptionRepresentation * New()
Instantiate this class.
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:42
vtkCaptionRepresentation::SetAnchorRepresentation
void SetAnchorRepresentation(vtkPointHandleRepresentation3D *)
Set and get the instances of vtkPointHandleRepresention3D used to implement this representation.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkCaptionRepresentation::AdjustCaptionBoundary
virtual void AdjustCaptionBoundary()