TText


class description - source file - inheritance tree

class TText : public TNamed, public TAttText


    public:
TText TText() TText TText(Double_t x, Double_t y, const char* text) TText TText(const TText& text) virtual void ~TText() static TClass* Class() virtual void Copy(TObject& text) virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) virtual TText* DrawText(Double_t x, Double_t y, const char* text) virtual TText* DrawTextNDC(Double_t x, Double_t y, const char* text) virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) Double_t GetX() const Double_t GetY() const virtual TClass* IsA() const virtual void ls(Option_t* option) const virtual void Paint(Option_t* option) virtual void PaintText(Double_t x, Double_t y, const char* text) virtual void PaintTextNDC(Double_t u, Double_t v, const char* text) virtual void Print(Option_t* option) const virtual void SavePrimitive(ofstream& out, Option_t* option) virtual void SetNDC(Bool_t isNDC = kTRUE) virtual void SetText(Double_t x, Double_t y, const char* text) virtual void SetX(Double_t x) virtual void SetY(Double_t y) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
Double_t fX X position of text (left,center,etc..) Double_t fY Y position of text (left,center,etc..) public:
static const enum TObject:: kTextNDC


See also

TLatex, TLink

Class Description

   TText is the base class for several text objects.
   See TAttText for a list of text attributes or fonts,
   and also for a discussion on text speed and font quality.

  By default, the text is drawn in the pad coordinates system.
  One can draw in NDC coordinates [0,1] if the function SetNDC
  is called for a TText object.


TText(): TNamed(), TAttText()
*-*-*-*-*-*-*-*-*-*-*Text default constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ========================

TText(Double_t x, Double_t y, const char *text) : TNamed("",text), TAttText()
*-*-*-*-*-*-*-*-*-*-*Text normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =======================

~TText()
*-*-*-*-*-*-*-*-*-*-*Text default destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =======================

TText(const TText &text) : TNamed(text), TAttText(text)

void Copy(TObject &obj)
*-*-*-*-*-*-*-*-*-*-*Copy this text to text*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ======================

Int_t DistancetoPrimitive(Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Compute distance from point px,py to a string*-*-*-*-*
*-*                  =============================================
  Compute the closest distance of approach from point px,py to this text.
  The rectangle surrounding this string is evaluated.
  if point is in rectangle, the distance is set to zero.


TText* DrawText(Double_t x, Double_t y, const char *text)
*-*-*-*-*-*-*-*-*-*-*Draw this text with new coordinates*-*-*-*-*-*-*-*-*-*
*-*                  ===================================

TText* DrawTextNDC(Double_t x, Double_t y, const char *text)
*-*-*-*-*-*-*-*-*-*-*Draw this text with new coordinates in NDC*-*-*-*-*-*
*-*                  ==========================================

void ExecuteEvent(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-*
*-*                  =========================================
  This member function must be implemented to realize the action
  corresponding to the mouse click on the object in the window


void ls(Option_t *) const
*-*-*-*-*-*-*-*-*-*-*-*List this text with its attributes*-*-*-*-*-*-*-*-*
*-*                    ==================================

void Paint(Option_t *)
*-*-*-*-*-*-*-*-*-*-*Paint this text with its current attributes*-*-*-*-*-*-*
*-*                  ===========================================

void PaintText(Double_t x, Double_t y, const char *text)
*-*-*-*-*-*-*-*-*-*-*Draw this text with new coordinates*-*-*-*-*-*-*-*-*-*
*-*                  ===================================

void PaintTextNDC(Double_t u, Double_t v, const char *text)
*-*-*-*-*-*-*-*-*-*-*Draw this text with new coordinates in NDC*-*-*-*-*-*-*
*-*                  ==========================================

void Print(Option_t *) const
*-*-*-*-*-*-*-*-*-*-*Dump this text with its attributes*-*-*-*-*-*-*-*-*-*
*-*                  ==================================

void SavePrimitive(ofstream &out, Option_t *)
 Save primitive as a C++ statement(s) on output stream out

void SetNDC(Bool_t isNDC)
 Set NDC mode on if isNDC = kTRUE, off otherwise

void Streamer(TBuffer &R__b)
 Stream an object of class TText.



Inline Functions


           Double_t GetX() const
           Double_t GetY() const
               void SetText(Double_t x, Double_t y, const char* text)
               void SetX(Double_t x)
               void SetY(Double_t y)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void StreamerNVirtual(TBuffer& b)


Author: Nicolas Brun 12/12/94
Last update: root/graf:$Name: $:$Id: TText.cxx,v 1.13 2002/05/18 08:21:59 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.