ROOT logo
ROOT » GUI » GUI » TGTextBuffer

class TGTextBuffer


TGTextBuffer

A text buffer is used in several widgets, like TGTextEntry,
TGFileDialog, etc. It is a little wrapper around the powerful
TString class and used for single line texts. For multi line texts
use TGText.


Function Members (Methods)

public:
TGTextBuffer()
TGTextBuffer(Int_t length)
virtual~TGTextBuffer()
voidAddText(Int_t pos, const char* text)
voidAddText(Int_t pos, const char* text, Int_t length)
static TClass*Class()
voidClear()
UInt_tGetBufferLength() const
const char*GetString() const
UInt_tGetTextLength() const
virtual TClass*IsA() const
voidRemoveText(Int_t pos, Int_t length)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
protected:
TGTextBuffer(const TGTextBuffer& tb)
TGTextBuffer&operator=(const TGTextBuffer& tb)

Data Members

private:
TString*fBuffer

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGTextBuffer(const TGTextBuffer& tb)
{ }
TGTextBuffer& operator=(const TGTextBuffer& tb)
{if(this!=&tb) fBuffer=tb.fBuffer; return *this;}
TGTextBuffer()
{ }
TGTextBuffer(Int_t length)
{ }
virtual ~TGTextBuffer()
{ delete fBuffer; }
UInt_t GetTextLength() const
{ return fBuffer->Length(); }
UInt_t GetBufferLength() const
{ return fBuffer->Capacity(); }
const char * GetString() const
{ return fBuffer->Data(); }
void AddText(Int_t pos, const char* text)
{ fBuffer->Insert(pos, text); }
void AddText(Int_t pos, const char* text, Int_t length)
{ fBuffer->Insert(pos, text, length); }
void RemoveText(Int_t pos, Int_t length)
{ fBuffer->Remove(pos, length); }
void Clear()