Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TPaveText.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/graf:$Id$
0002 // Author: Rene Brun   20/10/95
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TPaveText
0013 #define ROOT_TPaveText
0014 
0015 
0016 #include "TPave.h"
0017 #include "TText.h"
0018 
0019 class TLine;
0020 
0021 class TPaveText : public TPave, public TAttText {
0022 
0023 protected:
0024    TString    fLabel;           ///< Label written at the top of the pavetext
0025    Int_t      fLongest;         ///< Length of the longest line
0026    Float_t    fMargin;          ///< Text margin
0027    TList      *fLines{nullptr}; ///< List of labels
0028 
0029 public:
0030    TPaveText();
0031    TPaveText(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2, Option_t *option="br");
0032    TPaveText(const TPaveText &pavetext);
0033    ~TPaveText() override;
0034    TPaveText& operator=(const TPaveText&);
0035 
0036    virtual TBox    *AddBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2);
0037    virtual TLine   *AddLine(Double_t x1=0, Double_t y1=0, Double_t x2=0, Double_t y2=0);
0038    virtual TText   *AddText(Double_t x1, Double_t y1, const char *label);
0039    virtual TText   *AddText(const char *label);
0040    void             Clear(Option_t *option="") override;  // *MENU*
0041    virtual void     DeleteText(); // *MENU*
0042    void             Draw(Option_t *option="") override;
0043    virtual void     DrawFile(const char *filename, Option_t *option="");
0044    virtual void     EditText(); // *MENU*
0045    const char      *GetLabel() const {return fLabel.Data();}
0046    virtual TText   *GetLine(Int_t number) const;
0047    virtual TText   *GetLineWith(const char *text) const;
0048    virtual TList   *GetListOfLines() const {return fLines;}
0049    Float_t          GetMargin() const {return fMargin;}
0050    virtual TObject *GetObject(Double_t &ymouse, Double_t &yobj) const;
0051    virtual Int_t    GetSize() const;
0052    virtual void     InsertLine(); // *MENU*
0053    virtual void     InsertText(const char *label); // *MENU*
0054    void             Paint(Option_t *option="") override;
0055    virtual void     PaintPrimitives(Int_t mode);
0056    void             Print(Option_t *option="") const override;
0057    virtual void     ReadFile(const char *filename, Option_t *option="", Int_t nlines=50, Int_t fromline=0); // *MENU*
0058    virtual void     SaveLines(std::ostream &out, const char *name, Bool_t saved);
0059    void             SavePrimitive(std::ostream &out, Option_t *option = "") override;
0060    virtual void     SetAllWith(const char *text, Option_t *option, Double_t value); // *MENU*
0061    virtual void     SetLabel(const char *label) {fLabel = label;} // *MENU*
0062    virtual void     SetMargin(Float_t margin=0.05) {fMargin=margin;} // *MENU*
0063    void             UseCurrentStyle() override;
0064 
0065    ClassDefOverride(TPaveText,2)  //PaveText. A Pave with several lines of text.
0066 };
0067 
0068 #endif