Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Hybrid/vtkCaptionActor2D.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkCaptionActor2D.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00061 #ifndef __vtkCaptionActor2D_h 00062 #define __vtkCaptionActor2D_h 00063 00064 #include "vtkActor2D.h" 00065 00066 class vtkActor; 00067 class vtkAppendPolyData; 00068 class vtkGlyph2D; 00069 class vtkGlyph3D; 00070 class vtkPolyData; 00071 class vtkPolyDataMapper2D; 00072 class vtkPolyDataMapper; 00073 class vtkTextActor; 00074 class vtkTextMapper; 00075 class vtkTextProperty; 00076 00077 class VTK_HYBRID_EXPORT vtkCaptionActor2D : public vtkActor2D 00078 { 00079 public: 00080 vtkTypeRevisionMacro(vtkCaptionActor2D,vtkActor2D); 00081 void PrintSelf(ostream& os, vtkIndent indent); 00082 00083 static vtkCaptionActor2D *New(); 00084 00086 00088 vtkSetStringMacro(Caption); 00089 vtkGetStringMacro(Caption); 00091 00093 00096 vtkWorldCoordinateMacro(AttachmentPoint); 00098 00100 00101 vtkSetMacro(Border,int); 00102 vtkGetMacro(Border,int); 00103 vtkBooleanMacro(Border,int); 00105 00107 00109 vtkSetMacro(Leader,int); 00110 vtkGetMacro(Leader,int); 00111 vtkBooleanMacro(Leader,int); 00113 00115 00117 vtkSetMacro(ThreeDimensionalLeader,int); 00118 vtkGetMacro(ThreeDimensionalLeader,int); 00119 vtkBooleanMacro(ThreeDimensionalLeader,int); 00121 00123 00126 virtual void SetLeaderGlyph(vtkPolyData*); 00127 vtkGetObjectMacro(LeaderGlyph,vtkPolyData); 00129 00131 00136 vtkSetClampMacro(LeaderGlyphSize,float,0.0,0.1); 00137 vtkGetMacro(LeaderGlyphSize,float); 00139 00141 00144 vtkSetClampMacro(MaximumLeaderGlyphSize,int,1,1000); 00145 vtkGetMacro(MaximumLeaderGlyphSize,int); 00147 00149 00151 vtkSetClampMacro(Padding, int, 0, 50); 00152 vtkGetMacro(Padding, int); 00154 00156 00157 virtual void SetCaptionTextProperty(vtkTextProperty *p); 00158 vtkGetObjectMacro(CaptionTextProperty,vtkTextProperty); 00160 00161 #ifndef VTK_REMOVE_LEGACY_CODE 00162 00163 00167 virtual void SetFontFamily(int val); 00168 virtual int GetFontFamily(); 00169 void SetFontFamilyToArial() { this->SetFontFamily(VTK_ARIAL); }; 00170 void SetFontFamilyToCourier() { this->SetFontFamily(VTK_COURIER);}; 00171 void SetFontFamilyToTimes() { this->SetFontFamily(VTK_TIMES); }; 00173 #endif 00174 00175 #ifndef VTK_REMOVE_LEGACY_CODE 00176 00177 00180 virtual void SetBold(int val); 00181 virtual int GetBold(); 00182 vtkBooleanMacro(Bold, int); 00184 #endif 00185 00186 #ifndef VTK_REMOVE_LEGACY_CODE 00187 00188 00191 virtual void SetItalic(int val); 00192 virtual int GetItalic(); 00193 vtkBooleanMacro(Italic, int); 00195 #endif 00196 00197 #ifndef VTK_REMOVE_LEGACY_CODE 00198 00199 00202 virtual void SetShadow(int val); 00203 virtual int GetShadow(); 00204 vtkBooleanMacro(Shadow, int); 00206 #endif 00207 00208 #ifndef VTK_REMOVE_LEGACY_CODE 00209 00210 00214 virtual void SetJustification(int val); 00215 virtual int GetJustification(); 00216 void SetJustificationToLeft() 00217 { this->SetJustification(VTK_TEXT_LEFT);}; 00218 void SetJustificationToCentered() 00219 { this->SetJustification(VTK_TEXT_CENTERED);}; 00220 void SetJustificationToRight() 00221 { this->SetJustification(VTK_TEXT_RIGHT);}; 00223 #endif 00224 00225 #ifndef VTK_REMOVE_LEGACY_CODE 00226 00227 00231 virtual void SetVerticalJustification(int val); 00232 virtual int GetVerticalJustification(); 00233 void SetVerticalJustificationToBottom() 00234 {this->SetVerticalJustification(VTK_TEXT_BOTTOM);}; 00235 void SetVerticalJustificationToCentered() 00236 {this->SetVerticalJustification(VTK_TEXT_CENTERED);}; 00237 void SetVerticalJustificationToTop() 00238 {this->SetVerticalJustification(VTK_TEXT_TOP);}; 00240 #endif 00241 00244 void ShallowCopy(vtkProp *prop); 00245 00246 //BTX 00251 virtual void ReleaseGraphicsResources(vtkWindow *); 00252 00254 00257 int RenderOpaqueGeometry(vtkViewport* viewport); 00258 int RenderTranslucentGeometry(vtkViewport* ) {return 0;} 00259 int RenderOverlay(vtkViewport* viewport); 00261 //ETX 00262 00263 protected: 00264 vtkCaptionActor2D(); 00265 ~vtkCaptionActor2D(); 00266 00267 vtkCoordinate *AttachmentPointCoordinate; 00268 00269 char *Caption; 00270 int Border; 00271 int Leader; 00272 int ThreeDimensionalLeader; 00273 float LeaderGlyphSize; 00274 int MaximumLeaderGlyphSize; 00275 00276 vtkPolyData *LeaderGlyph; //what to put on the end of the leader 00277 00278 int Padding; 00279 00280 private: 00281 vtkTextActor *CaptionActor; 00282 vtkTextProperty *CaptionTextProperty; 00283 00284 vtkPolyData *BorderPolyData; 00285 vtkPolyDataMapper2D *BorderMapper; 00286 vtkActor2D *BorderActor; 00287 00288 vtkPolyData *HeadPolyData; // single attachment point for glyphing 00289 vtkGlyph3D *HeadGlyph; // for 3D leader 00290 vtkPolyData *LeaderPolyData; // line represents the leader 00291 vtkAppendPolyData *AppendLeader; // append head and leader 00292 00293 // for 2D leader 00294 vtkCoordinate *MapperCoordinate2D; 00295 vtkPolyDataMapper2D *LeaderMapper2D; 00296 vtkActor2D *LeaderActor2D; 00297 00298 // for 3D leader 00299 vtkPolyDataMapper *LeaderMapper3D; 00300 vtkActor *LeaderActor3D; 00301 00302 private: 00303 vtkCaptionActor2D(const vtkCaptionActor2D&); // Not implemented. 00304 void operator=(const vtkCaptionActor2D&); // Not implemented. 00305 }; 00306 00307 00308 #endif 00309 00310 00311