ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
TGTextLine Class Reference

Definition at line 35 of file TGText.h.

Public Member Functions

 TGTextLine ()
 
 TGTextLine (TGTextLine *line)
 Initialize line of text with other line of text (not copy ctor). More...
 
 TGTextLine (const char *string)
 Initialize line of text with a const char*. More...
 
virtual ~TGTextLine ()
 Delete a line of text. More...
 
void Clear ()
 Clear a line of text. More...
 
ULong_t GetLineLength ()
 
void DelText (ULong_t pos, ULong_t length)
 Delete length chars from line starting at position pos. More...
 
void InsText (ULong_t pos, const char *text)
 Insert text in line starting at position pos. More...
 
char * GetText (ULong_t pos, ULong_t length)
 Get length characters from line starting at pos. More...
 
char * GetText () const
 
char * GetWord (ULong_t pos)
 Get word at position. Returned string must be deleted. More...
 
void DelChar (ULong_t pos)
 Delete a character from the line. More...
 
void InsChar (ULong_t pos, char character)
 Insert a character at the specified position. More...
 
char GetChar (ULong_t pos)
 Get a character at the specified position from the line. More...
 

Protected Member Functions

 TGTextLine (const TGTextLine &)
 copy constructor More...
 
TGTextLineoperator= (const TGTextLine &)
 assignment operator More...
 

Protected Attributes

char * fString
 
ULong_t fLength
 
TGTextLinefPrev
 
TGTextLinefNext
 

Friends

class TGText
 

#include <TGText.h>

Constructor & Destructor Documentation

TGTextLine::TGTextLine ( const TGTextLine tl)
protected

copy constructor

Definition at line 84 of file TGText.cxx.

TGTextLine::TGTextLine ( )
TGTextLine::TGTextLine ( TGTextLine line)

Initialize line of text with other line of text (not copy ctor).

Definition at line 55 of file TGText.cxx.

TGTextLine::TGTextLine ( const char *  string)

Initialize line of text with a const char*.

Definition at line 67 of file TGText.cxx.

TGTextLine::~TGTextLine ( )
virtual

Delete a line of text.

Definition at line 115 of file TGText.cxx.

Member Function Documentation

void TGTextLine::Clear ( )

Clear a line of text.

Definition at line 124 of file TGText.cxx.

Referenced by TGText::Clear().

void TGTextLine::DelChar ( ULong_t  pos)

Delete a character from the line.

Definition at line 262 of file TGText.cxx.

Referenced by TGText::DelChar().

void TGTextLine::DelText ( ULong_t  pos,
ULong_t  length 
)

Delete length chars from line starting at position pos.

Definition at line 135 of file TGText.cxx.

Referenced by TGText::BreakLine(), TGText::DelText(), and TGText::InsText().

char TGTextLine::GetChar ( ULong_t  pos)

Get a character at the specified position from the line.

Returns -1 if pos is out of range.

Definition at line 302 of file TGText.cxx.

Referenced by TGText::GetChar().

ULong_t TGTextLine::GetLineLength ( )
inline
char * TGTextLine::GetText ( ULong_t  pos,
ULong_t  length 
)

Get length characters from line starting at pos.

Returns 0 in case pos and length are out of range. The returned string must be freed by the user.

Definition at line 183 of file TGText.cxx.

Referenced by TGText::AsString(), TGText::BreakLine(), TGText::DelText(), TGText::GetLine(), TGTextEdit::HandleDoubleClick(), TGText::InsText(), and TGTextLine().

char* TGTextLine::GetText ( ) const
inline

Definition at line 60 of file TGText.h.

char * TGTextLine::GetWord ( ULong_t  pos)

Get word at position. Returned string must be deleted.

Definition at line 203 of file TGText.cxx.

Referenced by TGTextEdit::HandleButton().

void TGTextLine::InsChar ( ULong_t  pos,
char  character 
)

Insert a character at the specified position.

Definition at line 281 of file TGText.cxx.

Referenced by TGText::InsChar().

void TGTextLine::InsText ( ULong_t  pos,
const char *  text 
)

Insert text in line starting at position pos.

Definition at line 160 of file TGText.cxx.

Referenced by TGText::DelText(), and TGText::InsText().

TGTextLine & TGTextLine::operator= ( const TGTextLine tl)
protected

assignment operator

Definition at line 98 of file TGText.cxx.

Friends And Related Function Documentation

friend class TGText
friend

Definition at line 37 of file TGText.h.

Member Data Documentation

ULong_t TGTextLine::fLength
protected
TGTextLine* TGTextLine::fNext
protected
TGTextLine* TGTextLine::fPrev
protected
char* TGTextLine::fString
protected
Collaboration diagram for TGTextLine:
[legend]

The documentation for this class was generated from the following files: