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:
54  static vtkCaptionRepresentation *New();
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);
74  vtkGetObjectMacro(CaptionActor2D,vtkCaptionActor2D);
76 
78 
81  void SetAnchorRepresentation(vtkPointHandleRepresentation3D*);
82  vtkGetObjectMacro(AnchorRepresentation,vtkPointHandleRepresentation3D);
84 
86 
87  virtual void BuildRepresentation();
88  virtual void GetSize(double size[2])
89  {size[0]=2.0; size[1]=2.0;}
91 
93 
95  virtual void GetActors2D(vtkPropCollection*);
96  virtual void ReleaseGraphicsResources(vtkWindow*);
97  virtual int RenderOverlay(vtkViewport*);
98  virtual int RenderOpaqueGeometry(vtkViewport*);
100  virtual int HasTranslucentPolygonalGeometry();
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
void PrintSelf(ostream &os, vtkIndent indent)
represent the position of a point in 3D space
abstract specification for Viewports
Definition: vtkViewport.h:46
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
virtual void GetActors2D(vtkPropCollection *)
abstract specification for renderers
Definition: vtkRenderer.h:62
generate polygonal cone
Definition: vtkConeSource.h:43
static vtkBorderRepresentation * New()
a list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
#define VTKINTERACTIONWIDGETS_EXPORT
represents vtkCaptionWidget in the scene
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int RenderOpaqueGeometry(vtkViewport *)
virtual void BuildRepresentation()
virtual int RenderOverlay(vtkViewport *)
represent a vtkBorderWidget
virtual void GetSize(double size[2])
draw text label associated with a point
virtual int HasTranslucentPolygonalGeometry()
virtual void ReleaseGraphicsResources(vtkWindow *)
vtkPointHandleRepresentation3D * AnchorRepresentation