00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00057 #ifndef __vtkCaptionActor2D_h
00058 #define __vtkCaptionActor2D_h
00059
00060 #include "vtkActor2D.h"
00061
00062 class vtkActor;
00063 class vtkAppendPolyData;
00064 class vtkGlyph2D;
00065 class vtkGlyph3D;
00066 class vtkPolyData;
00067 class vtkPolyDataMapper2D;
00068 class vtkPolyDataMapper;
00069 class vtkTextActor;
00070 class vtkTextMapper;
00071 class vtkTextProperty;
00072
00073 class VTK_HYBRID_EXPORT vtkCaptionActor2D : public vtkActor2D
00074 {
00075 public:
00076 vtkTypeMacro(vtkCaptionActor2D,vtkActor2D);
00077 void PrintSelf(ostream& os, vtkIndent indent);
00078
00079 static vtkCaptionActor2D *New();
00080
00082
00084 vtkSetStringMacro(Caption);
00085 vtkGetStringMacro(Caption);
00087
00089
00092 vtkWorldCoordinateMacro(AttachmentPoint);
00094
00096
00097 vtkSetMacro(Border,int);
00098 vtkGetMacro(Border,int);
00099 vtkBooleanMacro(Border,int);
00101
00103
00105 vtkSetMacro(Leader,int);
00106 vtkGetMacro(Leader,int);
00107 vtkBooleanMacro(Leader,int);
00109
00111
00113 vtkSetMacro(ThreeDimensionalLeader,int);
00114 vtkGetMacro(ThreeDimensionalLeader,int);
00115 vtkBooleanMacro(ThreeDimensionalLeader,int);
00117
00119
00123 virtual void SetLeaderGlyph(vtkPolyData*);
00124 vtkGetObjectMacro(LeaderGlyph,vtkPolyData);
00126
00128
00133 vtkSetClampMacro(LeaderGlyphSize,double,0.0,0.1);
00134 vtkGetMacro(LeaderGlyphSize,double);
00136
00138
00141 vtkSetClampMacro(MaximumLeaderGlyphSize,int,1,1000);
00142 vtkGetMacro(MaximumLeaderGlyphSize,int);
00144
00146
00148 vtkSetClampMacro(Padding, int, 0, 50);
00149 vtkGetMacro(Padding, int);
00151
00153
00155 vtkGetObjectMacro(TextActor,vtkTextActor);
00157
00159
00160 virtual void SetCaptionTextProperty(vtkTextProperty *p);
00161 vtkGetObjectMacro(CaptionTextProperty,vtkTextProperty);
00163
00166 void ShallowCopy(vtkProp *prop);
00167
00169
00171 vtkSetMacro(AttachEdgeOnly,int);
00172 vtkGetMacro(AttachEdgeOnly,int);
00173 vtkBooleanMacro(AttachEdgeOnly,int);
00175
00176
00181 virtual void ReleaseGraphicsResources(vtkWindow *);
00182
00184
00187 int RenderOpaqueGeometry(vtkViewport* viewport);
00188 virtual int RenderTranslucentPolygonalGeometry(vtkViewport* ) {return 0;}
00189 int RenderOverlay(vtkViewport* viewport);
00191
00193 virtual int HasTranslucentPolygonalGeometry();
00194
00195
00196 protected:
00197 vtkCaptionActor2D();
00198 ~vtkCaptionActor2D();
00199
00200 vtkCoordinate *AttachmentPointCoordinate;
00201
00202 char *Caption;
00203 int Border;
00204 int Leader;
00205 int ThreeDimensionalLeader;
00206 double LeaderGlyphSize;
00207 int MaximumLeaderGlyphSize;
00208
00209 vtkPolyData *LeaderGlyph;
00210
00211 int Padding;
00212 int AttachEdgeOnly;
00213
00214
00215 private:
00216 vtkTextActor *TextActor;
00217 vtkTextProperty *CaptionTextProperty;
00218
00219 vtkPolyData *BorderPolyData;
00220 vtkPolyDataMapper2D *BorderMapper;
00221 vtkActor2D *BorderActor;
00222
00223 vtkPolyData *HeadPolyData;
00224 vtkGlyph3D *HeadGlyph;
00225 vtkPolyData *LeaderPolyData;
00226 vtkAppendPolyData *AppendLeader;
00227
00228
00229 vtkCoordinate *MapperCoordinate2D;
00230 vtkPolyDataMapper2D *LeaderMapper2D;
00231 vtkActor2D *LeaderActor2D;
00232
00233
00234 vtkPolyDataMapper *LeaderMapper3D;
00235 vtkActor *LeaderActor3D;
00236
00237 private:
00238 vtkCaptionActor2D(const vtkCaptionActor2D&);
00239 void operator=(const vtkCaptionActor2D&);
00240 };
00241
00242
00243 #endif
00244
00245
00246