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 
42 
43 class vtkRenderer;
44 class vtkCaptionActor2D;
45 class vtkConeSource;
47 
48 
50 {
51 public:
53  static vtkCaptionRepresentation *New();
54 
56 
58  void PrintSelf(ostream& os, vtkIndent indent);
60 
62 
65  void SetAnchorPosition(double pos[3]);
66  void GetAnchorPosition(double pos[3]);
68 
70 
72  void SetCaptionActor2D(vtkCaptionActor2D *captionActor);
73  vtkGetObjectMacro(CaptionActor2D,vtkCaptionActor2D);
75 
77 
80  void SetAnchorRepresentation(vtkPointHandleRepresentation3D*);
81  vtkGetObjectMacro(AnchorRepresentation,vtkPointHandleRepresentation3D);
83 
85 
86  virtual void BuildRepresentation();
87  virtual void GetSize(double size[2])
88  {size[0]=2.0; size[1]=2.0;}
90 
92 
94  virtual void GetActors2D(vtkPropCollection*);
95  virtual void ReleaseGraphicsResources(vtkWindow*);
96  virtual int RenderOverlay(vtkViewport*);
97  virtual int RenderOpaqueGeometry(vtkViewport*);
99  virtual int HasTranslucentPolygonalGeometry();
101 
103 
105  vtkSetClampMacro(FontFactor, double, 0.1, 10.0);
106  vtkGetMacro(FontFactor, double);
108 
109 protected:
112 
113  // the text to manage
116 
118  int DisplayAttachmentPoint[2];
119  double FontFactor;
120 
121  // Internal representation for the anchor
123 
124  // Check and adjust boundaries according to the size of the caption text
125  virtual void AdjustCaptionBoundary();
126 
127 private:
128  vtkCaptionRepresentation(const vtkCaptionRepresentation&); //Not implemented
129  void operator=(const vtkCaptionRepresentation&); //Not implemented
130 };
131 
132 #endif
void PrintSelf(ostream &os, vtkIndent indent)
represent the position of a point in 3D space
abstract specification for Viewports
Definition: vtkViewport.h:45
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
virtual void GetActors2D(vtkPropCollection *)
abstract specification for renderers
Definition: vtkRenderer.h:69
generate polygonal cone
Definition: vtkConeSource.h:42
static vtkBorderRepresentation * New()
a list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
represents vtkCaptionWidget in the scene
a simple class to control print indentation
Definition: vtkIndent.h:37
virtual int RenderOpaqueGeometry(vtkViewport *)
virtual void BuildRepresentation()
virtual int RenderOverlay(vtkViewport *)
represent a vtkBorderWidget
#define VTK_WIDGETS_EXPORT
virtual void GetSize(double size[2])
draw text label associated with a point
virtual int HasTranslucentPolygonalGeometry()
virtual void ReleaseGraphicsResources(vtkWindow *)
vtkPointHandleRepresentation3D * AnchorRepresentation