VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Widgets
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 "
vtkBorderRepresentation.h
"
42
43
class
vtkRenderer
;
44
class
vtkCaptionActor2D
;
45
class
vtkConeSource
;
46
class
vtkPointHandleRepresentation3D
;
47
48
49
class
VTK_WIDGETS_EXPORT
vtkCaptionRepresentation
:
public
vtkBorderRepresentation
50
{
51
public
:
53
static
vtkCaptionRepresentation
*
New
();
54
56
57
vtkTypeMacro(
vtkCaptionRepresentation
,
vtkBorderRepresentation
);
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
*);
98
virtual
int
RenderTranslucentPolygonalGeometry
(
vtkViewport
*);
99
virtual
int
HasTranslucentPolygonalGeometry
();
101
103
105
vtkSetClampMacro(FontFactor,
double
, 0.1, 10.0);
106
vtkGetMacro(FontFactor,
double
);
108
109
protected
:
110
vtkCaptionRepresentation
();
111
~
vtkCaptionRepresentation
();
112
113
// the text to manage
114
vtkCaptionActor2D
*
CaptionActor2D
;
115
vtkConeSource
*
CaptionGlyph
;
116
117
int
PointWidgetState
;
118
int
DisplayAttachmentPoint[2];
119
double
FontFactor
;
120
121
// Internal representation for the anchor
122
vtkPointHandleRepresentation3D
*
AnchorRepresentation
;
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
Generated on Sun Sep 9 2012 13:03:49 for VTK by
1.8.1.2