TLegendEntry.h

Go to the documentation of this file.
00001 // @(#)root/graf:$Id: TLegendEntry.h 26711 2008-12-06 19:50:17Z brun $
00002 // Author: Matthew.Adam.Dobbs   06/09/99
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 //--------------------------------------------------------------------------
00012 
00013 #ifndef ROOT_TLegendEntry
00014 #define ROOT_TLegendEntry
00015 
00016 
00017 //////////////////////////////////////////////////////////////////////////
00018 //                                                                      //
00019 // TLegendEntry                                                         //
00020 // Matthew.Adam.Dobbs@Cern.CH, September 1999                           //
00021 // Storage class for one entry of a TLegend                             //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_TObject
00026 #include "TObject.h"
00027 #endif
00028 #ifndef ROOT_TAttText
00029 #include "TAttText.h"
00030 #endif
00031 #ifndef ROOT_TAttLine
00032 #include "TAttLine.h"
00033 #endif
00034 #ifndef ROOT_TAttFill
00035 #include "TAttFill.h"
00036 #endif
00037 #ifndef ROOT_TAttMarker
00038 #include "TAttMarker.h"
00039 #endif
00040 #ifndef ROOT_TString
00041 #include "TString.h"
00042 #endif
00043 
00044 class TLegendEntry : public TObject, public TAttText, public TAttLine,
00045                      public TAttFill, public TAttMarker {
00046 public:
00047    TLegendEntry();
00048    TLegendEntry(const TObject *obj, const char *label = 0, Option_t *option="lpf" );
00049    TLegendEntry( const TLegendEntry &entry );
00050    virtual ~TLegendEntry();
00051    virtual void          Copy( TObject &obj ) const;
00052    virtual const char   *GetLabel() const { return fLabel.Data(); }
00053    virtual TObject      *GetObject() const { return fObject; }
00054    virtual Option_t     *GetOption() const { return fOption.Data(); }
00055    virtual void          Print( Option_t *option = "" ) const;
00056    virtual void          SaveEntry( ostream &out, const char *name );
00057    virtual void          SetLabel( const char *label = "" ) { fLabel = label; } // *MENU*
00058    virtual void          SetObject(TObject* obj );
00059    virtual void          SetObject( const char *objectName );  // *MENU*
00060    virtual void          SetOption( Option_t *option="lpf" ) { fOption = option; } // *MENU*
00061 
00062 protected:
00063    TObject      *fObject;   // pointer to object being represented by this entry
00064    TString       fLabel;    // Text associated with the entry, will become latex
00065    TString       fOption;   // Options associated with this entry
00066 
00067 private:
00068    TLegendEntry& operator=(const TLegendEntry&); // Not implemented
00069 
00070    ClassDef(TLegendEntry,1) // Storage class for one entry of a TLegend
00071 };
00072 
00073 #endif

Generated on Tue Jul 5 14:14:09 2011 for ROOT_528-00b_version by  doxygen 1.5.1