ROOT logo
ROOT » GUI » GUI » TGTextLine

class TGTextLine


TGText

A TGText is a multi line text buffer. It allows the text to be
loaded from file, saved to file and edited. It is used in the
TGTextEdit widget. Single line text is handled by TGTextBuffer
and the TGTextEntry widget.


Function Members (Methods)

public:
TGTextLine()
TGTextLine(TGTextLine* line)
TGTextLine(const char* string)
virtual~TGTextLine()
static TClass*Class()
voidClear()
voidDelChar(ULong_t pos)
voidDelText(ULong_t pos, ULong_t length)
charGetChar(ULong_t pos)
ULong_tGetLineLength()
char*GetText() const
char*GetText(ULong_t pos, ULong_t length)
char*GetWord(ULong_t pos)
voidInsChar(ULong_t pos, char character)
voidInsText(ULong_t pos, const char* text)
virtual TClass*IsA() const
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)

Data Members

protected:
ULong_tfLengthlength of line
TGTextLine*fNextnext line
TGTextLine*fPrevprevious line
char*fStringline of text

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGTextLine()
 Create empty line of text (default ctor).
TGTextLine(TGTextLine* line)
 Initialize line of text with other line of text (not copy ctor).
TGTextLine(const char* string)
 Initialize line of text with a const char*.
TGTextLine(const TGTextLine& )
copy constructor
TGTextLine& operator=(const TGTextLine& )
assignment operator
~TGTextLine()
 Delete a line of text.
void Clear()
 Clear a line of text.
void DelText(ULong_t pos, ULong_t length)
 Delete length chars from line starting at position pos.
void InsText(ULong_t pos, const char* text)
 Insert text in line starting at position pos.
char * 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.
char * GetWord(ULong_t pos)
 Get word at position. Returned string must be deleted.
void DelChar(ULong_t pos)
 Delete a character from the line.
void InsChar(ULong_t pos, char character)
 Insert a character at the specified position.
char GetChar(ULong_t pos)
 Get a character at the specified position from the line.
 Returns -1 if pos is out of range.
ULong_t GetLineLength()
{ return fLength; }
char * GetText(ULong_t pos, ULong_t length)