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 vtkTypeRevisionMacro(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
00168
00173 virtual void ReleaseGraphicsResources(vtkWindow *);
00174
00176
00179 int RenderOpaqueGeometry(vtkViewport* viewport);
00180 int RenderTranslucentGeometry(vtkViewport* ) {return 0;}
00181 int RenderOverlay(vtkViewport* viewport);
00183
00184
00185 protected:
00186 vtkCaptionActor2D();
00187 ~vtkCaptionActor2D();
00188
00189 vtkCoordinate *AttachmentPointCoordinate;
00190
00191 char *Caption;
00192 int Border;
00193 int Leader;
00194 int ThreeDimensionalLeader;
00195 double LeaderGlyphSize;
00196 int MaximumLeaderGlyphSize;
00197
00198 vtkPolyData *LeaderGlyph;
00199
00200 int Padding;
00201
00202 private:
00203 vtkTextActor *TextActor;
00204 vtkTextProperty *CaptionTextProperty;
00205
00206 vtkPolyData *BorderPolyData;
00207 vtkPolyDataMapper2D *BorderMapper;
00208 vtkActor2D *BorderActor;
00209
00210 vtkPolyData *HeadPolyData;
00211 vtkGlyph3D *HeadGlyph;
00212 vtkPolyData *LeaderPolyData;
00213 vtkAppendPolyData *AppendLeader;
00214
00215
00216 vtkCoordinate *MapperCoordinate2D;
00217 vtkPolyDataMapper2D *LeaderMapper2D;
00218 vtkActor2D *LeaderActor2D;
00219
00220
00221 vtkPolyDataMapper *LeaderMapper3D;
00222 vtkActor *LeaderActor3D;
00223
00224 private:
00225 vtkCaptionActor2D(const vtkCaptionActor2D&);
00226 void operator=(const vtkCaptionActor2D&);
00227 };
00228
00229
00230 #endif
00231
00232
00233