A++ » INCLUDE » TGText

class TGText


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.


Function Members (Methods)

public:
virtual~TGText()
Bool_tAddText(TGText* text)
Bool_tAppend(const char* fn)
TStringAsString()
Bool_tBreakLine(TGLongPosition pos)
static TClass*Class()
voidClear()
Long_tColCount() const
Bool_tDelChar(TGLongPosition pos)
Bool_tDelLine(ULong_t pos)
Bool_tDelText(TGLongPosition start, TGLongPosition end)
charGetChar(TGLongPosition pos)
TGTextLine*GetCurrentLine() const
const char*GetFileName() const
char*GetLine(TGLongPosition pos, ULong_t length)
Long_tGetLineLength(Long_t row)
Long_tGetLongestLine() const
Bool_tInsChar(TGLongPosition pos, char c)
Bool_tInsLine(ULong_t row, const char* string)
Bool_tInsText(TGLongPosition pos, const char* buf)
Bool_tInsText(TGLongPosition ins_pos, TGText* src, TGLongPosition start_src, TGLongPosition end_src)
virtual TClass*IsA() const
Bool_tIsSaved() const
Bool_tLoad(const char* fn, Long_t startpos = 0, Long_t length = -1)
Bool_tLoadBuffer(const char* txtbuf)
Bool_tReplace(TGLongPosition start, const char* oldText, const char* newText, Bool_t direction, Bool_t caseSensitive)
voidReTab(Long_t row)
Long_tRowCount() const
Bool_tSave(const char* fn)
Bool_tSearch(TGLongPosition* foundPos, TGLongPosition start, const char* searchString, Bool_t direction, Bool_t caseSensitive)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
TGText()
TGText(TGText* text)
TGText(const char* string)
protected:
voidInit()
voidLongestLine()
TGText&operator=(const TGText&)
Bool_tSetCurrentRow(Long_t row)
TGText(const TGText&)

Data Members

protected:
Long_tfColCountnumber of columns in current line
TGTextLine*fCurrentcurrent line
Long_tfCurrentRowcurrent row number
TStringfFilenamename of opened file ("" if open buffer)
TGTextLine*fFirstfirst line of text
Bool_tfIsSavedfalse if text needs to be saved
Long_tfLongestLinelength of longest line
Long_tfRowCountnumber of rows

Class Charts

Inheritance Chart:
TGText

Function documentation

TGTextLine& operator=(const TGText& )
void Clear()
ULong_t GetLineLength()
{ return fLength; }
void DelText(TGLongPosition start, TGLongPosition end)
void InsText(TGLongPosition pos, const char* buf)
void DelChar(TGLongPosition pos)
void InsChar(TGLongPosition pos, char c)
char GetChar(TGLongPosition pos)
TGText(const TGText& )
void Init()
Bool_t SetCurrentRow(Long_t row)
void LongestLine()
TGText()
TGText(TGText* text)
TGText(const char* string)
virtual ~TGText()
Bool_t Load(const char* fn, Long_t startpos = 0, Long_t length = -1)
Bool_t LoadBuffer(const char* txtbuf)
Bool_t Save(const char* fn)
Bool_t Append(const char* fn)
Bool_t IsSaved() const
{ return fIsSaved; }
const char * GetFileName() const
{ return fFilename.Data(); }
Bool_t InsText(TGLongPosition pos, const char* buf)
Bool_t AddText(TGText* text)
Bool_t DelLine(ULong_t pos)
char * GetLine(TGLongPosition pos, ULong_t length)
TString AsString()
TGTextLine * GetCurrentLine() const
{ return fCurrent; }
Bool_t BreakLine(TGLongPosition pos)
Bool_t InsLine(ULong_t row, const char* string)
Long_t RowCount() const
{ return fRowCount; }
Long_t ColCount() const
{ return fColCount; }
Long_t GetLongestLine() const
{ return fLongestLine; }
void ReTab(Long_t row)
Bool_t Search(TGLongPosition* foundPos, TGLongPosition start, const char* searchString, Bool_t direction, Bool_t caseSensitive)