ROOT logo
// @(#)root/graf:$Id$
// Author: Rene Brun   20/10/95

/*************************************************************************
 * 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_TPaveText
#define ROOT_TPaveText


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TPaveText                                                            //
//                                                                      //
// PaveText   A Pave with several lines of text.                        //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TPave
#include "TPave.h"
#endif
#ifndef ROOT_TText
#include "TText.h"
#endif
#ifndef ROOT_TLine
#include "TLine.h"
#endif


class TPaveText : public TPave, public TAttText {

protected:
   TString    fLabel;          //Label written at the top of the pavetext
   Int_t      fLongest;        //Length of the longest line
   Float_t    fMargin;         //Text margin
   TList      *fLines;         //List of labels


public:
   TPaveText();
   TPaveText(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2, Option_t *option="br");
   TPaveText(const TPaveText &pavetext);
   virtual ~TPaveText();
   TPaveText& operator=(const TPaveText&);

   virtual TBox    *AddBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2);
   virtual TLine   *AddLine(Double_t x1=0, Double_t y1=0, Double_t x2=0, Double_t y2=0);
   virtual TText   *AddText(Double_t x1, Double_t y1, const char *label);
   virtual TText   *AddText(const char *label);
   virtual void     Clear(Option_t *option="");  // *MENU*
   virtual void     DeleteText(); // *MENU*
   virtual void     Draw(Option_t *option="");
   virtual void     DrawFile(const char *filename, Option_t *option="");
   virtual void     EditText(); // *MENU*
   const char      *GetLabel() const {return fLabel.Data();}
   virtual TText   *GetLine(Int_t number) const;
   virtual TText   *GetLineWith(const char *text) const;
   virtual TList   *GetListOfLines() const {return fLines;}
   Float_t          GetMargin() const {return fMargin;}
   virtual TObject *GetObject(Double_t &ymouse, Double_t &yobj) const;
   virtual Int_t    GetSize() const;
   virtual void     InsertLine(); // *MENU*
   virtual void     InsertText(const char *label); // *MENU*
   virtual void     Paint(Option_t *option="");
   virtual void     PaintPrimitives(Int_t mode);
   virtual void     Print(Option_t *option="") const;
   virtual void     ReadFile(const char *filename, Option_t *option="", Int_t nlines=50, Int_t fromline=0); // *MENU*
   virtual void     SaveLines(ostream &out, const char *name);
   virtual void     SavePrimitive(ostream &out, Option_t *option = "");
   virtual void     SetAllWith(const char *text, Option_t *option, Double_t value); // *MENU*
   virtual void     SetLabel(const char *label) {fLabel = label;} // *MENU*
   virtual void     SetMargin(Float_t margin=0.05) {fMargin=margin;} // *MENU*
   virtual void     UseCurrentStyle();

   ClassDef(TPaveText,2)  //PaveText. A Pave with several lines of text.
};

#endif

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