TText


class description - source file - inheritance tree

class TText : public TNamed, public TAttText


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

Data Members

protected:
Coord_t fX X position of text (left,center,etc..) Coord_t fY Y position of text (left,center,etc..)


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.

  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.
  In case a text is drawn to a PostScript file (see TPostScript)
  the following characters have a special action:

      ` : go to greek
      ' : go to special characters
      ~ : go to ZapfDingbats
      ? : go to subscript
      ^ : go to superscript
      ! : go to normal level of script
      & : backspace one character
      # : end of greek or of ZapfDingbats

  This special characters have no effect on the screen.


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

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

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

TText(const TText &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.


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

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

TText* DrawTextNDC(Coord_t x, Coord_t y, const Text_t *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 *)
*-*-*-*-*-*-*-*-*-*-*-*List this text with its attributes*-*-*-*-*-*-*-*-*
*-*                    ==================================

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

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

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

void Print(Option_t *)
*-*-*-*-*-*-*-*-*-*-*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



Inline Functions


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


Author: Nicolas Brun 12/12/94
Last update: 2.22/02 21/05/99 10.59.52 by Rene Brun
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


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.