TPaveText.h

Go to the documentation of this file.
00001 // @(#)root/graf:$Id: TPaveText.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Rene Brun   20/10/95
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 #ifndef ROOT_TPaveText
00013 #define ROOT_TPaveText
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TPaveText                                                            //
00019 //                                                                      //
00020 // PaveText   A Pave with several lines of text.                        //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TPave
00025 #include "TPave.h"
00026 #endif
00027 #ifndef ROOT_TText
00028 #include "TText.h"
00029 #endif
00030 #ifndef ROOT_TLine
00031 #include "TLine.h"
00032 #endif
00033 
00034 
00035 class TPaveText : public TPave, public TAttText {
00036 
00037 protected:
00038    TString    fLabel;          //Label written at the top of the pavetext
00039    Int_t      fLongest;        //Length of the longest line
00040    Float_t    fMargin;         //Text margin
00041    TList      *fLines;         //List of labels
00042 
00043 
00044 public:
00045    TPaveText();
00046    TPaveText(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2, Option_t *option="br");
00047    TPaveText(const TPaveText &pavetext);
00048    virtual ~TPaveText();
00049    TPaveText& operator=(const TPaveText&);
00050 
00051    virtual TBox    *AddBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2);
00052    virtual TLine   *AddLine(Double_t x1=0, Double_t y1=0, Double_t x2=0, Double_t y2=0);
00053    virtual TText   *AddText(Double_t x1, Double_t y1, const char *label);
00054    virtual TText   *AddText(const char *label);
00055    virtual void     Clear(Option_t *option="");  // *MENU*
00056    virtual void     DeleteText(); // *MENU*
00057    virtual void     Draw(Option_t *option="");
00058    virtual void     DrawFile(const char *filename, Option_t *option="");
00059    virtual void     EditText(); // *MENU*
00060    const char      *GetLabel() const {return fLabel.Data();}
00061    virtual TText   *GetLine(Int_t number) const;
00062    virtual TText   *GetLineWith(const char *text) const;
00063    virtual TList   *GetListOfLines() const {return fLines;}
00064    Float_t          GetMargin() const {return fMargin;}
00065    virtual TObject *GetObject(Double_t &ymouse, Double_t &yobj) const;
00066    virtual Int_t    GetSize() const;
00067    virtual void     InsertLine(); // *MENU*
00068    virtual void     InsertText(const char *label); // *MENU*
00069    virtual void     Paint(Option_t *option="");
00070    virtual void     PaintPrimitives(Int_t mode);
00071    virtual void     Print(Option_t *option="") const;
00072    virtual void     ReadFile(const char *filename, Option_t *option="", Int_t nlines=50, Int_t fromline=0); // *MENU*
00073    virtual void     SaveLines(ostream &out, const char *name);
00074    virtual void     SavePrimitive(ostream &out, Option_t *option = "");
00075    virtual void     SetAllWith(const char *text, Option_t *option, Double_t value); // *MENU*
00076    virtual void     SetLabel(const char *label) {fLabel = label;} // *MENU*
00077    virtual void     SetMargin(Float_t margin=0.05) {fMargin=margin;} // *MENU*
00078    virtual void     UseCurrentStyle();
00079 
00080    ClassDef(TPaveText,2)  //PaveText. A Pave with several lines of text.
00081 };
00082 
00083 #endif
00084 

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