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:
57  static vtkCaptionRepresentation *New();
58 
60 
64  void PrintSelf(ostream& os, vtkIndent indent);
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 
91  void SetAnchorRepresentation(vtkPointHandleRepresentation3D*);
92  vtkGetObjectMacro(AnchorRepresentation,vtkPointHandleRepresentation3D);
94 
98  virtual void BuildRepresentation();
99  virtual void GetSize(double size[2])
100  {size[0]=2.0; size[1]=2.0;}
101 
103 
107  virtual void GetActors2D(vtkPropCollection*);
108  virtual void ReleaseGraphicsResources(vtkWindow*);
109  virtual int RenderOverlay(vtkViewport*);
110  virtual int RenderOpaqueGeometry(vtkViewport*);
112  virtual int HasTranslucentPolygonalGeometry();
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:
143  vtkCaptionRepresentation(const vtkCaptionRepresentation&) VTK_DELETE_FUNCTION;
144  void operator=(const vtkCaptionRepresentation&) VTK_DELETE_FUNCTION;
145 };
146 
147 #endif
void PrintSelf(ostream &os, vtkIndent indent)
Define standard methods.
represent the position of a point in 3D space
abstract specification for Viewports
Definition: vtkViewport.h:47
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
These methods are necessary to make this representation behave as a vtkProp.
virtual void GetActors2D(vtkPropCollection *)
These methods are necessary to make this representation behave as a vtkProp.
abstract specification for renderers
Definition: vtkRenderer.h:63
generate polygonal cone
Definition: vtkConeSource.h:44
static vtkBorderRepresentation * New()
Instantiate this class.
a list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
represents vtkCaptionWidget in the scene
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int RenderOpaqueGeometry(vtkViewport *)
These methods are necessary to make this representation behave as a vtkProp.
virtual void BuildRepresentation()
Subclasses should implement these methods.
virtual int RenderOverlay(vtkViewport *)
These methods are necessary to make this representation behave as a vtkProp.
represent a vtkBorderWidget
virtual void GetSize(double size[2])
Subclasses should implement these methods.
draw text label associated with a point
virtual int HasTranslucentPolygonalGeometry()
These methods are necessary to make this representation behave as a vtkProp.
virtual void ReleaseGraphicsResources(vtkWindow *)
These methods are necessary to make this representation behave as a vtkProp.
vtkPointHandleRepresentation3D * AnchorRepresentation