ROOT logo
// @(#)root/graf:$Id$
// Author: Matthew.Adam.Dobbs   06/09/99

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/
//--------------------------------------------------------------------------

#ifndef ROOT_TLegendEntry
#define ROOT_TLegendEntry


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

#ifndef ROOT_TObject
#include "TObject.h"
#endif
#ifndef ROOT_TAttText
#include "TAttText.h"
#endif
#ifndef ROOT_TAttLine
#include "TAttLine.h"
#endif
#ifndef ROOT_TAttFill
#include "TAttFill.h"
#endif
#ifndef ROOT_TAttMarker
#include "TAttMarker.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif

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

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

private:
   TLegendEntry& operator=(const TLegendEntry&); // Not implemented

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

#endif
 TLegendEntry.h:1
 TLegendEntry.h:2
 TLegendEntry.h:3
 TLegendEntry.h:4
 TLegendEntry.h:5
 TLegendEntry.h:6
 TLegendEntry.h:7
 TLegendEntry.h:8
 TLegendEntry.h:9
 TLegendEntry.h:10
 TLegendEntry.h:11
 TLegendEntry.h:12
 TLegendEntry.h:13
 TLegendEntry.h:14
 TLegendEntry.h:15
 TLegendEntry.h:16
 TLegendEntry.h:17
 TLegendEntry.h:18
 TLegendEntry.h:19
 TLegendEntry.h:20
 TLegendEntry.h:21
 TLegendEntry.h:22
 TLegendEntry.h:23
 TLegendEntry.h:24
 TLegendEntry.h:25
 TLegendEntry.h:26
 TLegendEntry.h:27
 TLegendEntry.h:28
 TLegendEntry.h:29
 TLegendEntry.h:30
 TLegendEntry.h:31
 TLegendEntry.h:32
 TLegendEntry.h:33
 TLegendEntry.h:34
 TLegendEntry.h:35
 TLegendEntry.h:36
 TLegendEntry.h:37
 TLegendEntry.h:38
 TLegendEntry.h:39
 TLegendEntry.h:40
 TLegendEntry.h:41
 TLegendEntry.h:42
 TLegendEntry.h:43
 TLegendEntry.h:44
 TLegendEntry.h:45
 TLegendEntry.h:46
 TLegendEntry.h:47
 TLegendEntry.h:48
 TLegendEntry.h:49
 TLegendEntry.h:50
 TLegendEntry.h:51
 TLegendEntry.h:52
 TLegendEntry.h:53
 TLegendEntry.h:54
 TLegendEntry.h:55
 TLegendEntry.h:56
 TLegendEntry.h:57
 TLegendEntry.h:58
 TLegendEntry.h:59
 TLegendEntry.h:60
 TLegendEntry.h:61
 TLegendEntry.h:62
 TLegendEntry.h:63
 TLegendEntry.h:64
 TLegendEntry.h:65
 TLegendEntry.h:66
 TLegendEntry.h:67
 TLegendEntry.h:68
 TLegendEntry.h:69
 TLegendEntry.h:70
 TLegendEntry.h:71
 TLegendEntry.h:72
 TLegendEntry.h:73