//--------------------------------------------------------------------------

#ifndef ROOT_TLegendEntry
#define ROOT_TLegendEntry

//+SEQ,CopyRight,T=NOINCLUDE.

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TLegendEntry                                                         //
// Matthew.Adam.Dobbs@Cern.CH, September 1999                           //
// Storage class for one entry of a TLegend                             //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TObject
//*KEEP,TObject.
#include "TObject.h"
//*KEND.
#endif
#ifndef ROOT_TAttText
//*KEEP,TAttText.
#include "TAttText.h"
//*KEND.
#endif
#ifndef ROOT_TAttLine
//*KEEP,TAttLine.
#include "TAttLine.h"
//*KEND.
#endif
#ifndef ROOT_TAttFill
//*KEEP,TAttFill.
#include "TAttFill.h"
//*KEND.
#endif
#ifndef ROOT_TAttMarker
//*KEEP,TAttMarker.
#include "TAttMarker.h"
//*KEND.
#endif

class TLegendEntry : public TObject, public TAttText, public TAttLine,
                     public TAttFill, public TAttMarker {
public:
  TLegendEntry();
  TLegendEntry(TObject *obj, const Text_t *label = 0, Option_t *option="lpf" );
  TLegendEntry( const TLegendEntry &entry );
  virtual ~TLegendEntry();
  virtual void          Copy( TObject &obj );
  virtual const Text_t *GetLabel() { return fLabel; }
  virtual TObject      *GetObject() { return fObject; }
  virtual Option_t     *GetOption() const { return fOption; }
  virtual void          Print( Option_t *option = "" );
  virtual void          SaveEntry( ofstream &out, const char *name );
  virtual void          SetLabel( const Text_t *label = "" ) { fLabel = label; } // *MENU*
  virtual void          SetObject(TObject* obj );
  virtual void          SetObject( const Text_t *objectName );  // *MENU*
  virtual void          SetOption( Option_t *option="lpf" ) { fOption = option; } // *MENU*

protected:
  TObject      *fObject;   // pointer to object being represented by this entry
  const Text_t *fLabel;    // Text associated with the entry, will become latex
  Option_t     *fOption;   // Options associated with this entry

  ClassDef(TLegendEntry,1) // Storage class for one entry of a TLegend
};

#endif