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 =========================================================================*/
38 #ifndef vtkCaptionRepresentation_h
39 #define vtkCaptionRepresentation_h
40 
41 #include "vtkInteractionWidgetsModule.h" // For export macro
43 
44 class vtkRenderer;
45 class vtkCaptionActor2D;
46 class vtkConeSource;
48 
49 
51 {
52 public:
55 
57 
59  void PrintSelf(ostream& os, vtkIndent indent);
61 
63 
66  void SetAnchorPosition(double pos[3]);
67  void GetAnchorPosition(double pos[3]);
69 
71 
73  void SetCaptionActor2D(vtkCaptionActor2D *captionActor);
76 
78 
84 
86 
87  virtual void BuildRepresentation();
88  virtual void GetSize(double size[2])
89  {size[0]=2.0; size[1]=2.0;}
91 
93 
97  virtual int RenderOverlay(vtkViewport*);
102 
104 
106  vtkSetClampMacro(FontFactor, double, 0.1, 10.0);
107  vtkGetMacro(FontFactor, double);
109 
110 protected:
113 
114  // the text to manage
117 
119  int DisplayAttachmentPoint[2];
120  double FontFactor;
121 
122  // Internal representation for the anchor
124 
125  // Check and adjust boundaries according to the size of the caption text
126  virtual void AdjustCaptionBoundary();
127 
128 private:
129  vtkCaptionRepresentation(const vtkCaptionRepresentation&); //Not implemented
130  void operator=(const vtkCaptionRepresentation&); //Not implemented
131 };
132 
133 #endif
vtkCaptionRepresentation::HasTranslucentPolygonalGeometry
virtual int HasTranslucentPolygonalGeometry()
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkCaptionRepresentation::RenderTranslucentPolygonalGeometry
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
vtkCaptionRepresentation::CaptionActor2D
vtkCaptionActor2D * CaptionActor2D
Definition: vtkCaptionRepresentation.h:115
vtkCaptionRepresentation::FontFactor
double FontFactor
Definition: vtkCaptionRepresentation.h:120
vtkBorderRepresentation
represent a vtkBorderWidget
Definition: vtkBorderRepresentation.h:58
vtkCaptionRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkCaptionRepresentation::PointWidgetState
int PointWidgetState
Definition: vtkCaptionRepresentation.h:118
vtkPointHandleRepresentation3D
represent the position of a point in 3D space
Definition: vtkPointHandleRepresentation3D.h:43
vtkCaptionRepresentation::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *)
vtkCaptionRepresentation
represents vtkCaptionWidget in the scene
Definition: vtkCaptionRepresentation.h:51
vtkConeSource
generate polygonal cone
Definition: vtkConeSource.h:44
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkInteractionWidgetsModule.h
vtkCaptionRepresentation::vtkCaptionRepresentation
vtkCaptionRepresentation()
vtkCaptionRepresentation::GetActors2D
virtual void GetActors2D(vtkPropCollection *)
vtkCaptionRepresentation::GetSize
virtual void GetSize(double size[2])
Definition: vtkCaptionRepresentation.h:88
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkCaptionRepresentation::SetCaptionActor2D
void SetCaptionActor2D(vtkCaptionActor2D *captionActor)
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkCaptionRepresentation::AnchorRepresentation
vtkPointHandleRepresentation3D * AnchorRepresentation
Definition: vtkCaptionRepresentation.h:123
vtkBorderRepresentation.h
vtkCaptionRepresentation::BuildRepresentation
virtual void BuildRepresentation()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCaptionRepresentation::RenderOverlay
virtual int RenderOverlay(vtkViewport *)
vtkCaptionRepresentation::CaptionGlyph
vtkConeSource * CaptionGlyph
Definition: vtkCaptionRepresentation.h:116
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkCaptionRepresentation::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *)
vtkCaptionActor2D
draw text label associated with a point
Definition: vtkCaptionActor2D.h:77
vtkCaptionRepresentation::SetAnchorPosition
void SetAnchorPosition(double pos[3])
VTKINTERACTIONWIDGETS_EXPORT
#define VTKINTERACTIONWIDGETS_EXPORT
Definition: vtkInteractionWidgetsModule.h:15
vtkCaptionRepresentation::GetAnchorPosition
void GetAnchorPosition(double pos[3])
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkCaptionRepresentation::New
static vtkCaptionRepresentation * New()
vtkCaptionRepresentation::~vtkCaptionRepresentation
~vtkCaptionRepresentation()
vtkPropCollection
a list of Props
Definition: vtkPropCollection.h:38
vtkCaptionRepresentation::SetAnchorRepresentation
void SetAnchorRepresentation(vtkPointHandleRepresentation3D *)
vtkgl::size
GLsizeiptr size
Definition: vtkgl.h:11843
vtkCaptionRepresentation::AdjustCaptionBoundary
virtual void AdjustCaptionBoundary()