TPaveText
class description - source file - inheritance tree
public:
TPaveText TPaveText()
TPaveText TPaveText(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Option_t* option = "br")
TPaveText TPaveText(const TPaveText& pavetext)
virtual void ~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)
static TClass* Class()
virtual void Clear(Option_t* option)
virtual void DeleteText()
virtual void Draw(Option_t* option)
virtual void DrawFile(const char* filename, Option_t* option)
virtual void EditText()
const char* GetLabel() const
virtual TText* GetLine(Int_t number) const
virtual TText* GetLineWith(const char* text) const
virtual TList* GetListOfLines() const
Float_t GetMargin() const
virtual TObject* GetObject(Double_t& ymouse, Double_t& yobj) const
virtual Int_t GetSize() const
virtual void InsertLine()
virtual void InsertText(const char* label)
virtual TClass* IsA() const
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)
virtual void SaveLines(ofstream& out, const char* name)
virtual void SavePrimitive(ofstream& out, Option_t* option)
virtual void SetAllWith(const char* text, Option_t* option, Double_t value)
virtual void SetLabel(const char* label)
virtual void SetMargin(Float_t margin = 0.05)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
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
See also
-
TDiamond, TPaveStats, TPavesText
A PaveText is a Pave (see TPave) with text,lines or/and boxes.
/*
*/
TPaveText(): TPave(), TAttText()
*-*-*-*-*-*-*-*-*-*-*pavetext default constructor*-*-*-*-*-*-*-*-*-*-*-*-*
*-* =============================
TPaveText(Double_t x1, Double_t y1,Double_t x2, Double_t y2, Option_t *option)
:TPave(x1,y1,x2,y2,4,option), TAttText(22,0,1,62,0)
*-*-*-*-*-*-*-*-*-*-*pavetext normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ============================
a PaveText is a Pave with several lines of text
The Pave is by default defined bith bordersize=5 and option ="br".
The individual text items are entered via AddText
By default, text items inherits from the default pavetext AttText.
A title can be added later to this pavetext via TPaveText::SetLabel.
IMPORTANT NOTE:
Because TPave objects (and objects deriving from TPave) have their
master coordinate system in NDC, one cannot use the TBox functions
SetX1,SetY1,SetX2,SetY2 to change the corner coordinates. One should use
instead SetX1NDC, SetY1NDC, SetX2NDC, SetY2NDC.
~TPaveText()
*-*-*-*-*-*-*-*-*-*-*pavetext default destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ============================
TPaveText(const TPaveText &pavetext) : TPave(), TAttText()
TBox* AddBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
*-*-*-*-*-*-*-*-*Add a new graphics box to this pavetext*-*-*-*-*-*-*-*-*-*
*-* =======================================
TLine* AddLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
*-*-*-*-*-*-*-*-*Add a new graphics line to this pavetext*-*-*-*-*-*-*-*-*-*
*-* ========================================
TText* AddText(Double_t x1, Double_t y1, const char *text)
*-*-*-*-*Add a new Text line to this pavetext at given coordinates*-*-*-*-*
*-* =========================================================
TText* AddText(const char *text)
*-*-*-*-*-*-*-*-*Add a new Text line to this pavetext*-*-*-*-*-*-*-*-*-*-*-*
*-* ====================================
void Clear(Option_t *)
*-*-*-*-*-*-*-*-*-*Clear all lines in this pavetext*-*-*-*-*-*-*-*-*-*
*-* ================================
void DeleteText()
*-*-*-*-*-*-*-*-*Delete text at the mouse position*-*-*-*-*-*-*-*-*
*-* =========================================
void Draw(Option_t *option)
*-*-*-*-*-*-*-*-*-*-*Draw this pavetext with its current attributes*-*-*-*-*
*-* ===============================================
void DrawFile(const char *filename, Option_t *option)
*-*-*-*-*-*-*-*-*Draw lines in filename in this pavetext*-*-*-*-*-*-*-*
*-* =======================================
void EditText()
*-*-*-*-*-*-*-*-*Edit text at the mouse position*-*-*-*-*-*-*-*-*
*-* =========================================
TText* GetLine(Int_t number) const
*-*-*-*-*-*-*-*Get Pointer to line number in this pavetext*-*-*-*-*-*-*-*
*-* ===========================================
TText* GetLineWith(const char *text) const
*-*-*-*-*Get Pointer to first containing string text in this pavetext*-*-*-*
*-* ============================================================
TObject* GetObject(Double_t &ymouse, Double_t &yobj) const
*-*-*-*-*Get object pointed by the mouse in this pavetext*-*-*-*
*-* ================================================
Int_t GetSize() const
return number of text lines (ignoring Tlines, etc)
void InsertLine()
*-*-*-*-*-*-*-*-*Add a new lineine at the mouse position*-*-*-*-*-*-*-*-*
*-* =======================================
void InsertText(const char *text)
*-*-*-*-*-*-*-*-*Add a new Text line at the mouse position*-*-*-*-*-*-*-*-*
*-* =========================================
void Paint(Option_t *option)
*-*-*-*-*-*-*-*-*-*-*Paint this pavetext with its current attributes*-*-*-*
*-* ================================================
void PaintPrimitives(Int_t mode)
*-*-*-*-*-*-*-*Paint list of primitives in this pavetext*-*-*-*-*-*-*-*
*-* =========================================
void Print(Option_t *option) const
*-*-*-*-*-*-*-*-*-*-*Dump this pavetext with its attributes*-*-*-*-*-*-*-*
*-* =======================================
void ReadFile(const char *filename, Option_t *option, Int_t nlines, Int_t fromline)
*-*-*-*-*-*-*-*-*Read lines of filename in this pavetext*-*-*-*-*-*-*-*-*
*-* =======================================
Read from line number fromline a total of nlines
Note that this function changes the default text alignment to left/center
void SaveLines(ofstream &out, const char *name)
Save lines of this pavetext as C++ statements on output stream out
void SavePrimitive(ofstream &out, Option_t *)
Save primitive as a C++ statement(s) on output stream out
void SetAllWith(const char *text, Option_t *option, Double_t value)
*-*-*-*-*-*Set attribute option for all lines containing string text*-*-*-*-*
*-* ================= =======================================
Possible options are all the AttText attributes
Align, Color, Font, Size and Angle
void Streamer(TBuffer &R__b)
Stream an object of class TPaveText.
Inline Functions
const char* GetLabel() const
TList* GetListOfLines() const
Float_t GetMargin() const
void SetLabel(const char* label)
void SetMargin(Float_t margin = 0.05)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void StreamerNVirtual(TBuffer& b)
Author: Rene Brun 20/10/95
Last update: root/graf:$Name: $:$Id: TPaveText.cxx,v 1.17 2002/08/05 21:12:12 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.