Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | 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 =========================================================================*/
00069 #ifndef __vtkCaptionActor2D_h
00070 #define __vtkCaptionActor2D_h
00071 
00072 #include "vtkActor2D.h"
00073 
00074 class vtkActor;
00075 class vtkAppendPolyData;
00076 class vtkGlyph2D;
00077 class vtkGlyph3D;
00078 class vtkPolyData;
00079 class vtkPolyDataMapper2D;
00080 class vtkPolyDataMapper;
00081 class vtkTextActor;
00082 class vtkTextMapper;
00083 class vtkTextProperty;
00084 
00085 class VTK_HYBRID_EXPORT vtkCaptionActor2D : public vtkActor2D
00086 {
00087 public:
00088   vtkTypeRevisionMacro(vtkCaptionActor2D,vtkActor2D);
00089   void PrintSelf(ostream& os, vtkIndent indent);
00090 
00091   static vtkCaptionActor2D *New();
00092 
00094 
00096   vtkSetStringMacro(Caption);
00097   vtkGetStringMacro(Caption);
00099 
00101 
00104   vtkWorldCoordinateMacro(AttachmentPoint);
00106 
00108 
00109   vtkSetMacro(Border,int);
00110   vtkGetMacro(Border,int);
00111   vtkBooleanMacro(Border,int);
00113 
00115 
00117   vtkSetMacro(Leader,int);
00118   vtkGetMacro(Leader,int);
00119   vtkBooleanMacro(Leader,int);
00121 
00123 
00125   vtkSetMacro(ThreeDimensionalLeader,int);
00126   vtkGetMacro(ThreeDimensionalLeader,int);
00127   vtkBooleanMacro(ThreeDimensionalLeader,int);
00129 
00131 
00134   virtual void SetLeaderGlyph(vtkPolyData*);
00135   vtkGetObjectMacro(LeaderGlyph,vtkPolyData);
00137 
00139 
00144   vtkSetClampMacro(LeaderGlyphSize,double,0.0,0.1);
00145   vtkGetMacro(LeaderGlyphSize,double);
00147 
00149 
00152   vtkSetClampMacro(MaximumLeaderGlyphSize,int,1,1000);
00153   vtkGetMacro(MaximumLeaderGlyphSize,int);
00155 
00157 
00159   vtkSetClampMacro(Padding, int, 0, 50);
00160   vtkGetMacro(Padding, int);
00162 
00164 
00165   virtual void SetCaptionTextProperty(vtkTextProperty *p);
00166   vtkGetObjectMacro(CaptionTextProperty,vtkTextProperty);
00168     
00171   void ShallowCopy(vtkProp *prop);
00172 
00173 //BTX
00178   virtual void ReleaseGraphicsResources(vtkWindow *);
00179 
00181 
00184   int RenderOpaqueGeometry(vtkViewport* viewport);
00185   int RenderTranslucentGeometry(vtkViewport* ) {return 0;}
00186   int RenderOverlay(vtkViewport* viewport);
00188 //ETX
00189 
00190 protected:
00191   vtkCaptionActor2D();
00192   ~vtkCaptionActor2D();
00193 
00194   vtkCoordinate *AttachmentPointCoordinate;
00195 
00196   char  *Caption;
00197   int   Border;
00198   int   Leader;
00199   int   ThreeDimensionalLeader;
00200   double LeaderGlyphSize;
00201   int   MaximumLeaderGlyphSize;
00202 
00203   vtkPolyData *LeaderGlyph; //what to put on the end of the leader
00204   
00205   int   Padding;
00206 
00207 private:
00208   vtkTextActor        *CaptionActor;
00209   vtkTextProperty     *CaptionTextProperty;
00210 
00211   vtkPolyData         *BorderPolyData;
00212   vtkPolyDataMapper2D *BorderMapper;
00213   vtkActor2D          *BorderActor;
00214 
00215   vtkPolyData         *HeadPolyData;    // single attachment point for glyphing
00216   vtkGlyph3D          *HeadGlyph;       // for 3D leader
00217   vtkPolyData         *LeaderPolyData;  // line represents the leader
00218   vtkAppendPolyData   *AppendLeader;    // append head and leader
00219   
00220   // for 2D leader
00221   vtkCoordinate       *MapperCoordinate2D;
00222   vtkPolyDataMapper2D *LeaderMapper2D;
00223   vtkActor2D          *LeaderActor2D;
00224 
00225   // for 3D leader
00226   vtkPolyDataMapper   *LeaderMapper3D;
00227   vtkActor            *LeaderActor3D;
00228 
00229 private:
00230   vtkCaptionActor2D(const vtkCaptionActor2D&);  // Not implemented.
00231   void operator=(const vtkCaptionActor2D&);  // Not implemented.
00232 };
00233 
00234 
00235 #endif
00236 
00237 
00238