• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Hybrid/vtkLegendScaleActor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkLegendScaleActor.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 =========================================================================*/
00039 #ifndef __vtkLegendScaleActor_h
00040 #define __vtkLegendScaleActor_h
00041 
00042 #include "vtkProp.h"
00043 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
00044 
00045 class vtkAxisActor2D;
00046 class vtkTextProperty;
00047 class vtkPolyData;
00048 class vtkPolyDataMapper2D;
00049 class vtkActor2D;
00050 class vtkTextMapper;
00051 class vtkPoints;
00052 class vtkCoordinate;
00053 
00054 class VTK_HYBRID_EXPORT vtkLegendScaleActor : public vtkProp
00055 {
00056 public:
00058   static vtkLegendScaleActor *New();
00059 
00061 
00062   vtkTypeRevisionMacro(vtkLegendScaleActor,vtkProp);
00063   void PrintSelf(ostream& os, vtkIndent indent);
00065 
00066 //BTX
00067   enum AttributeLocation
00068   {
00069     DISTANCE=0,
00070     XY_COORDINATES=1
00071   };
00072 //ETX
00073 
00075 
00079   vtkSetClampMacro(LabelMode,int,DISTANCE,XY_COORDINATES);
00080   vtkGetMacro(LabelMode,int);
00081   void SetLabelModeToDistance() {this->SetLabelMode(DISTANCE);}
00082   void SetLabelModeToXYCoordinates() {this->SetLabelMode(XY_COORDINATES);}
00084 
00086 
00089   vtkSetMacro(RightAxisVisibility,int);
00090   vtkGetMacro(RightAxisVisibility,int);
00091   vtkBooleanMacro(RightAxisVisibility,int);
00092   vtkSetMacro(TopAxisVisibility,int);
00093   vtkGetMacro(TopAxisVisibility,int);
00094   vtkBooleanMacro(TopAxisVisibility,int);
00095   vtkSetMacro(LeftAxisVisibility,int);
00096   vtkGetMacro(LeftAxisVisibility,int);
00097   vtkBooleanMacro(LeftAxisVisibility,int);
00098   vtkSetMacro(BottomAxisVisibility,int);
00099   vtkGetMacro(BottomAxisVisibility,int);
00100   vtkBooleanMacro(BottomAxisVisibility,int);
00102 
00104 
00105   vtkSetMacro(LegendVisibility,int);
00106   vtkGetMacro(LegendVisibility,int);
00107   vtkBooleanMacro(LegendVisibility,int);
00109 
00111 
00112   void AllAxesOn();
00113   void AllAxesOff();
00115 
00117 
00118   void AllAnnotationsOn();
00119   void AllAnnotationsOff();
00121 
00123 
00126   vtkSetClampMacro(RightBorderOffset,int,5,VTK_LARGE_INTEGER);
00127   vtkGetMacro(RightBorderOffset,int);
00128   vtkSetClampMacro(TopBorderOffset,int,5,VTK_LARGE_INTEGER);
00129   vtkGetMacro(TopBorderOffset,int);
00130   vtkSetClampMacro(LeftBorderOffset,int,5,VTK_LARGE_INTEGER);
00131   vtkGetMacro(LeftBorderOffset,int);
00132   vtkSetClampMacro(BottomBorderOffset,int,5,VTK_LARGE_INTEGER);
00133   vtkGetMacro(BottomBorderOffset,int);
00135 
00137 
00138   vtkGetObjectMacro(LegendTitleProperty,vtkTextProperty);
00139   vtkGetObjectMacro(LegendLabelProperty,vtkTextProperty);
00141       
00143 
00146   vtkGetObjectMacro(RightAxis,vtkAxisActor2D);
00147   vtkGetObjectMacro(TopAxis,vtkAxisActor2D);
00148   vtkGetObjectMacro(LeftAxis,vtkAxisActor2D);
00149   vtkGetObjectMacro(BottomAxis,vtkAxisActor2D);
00151 
00153 
00154   virtual void BuildRepresentation(vtkViewport *viewport);
00155   virtual void GetActors2D(vtkPropCollection*);
00156   virtual void ReleaseGraphicsResources(vtkWindow*);
00157   virtual int RenderOverlay(vtkViewport*);
00158   virtual int RenderOpaqueGeometry(vtkViewport*);
00160 
00161 protected:
00162   vtkLegendScaleActor();
00163   ~vtkLegendScaleActor();
00164 
00165   int    LabelMode;
00166   int    RightBorderOffset;
00167   int    TopBorderOffset;
00168   int    LeftBorderOffset;
00169   int    BottomBorderOffset;
00170   
00171   // The four axes around the borders of the renderer
00172   vtkAxisActor2D *RightAxis;
00173   vtkAxisActor2D *TopAxis;
00174   vtkAxisActor2D *LeftAxis;
00175   vtkAxisActor2D *BottomAxis;
00176   
00177   // Control the display of the axes
00178   int RightAxisVisibility;
00179   int TopAxisVisibility;
00180   int LeftAxisVisibility;
00181   int BottomAxisVisibility;
00182   
00183   // Support for the legend.
00184   int                  LegendVisibility;
00185   vtkPolyData         *Legend;
00186   vtkPoints           *LegendPoints;
00187   vtkPolyDataMapper2D *LegendMapper;
00188   vtkActor2D          *LegendActor;
00189   vtkTextMapper       *LabelMappers[6];
00190   vtkActor2D          *LabelActors[6];
00191   vtkTextProperty     *LegendTitleProperty;
00192   vtkTextProperty     *LegendLabelProperty;
00193   vtkCoordinate       *Coordinate;
00194   
00195   vtkTimeStamp         BuildTime;
00196 
00197 private:
00198   vtkLegendScaleActor(const vtkLegendScaleActor&);  //Not implemented
00199   void operator=(const vtkLegendScaleActor&);  //Not implemented
00200 };
00201 
00202 #endif

Generated by  doxygen 1.7.1