Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
Hybrid/vtkCaptionActor2D.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00072 #ifndef __vtkCaptionActor2D_h
00073 #define __vtkCaptionActor2D_h
00074
00075 #include "vtkActor2D.h"
00076
00077 class vtkActor;
00078 class vtkAppendPolyData;
00079 class vtkGlyph2D;
00080 class vtkGlyph3D;
00081 class vtkPolyData;
00082 class vtkPolyDataMapper2D;
00083 class vtkPolyDataMapper;
00084 class vtkTextActor;
00085 class vtkTextMapper;
00086 class vtkTextProperty;
00087
00088 class VTK_HYBRID_EXPORT vtkCaptionActor2D : public vtkActor2D
00089 {
00090 public:
00091 vtkTypeRevisionMacro(vtkCaptionActor2D,vtkActor2D);
00092 void PrintSelf(ostream& os, vtkIndent indent);
00093
00094 static vtkCaptionActor2D *New();
00095
00097
00099 vtkSetStringMacro(Caption);
00100 vtkGetStringMacro(Caption);
00102
00104
00107 vtkWorldCoordinateMacro(AttachmentPoint);
00109
00111
00112 vtkSetMacro(Border,int);
00113 vtkGetMacro(Border,int);
00114 vtkBooleanMacro(Border,int);
00116
00118
00120 vtkSetMacro(Leader,int);
00121 vtkGetMacro(Leader,int);
00122 vtkBooleanMacro(Leader,int);
00124
00126
00128 vtkSetMacro(ThreeDimensionalLeader,int);
00129 vtkGetMacro(ThreeDimensionalLeader,int);
00130 vtkBooleanMacro(ThreeDimensionalLeader,int);
00132
00134
00137 virtual void SetLeaderGlyph(vtkPolyData*);
00138 vtkGetObjectMacro(LeaderGlyph,vtkPolyData);
00140
00142
00147 vtkSetClampMacro(LeaderGlyphSize,float,0.0,0.1);
00148 vtkGetMacro(LeaderGlyphSize,float);
00150
00152
00155 vtkSetClampMacro(MaximumLeaderGlyphSize,int,1,1000);
00156 vtkGetMacro(MaximumLeaderGlyphSize,int);
00158
00160
00162 vtkSetClampMacro(Padding, int, 0, 50);
00163 vtkGetMacro(Padding, int);
00165
00167
00168 virtual void SetCaptionTextProperty(vtkTextProperty *p);
00169 vtkGetObjectMacro(CaptionTextProperty,vtkTextProperty);
00171
00172 #ifndef VTK_REMOVE_LEGACY_CODE
00173
00174
00178 virtual void SetFontFamily(int val);
00179 virtual int GetFontFamily();
00180 void SetFontFamilyToArial() { this->SetFontFamily(VTK_ARIAL); };
00181 void SetFontFamilyToCourier() { this->SetFontFamily(VTK_COURIER);};
00182 void SetFontFamilyToTimes() { this->SetFontFamily(VTK_TIMES); };
00184 #endif
00185
00186 #ifndef VTK_REMOVE_LEGACY_CODE
00187
00188
00191 virtual void SetBold(int val);
00192 virtual int GetBold();
00193 vtkBooleanMacro(Bold, int);
00195 #endif
00196
00197 #ifndef VTK_REMOVE_LEGACY_CODE
00198
00199
00202 virtual void SetItalic(int val);
00203 virtual int GetItalic();
00204 vtkBooleanMacro(Italic, int);
00206 #endif
00207
00208 #ifndef VTK_REMOVE_LEGACY_CODE
00209
00210
00213 virtual void SetShadow(int val);
00214 virtual int GetShadow();
00215 vtkBooleanMacro(Shadow, int);
00217 #endif
00218
00219 #ifndef VTK_REMOVE_LEGACY_CODE
00220
00221
00225 virtual void SetJustification(int val);
00226 virtual int GetJustification();
00227 void SetJustificationToLeft()
00228 { this->SetJustification(VTK_TEXT_LEFT);};
00229 void SetJustificationToCentered()
00230 { this->SetJustification(VTK_TEXT_CENTERED);};
00231 void SetJustificationToRight()
00232 { this->SetJustification(VTK_TEXT_RIGHT);};
00234 #endif
00235
00236 #ifndef VTK_REMOVE_LEGACY_CODE
00237
00238
00242 virtual void SetVerticalJustification(int val);
00243 virtual int GetVerticalJustification();
00244 void SetVerticalJustificationToBottom()
00245 {this->SetVerticalJustification(VTK_TEXT_BOTTOM);};
00246 void SetVerticalJustificationToCentered()
00247 {this->SetVerticalJustification(VTK_TEXT_CENTERED);};
00248 void SetVerticalJustificationToTop()
00249 {this->SetVerticalJustification(VTK_TEXT_TOP);};
00251 #endif
00252
00255 void ShallowCopy(vtkProp *prop);
00256
00257
00262 virtual void ReleaseGraphicsResources(vtkWindow *);
00263
00265
00268 int RenderOpaqueGeometry(vtkViewport* viewport);
00269 int RenderTranslucentGeometry(vtkViewport* ) {return 0;}
00270 int RenderOverlay(vtkViewport* viewport);
00272
00273
00274 protected:
00275 vtkCaptionActor2D();
00276 ~vtkCaptionActor2D();
00277
00278 vtkCoordinate *AttachmentPointCoordinate;
00279
00280 char *Caption;
00281 int Border;
00282 int Leader;
00283 int ThreeDimensionalLeader;
00284 float LeaderGlyphSize;
00285 int MaximumLeaderGlyphSize;
00286
00287 vtkPolyData *LeaderGlyph;
00288
00289 int Padding;
00290
00291 private:
00292 vtkTextActor *CaptionActor;
00293 vtkTextProperty *CaptionTextProperty;
00294
00295 vtkPolyData *BorderPolyData;
00296 vtkPolyDataMapper2D *BorderMapper;
00297 vtkActor2D *BorderActor;
00298
00299 vtkPolyData *HeadPolyData;
00300 vtkGlyph3D *HeadGlyph;
00301 vtkPolyData *LeaderPolyData;
00302 vtkAppendPolyData *AppendLeader;
00303
00304
00305 vtkCoordinate *MapperCoordinate2D;
00306 vtkPolyDataMapper2D *LeaderMapper2D;
00307 vtkActor2D *LeaderActor2D;
00308
00309
00310 vtkPolyDataMapper *LeaderMapper3D;
00311 vtkActor *LeaderActor3D;
00312
00313 private:
00314 vtkCaptionActor2D(const vtkCaptionActor2D&);
00315 void operator=(const vtkCaptionActor2D&);
00316 };
00317
00318
00319 #endif
00320
00321
00322