File indexing completed on 2025-01-18 10:12:12
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef ROOT_TLegendEntry
0014 #define ROOT_TLegendEntry
0015
0016
0017 #include "TObject.h"
0018 #include "TAttText.h"
0019 #include "TAttLine.h"
0020 #include "TAttFill.h"
0021 #include "TAttMarker.h"
0022 #include "TString.h"
0023
0024 class TLegendEntry : public TObject, public TAttText, public TAttLine,
0025 public TAttFill, public TAttMarker {
0026 public:
0027 TLegendEntry();
0028 TLegendEntry(const TObject *obj, const char *label = nullptr, Option_t *option="lpf" );
0029 TLegendEntry( const TLegendEntry &entry );
0030 ~TLegendEntry() override;
0031 void Copy( TObject &obj ) const override;
0032 virtual const char *GetLabel() const { return fLabel.Data(); }
0033 virtual TObject *GetObject() const { return fObject; }
0034 Option_t *GetOption() const override { return fOption.Data(); }
0035 void Print( Option_t *option = "" ) const override;
0036 virtual void SaveEntry( std::ostream &out, const char *name );
0037 virtual void SetLabel( const char *label = "" ) { fLabel = label; }
0038 virtual void SetObject(TObject* obj );
0039 virtual void SetObject( const char *objectName );
0040 virtual void SetOption( Option_t *option="lpf" ) { fOption = option; }
0041
0042 protected:
0043 TObject *fObject;
0044 TString fLabel;
0045 TString fOption;
0046
0047 private:
0048 TLegendEntry& operator=(const TLegendEntry&) = delete;
0049
0050 ClassDefOverride(TLegendEntry,1)
0051 };
0052
0053 #endif