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

vtkCaptionActor2D.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCaptionActor2D.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
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 //BTX
00173   virtual void ReleaseGraphicsResources(vtkWindow *);
00174 
00176 
00179   int RenderOpaqueGeometry(vtkViewport* viewport);
00180   int RenderTranslucentGeometry(vtkViewport* ) {return 0;}
00181   int RenderOverlay(vtkViewport* viewport);
00183 //ETX
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; //what to put on the end of the leader
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;    // single attachment point for glyphing
00211   vtkGlyph3D          *HeadGlyph;       // for 3D leader
00212   vtkPolyData         *LeaderPolyData;  // line represents the leader
00213   vtkAppendPolyData   *AppendLeader;    // append head and leader
00214   
00215   // for 2D leader
00216   vtkCoordinate       *MapperCoordinate2D;
00217   vtkPolyDataMapper2D *LeaderMapper2D;
00218   vtkActor2D          *LeaderActor2D;
00219 
00220   // for 3D leader
00221   vtkPolyDataMapper   *LeaderMapper3D;
00222   vtkActor            *LeaderActor3D;
00223 
00224 private:
00225   vtkCaptionActor2D(const vtkCaptionActor2D&);  // Not implemented.
00226   void operator=(const vtkCaptionActor2D&);  // Not implemented.
00227 };
00228 
00229 
00230 #endif
00231 
00232 
00233 

Generated on Mon Jan 21 23:07:27 2008 for VTK by  doxygen 1.4.3-20050530