TGText Class Reference

#include <TGText.h>

List of all members.

Public Member Functions

 TGText ()
 TGText (TGText *text)
 TGText (const char *string)
virtual ~TGText ()
void Clear ()
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
const char * GetFileName () const
Bool_t DelChar (TGLongPosition pos)
Bool_t InsChar (TGLongPosition pos, char c)
char GetChar (TGLongPosition pos)
Bool_t DelText (TGLongPosition start, TGLongPosition end)
Bool_t InsText (TGLongPosition pos, const char *buf)
Bool_t InsText (TGLongPosition ins_pos, TGText *src, TGLongPosition start_src, TGLongPosition end_src)
Bool_t AddText (TGText *text)
Bool_t DelLine (ULong_t pos)
char * GetLine (TGLongPosition pos, ULong_t length)
TString AsString ()
TGTextLineGetCurrentLine () const
Bool_t BreakLine (TGLongPosition pos)
Bool_t InsLine (ULong_t row, const char *string)
Long_t RowCount () const
Long_t ColCount () const
Long_t GetLineLength (Long_t row)
Long_t GetLongestLine () const
void ReTab (Long_t row)
Bool_t Search (TGLongPosition *foundPos, TGLongPosition start, const char *searchString, Bool_t direction, Bool_t caseSensitive)
Bool_t Replace (TGLongPosition start, const char *oldText, const char *newText, Bool_t direction, Bool_t caseSensitive)
 TGText ()
 TGText (TGText *text)
 TGText (const char *string)
virtual ~TGText ()
void Clear ()
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
const char * GetFileName () const
Bool_t DelChar (TGLongPosition pos)
Bool_t InsChar (TGLongPosition pos, char c)
char GetChar (TGLongPosition pos)
Bool_t DelText (TGLongPosition start, TGLongPosition end)
Bool_t InsText (TGLongPosition pos, const char *buf)
Bool_t InsText (TGLongPosition ins_pos, TGText *src, TGLongPosition start_src, TGLongPosition end_src)
Bool_t AddText (TGText *text)
Bool_t DelLine (ULong_t pos)
char * GetLine (TGLongPosition pos, ULong_t length)
TString AsString ()
TGTextLineGetCurrentLine () const
Bool_t BreakLine (TGLongPosition pos)
Bool_t InsLine (ULong_t row, const char *string)
Long_t RowCount () const
Long_t ColCount () const
Long_t GetLineLength (Long_t row)
Long_t GetLongestLine () const
void ReTab (Long_t row)
Bool_t Search (TGLongPosition *foundPos, TGLongPosition start, const char *searchString, Bool_t direction, Bool_t caseSensitive)
Bool_t Replace (TGLongPosition start, const char *oldText, const char *newText, Bool_t direction, Bool_t caseSensitive)

Protected Member Functions

 TGText (const TGText &)
TGTextoperator= (const TGText &)
void Init ()
Bool_t SetCurrentRow (Long_t row)
void LongestLine ()
 TGText (const TGText &)
TGTextoperator= (const TGText &)
void Init ()
Bool_t SetCurrentRow (Long_t row)
void LongestLine ()

Protected Attributes

TString fFilename
Bool_t fIsSaved
TGTextLinefFirst
TGTextLinefCurrent
Long_t fCurrentRow
Long_t fRowCount
Long_t fColCount
Long_t fLongestLine
TGTextLinefFirst
TGTextLinefCurrent


Detailed Description

Definition at line 71 of file TGText.h.


Constructor & Destructor Documentation

TGText::TGText ( const TGText  )  [protected]

TGText::TGText (  ) 

Definition at line 349 of file TGText.cxx.

References Init().

TGText::TGText ( TGText text  ) 

Definition at line 357 of file TGText.cxx.

References TGLongPosition::fX, TGLongPosition::fY, Init(), InsText(), and text().

TGText::TGText ( const char *  string  ) 

Definition at line 371 of file TGText.cxx.

References TGLongPosition::fX, TGLongPosition::fY, Init(), and InsText().

TGText::~TGText (  )  [virtual]

Definition at line 383 of file TGText.cxx.

References Clear(), and fFirst.

TGText::TGText ( const TGText  )  [protected]

TGText::TGText (  ) 

TGText::TGText ( TGText text  ) 

TGText::TGText ( const char *  string  ) 

virtual TGText::~TGText (  )  [virtual]


Member Function Documentation

TGText & TGText::operator= ( const TGText  )  [protected]

Definition at line 318 of file TGText.cxx.

References fColCount, fCurrent, fCurrentRow, fFilename, fFirst, fIsSaved, fLongestLine, and fRowCount.

void TGText::Init (  )  [protected]

Definition at line 335 of file TGText.cxx.

References fColCount, fCurrent, fCurrentRow, fFirst, fIsSaved, fLongestLine, fRowCount, and kTRUE.

Referenced by TGText().

Bool_t TGText::SetCurrentRow ( Long_t  row  )  [protected]

Definition at line 1036 of file TGText.cxx.

References fCurrent, fCurrentRow, TGTextLine::fNext, fRowCount, and kFALSE.

Referenced by BreakLine(), DelChar(), DelLine(), DelText(), GetChar(), GetLine(), GetLineLength(), InsChar(), InsLine(), InsText(), Replace(), ReTab(), and Search().

void TGText::LongestLine (  )  [protected]

Definition at line 1201 of file TGText.cxx.

References fColCount, fFirst, TGTextLine::fLength, fLongestLine, and TGTextLine::fNext.

Referenced by BreakLine(), DelChar(), DelLine(), DelText(), InsChar(), InsLine(), InsText(), Load(), and LoadBuffer().

void TGText::Clear (  ) 

Definition at line 392 of file TGText.cxx.

References TGTextLine::Clear(), fColCount, fCurrent, fCurrentRow, fFilename, fFirst, fIsSaved, fLongestLine, TGTextLine::fNext, fRowCount, and kTRUE.

Referenced by TGTextView::Clear(), TGTextEdit::Delete(), TGTextEdit::Paste(), and ~TGText().

Bool_t TGText::Load ( const char *  fn,
Long_t  startpos = 0,
Long_t  length = -1 
)

Definition at line 415 of file TGText.cxx.

References buf, buffer, c, xmlio::cnt, fclose(), fCurrent, fFilename, fFirst, finished, fIsSaved, TGTextLine::fLength, TGTextLine::fNext, fopen, fp, TGTextLine::fPrev, fRowCount, fseek, TGTextLine::fString, i, kFALSE, kMaxLen, kTRUE, LongestLine(), SEEK_SET, strlcpy(), and x09.

Referenced by TGTextView::LoadFile().

Bool_t TGText::LoadBuffer ( const char *  txtbuf  ) 

Definition at line 498 of file TGText.cxx.

References buf, buffer, c, xmlio::cnt, fCurrent, fFilename, fFirst, finished, fIsSaved, TGTextLine::fLength, TGTextLine::fNext, TGTextLine::fPrev, fRowCount, TGTextLine::fString, i, kFALSE, kMaxLen, kTRUE, LongestLine(), s, strlcpy(), and x09.

Referenced by EditorWindow::AddBuffer(), Editor::AddBuffer(), TSessionLogView::AddBuffer(), TProofProgressLog::AddBuffer(), TRootHelpDialog::AddText(), TGTextEdit::HandleSelection(), TGTextView::LoadBuffer(), TGLAnnotation::MakeEditor(), and TGTextEdit::Paste().

Bool_t TGText::Save ( const char *  fn  ) 

Definition at line 594 of file TGText.cxx.

References buffer, EOF, fclose(), fFilename, fFirst, fIsSaved, TGTextLine::fLength, TGTextLine::fNext, fopen, fp, TGTextLine::fString, i, j, kFALSE, kTRUE, and strcpy().

Referenced by TGTextEdit::SaveFile(), TGTextEdit::SavePrimitive(), TGHtml::SavePrimitive(), and TGTextView::SavePrimitive().

Bool_t TGText::Append ( const char *  fn  ) 

Definition at line 634 of file TGText.cxx.

References buffer, EOF, fclose(), fFirst, fIsSaved, TGTextLine::fLength, TGTextLine::fNext, fopen, fp, TGTextLine::fString, i, j, kFALSE, kTRUE, and strcpy().

Bool_t TGText::IsSaved (  )  const [inline]

Definition at line 101 of file TGText.h.

References fIsSaved.

Referenced by TGTextView::IsSaved().

const char* TGText::GetFileName (  )  const [inline]

Definition at line 102 of file TGText.h.

References TString::Data(), and fFilename.

Referenced by TGTextEdit::Print(), TGTextEdit::ProcessMessage(), TGTextEdit::SaveFile(), TGTextEdit::SavePrimitive(), TGTextView::SavePrimitive(), and Editor::SetTitle().

Bool_t TGText::DelChar ( TGLongPosition  pos  ) 

Definition at line 673 of file TGText.cxx.

References TGTextLine::DelChar(), fCurrent, fIsSaved, fRowCount, TGLongPosition::fX, TGLongPosition::fY, kFALSE, kTRUE, LongestLine(), and SetCurrentRow().

Referenced by TGTextEdit::DelChar().

Bool_t TGText::InsChar ( TGLongPosition  pos,
char  c 
)

Definition at line 689 of file TGText.cxx.

References fCurrent, fIsSaved, fRowCount, TGLongPosition::fX, TGLongPosition::fY, TGTextLine::InsChar(), kFALSE, kTRUE, LongestLine(), and SetCurrentRow().

Referenced by TGTextEdit::InsChar(), and TInsTextCom::Notify().

char TGText::GetChar ( TGLongPosition  pos  ) 

Definition at line 705 of file TGText.cxx.

References fCurrent, fRowCount, TGLongPosition::fX, TGLongPosition::fY, TGTextLine::GetChar(), and SetCurrentRow().

Referenced by TGTextEdit::DelChar(), TGTextEdit::DrawCursor(), TGTextEdit::HandleButton(), TGTextEdit::HandleDoubleClick(), TGTextEdit::HandleMotion(), TGTextEdit::HandleSelection(), TGTextEdit::LineDown(), TGTextEdit::LineUp(), TGTextEdit::NextChar(), TGTextEdit::PrevChar(), TGTextEdit::ScreenDown(), TGTextEdit::ScreenUp(), and TDelCharCom::TDelCharCom().

Bool_t TGText::DelText ( TGLongPosition  start,
TGLongPosition  end 
)

Definition at line 717 of file TGText.cxx.

References DelLine(), TGTextLine::DelText(), fCurrent, fCurrentRow, fIsSaved, TGTextLine::fLength, TGTextLine::fNext, fRowCount, TGTextLine::fString, GetLineLength(), TGTextLine::GetLineLength(), TGTextLine::GetText(), i, TGTextLine::InsText(), kFALSE, kTRUE, LongestLine(), SetCurrentRow(), and start.

Referenced by TGTextEdit::Delete(), TInsTextCom::Notify(), and Replace().

Bool_t TGText::InsText ( TGLongPosition  pos,
const char *  buf 
)

Definition at line 869 of file TGText.cxx.

References fCurrent, fIsSaved, TGTextLine::fNext, TGTextLine::fPrev, fRowCount, TGLongPosition::fX, TGLongPosition::fY, TGTextLine::InsText(), kFALSE, kTRUE, LongestLine(), and SetCurrentRow().

Referenced by TGTextView::AddLineFast(), AddText(), TGTextEdit::Copy(), TGTextView::Copy(), TGTextEdit::DelChar(), TGTextEdit::HandleSelection(), TDelTextCom::Notify(), Replace(), and TGText().

Bool_t TGText::InsText ( TGLongPosition  ins_pos,
TGText src,
TGLongPosition  start_src,
TGLongPosition  end_src 
)

Definition at line 765 of file TGText.cxx.

References BreakLine(), TGTextLine::DelText(), fCurrent, fCurrentRow, fIsSaved, TGTextLine::fLength, TGTextLine::fNext, TGTextLine::fPrev, fRowCount, TGLongPosition::fX, TGLongPosition::fY, GetLineLength(), TGTextLine::GetText(), TGTextLine::InsText(), kFALSE, kTRUE, len, LongestLine(), and SetCurrentRow().

Bool_t TGText::AddText ( TGText text  ) 

Definition at line 893 of file TGText.cxx.

References fIsSaved, fRowCount, TGLongPosition::fX, TGLongPosition::fY, InsText(), kFALSE, and text().

Referenced by TGTextView::AddText().

Bool_t TGText::DelLine ( ULong_t  pos  ) 

Definition at line 946 of file TGText.cxx.

References fCurrent, fCurrentRow, fFirst, fIsSaved, TGTextLine::fNext, TGTextLine::fPrev, fRowCount, kFALSE, kTRUE, LongestLine(), and SetCurrentRow().

Referenced by TGTextEdit::DelChar(), and DelText().

char * TGText::GetLine ( TGLongPosition  pos,
ULong_t  length 
)

Definition at line 978 of file TGText.cxx.

References fCurrent, TGLongPosition::fX, TGLongPosition::fY, TGTextLine::GetText(), and SetCurrentRow().

Referenced by TGTextEdit::DelChar(), TGTextView::DrawRegion(), TGTextView::HandleSelectionRequest(), TGTextEdit::Print(), TGTextView::ToObjXCoord(), and TGTextView::ToScrXCoord().

TString TGText::AsString (  ) 

Definition at line 1219 of file TGText.cxx.

References fColCount, fFirst, TGTextLine::fLength, fLongestLine, TGTextLine::fNext, and TGTextLine::GetText().

Referenced by TGTextEdit::Copy(), TGTextEdit::Paste(), and TGLAnnotation::UpdateText().

TGTextLine* TGText::GetCurrentLine (  )  const [inline]

Definition at line 116 of file TGText.h.

References fCurrent.

Referenced by TGTextEdit::HandleButton(), and TGTextEdit::HandleDoubleClick().

Bool_t TGText::BreakLine ( TGLongPosition  pos  ) 

Definition at line 990 of file TGText.cxx.

References TGTextLine::DelText(), fCurrent, fCurrentRow, fIsSaved, TGTextLine::fLength, TGTextLine::fNext, TGTextLine::fPrev, fRowCount, TGLongPosition::fX, TGLongPosition::fY, TGTextLine::GetText(), kFALSE, kTRUE, LongestLine(), and SetCurrentRow().

Referenced by TGTextEdit::BreakLine(), InsText(), TDelTextCom::Notify(), and TInsTextCom::Notify().

Bool_t TGText::InsLine ( ULong_t  row,
const char *  string 
)

Definition at line 909 of file TGText.cxx.

References fCurrent, fCurrentRow, fFirst, fIsSaved, TGTextLine::fNext, TGTextLine::fPrev, fRowCount, kFALSE, kTRUE, LongestLine(), newline, and SetCurrentRow().

Long_t TGText::RowCount (  )  const [inline]

Definition at line 120 of file TGText.h.

References fRowCount.

Referenced by TGTextView::AddLine(), TGTextView::AddLineFast(), TGTextView::AddText(), TGTextEdit::Copy(), TGTextEdit::Delete(), TGTextEdit::DrawCursor(), TGTextView::DrawRegion(), TGTextEdit::Goto(), TGTextEdit::HandleButton(), TGTextView::HandleDNDDrop(), TGTextEdit::HandleDoubleClick(), TGTextEdit::HandleKey(), TGTextEdit::HandleMotion(), TGTextEdit::HandleSelection(), TGTextView::HandleSelectionRequest(), TGTextEdit::LineDown(), TGLAnnotation::MakeEditor(), TGTextView::Mark(), TGTextEdit::NextChar(), TDelTextCom::Notify(), TGDocument::Open(), TGTextEdit::Print(), TGTextView::ReturnHeighestColHeight(), TGTextView::ReturnLineCount(), TGTextView::ReturnLongestLineWidth(), TGTextEdit::ScreenDown(), TGTextView::SelectAll(), TGTextEdit::SetMenuState(), TGTextView::ToObjXCoord(), and TGTextView::ToScrYCoord().

Long_t TGText::ColCount (  )  const [inline]

Definition at line 121 of file TGText.h.

References fColCount.

Referenced by TGDocument::Open().

Long_t TGText::GetLineLength ( Long_t  row  ) 

Definition at line 1025 of file TGText.cxx.

References fCurrent, TGTextLine::GetLineLength(), and SetCurrentRow().

Referenced by TGTextView::AdjustWidth(), TGTextView::Copy(), TGTextEdit::DelChar(), TGTextEdit::Delete(), DelText(), TGTextEdit::DrawCursor(), TGTextView::DrawRegion(), TGTextEdit::End(), TGTextEdit::Goto(), TGTextEdit::HandleButton(), TGTextEdit::HandleDoubleClick(), TGTextEdit::HandleKey(), TGTextEdit::HandleMotion(), TGTextEdit::HandleSelection(), TGTextView::HandleSelectionRequest(), TGTextEdit::InsChar(), InsText(), TGTextEdit::LineDown(), TGTextEdit::LineUp(), TGTextView::Mark(), TGTextEdit::NextChar(), TDelTextCom::Notify(), TGTextEdit::PrevChar(), TGTextEdit::Print(), TGTextView::ReturnLineLength(), TGTextView::ReturnLongestLineWidth(), TGTextView::SelectAll(), TGTextEdit::SetMenuState(), TGTextView::ToObjXCoord(), and TGTextView::ToScrXCoord().

Long_t TGText::GetLongestLine (  )  const [inline]

Definition at line 124 of file TGText.h.

References fLongestLine.

Referenced by TGTextView::AdjustWidth(), and TGTextView::ReturnLongestLine().

void TGText::ReTab ( Long_t  row  ) 

Definition at line 1069 of file TGText.cxx.

References buffer, c, xmlio::cnt, fCurrent, TGTextLine::fLength, TGTextLine::fString, i, j, kMaxLen, SetCurrentRow(), strcpy(), and x09.

Referenced by TGTextEdit::DelChar(), and TGTextEdit::InsChar().

Bool_t TGText::Search ( TGLongPosition foundPos,
TGLongPosition  start,
const char *  searchString,
Bool_t  direction,
Bool_t  caseSensitive 
)

Definition at line 1122 of file TGText.cxx.

References fCurrent, fCurrentRow, TGTextLine::fLength, TGTextLine::fString, TGLongPosition::fX, TGLongPosition::fY, i, TString::kExact, kFALSE, TString::kIgnoreCase, kNPOS, kTRUE, s, SetCurrentRow(), start, and x.

Referenced by Replace(), TGTextView::Search(), and TGTextEdit::Search().

Bool_t TGText::Replace ( TGLongPosition  start,
const char *  oldText,
const char *  newText,
Bool_t  direction,
Bool_t  caseSensitive 
)

Definition at line 1178 of file TGText.cxx.

References DelText(), TGLongPosition::fX, TGLongPosition::fY, InsText(), kFALSE, kTRUE, Search(), SetCurrentRow(), and start.

Referenced by TGTextEdit::Replace().

TGText& TGText::operator= ( const TGText  )  [protected]

void TGText::Init (  )  [protected]

Bool_t TGText::SetCurrentRow ( Long_t  row  )  [protected]

void TGText::LongestLine (  )  [protected]

void TGText::Clear (  ) 

Bool_t TGText::Load ( const char *  fn,
Long_t  startpos = 0,
Long_t  length = -1 
)

Bool_t TGText::LoadBuffer ( const char *  txtbuf  ) 

Bool_t TGText::Save ( const char *  fn  ) 

Bool_t TGText::Append ( const char *  fn  ) 

Bool_t TGText::IsSaved (  )  const [inline]

Definition at line 101 of file TGText.h.

References fIsSaved.

const char* TGText::GetFileName (  )  const [inline]

Definition at line 102 of file TGText.h.

References TString::Data(), and fFilename.

Bool_t TGText::DelChar ( TGLongPosition  pos  ) 

Bool_t TGText::InsChar ( TGLongPosition  pos,
char  c 
)

char TGText::GetChar ( TGLongPosition  pos  ) 

Bool_t TGText::DelText ( TGLongPosition  start,
TGLongPosition  end 
)

Bool_t TGText::InsText ( TGLongPosition  pos,
const char *  buf 
)

Bool_t TGText::InsText ( TGLongPosition  ins_pos,
TGText src,
TGLongPosition  start_src,
TGLongPosition  end_src 
)

Bool_t TGText::AddText ( TGText text  ) 

Bool_t TGText::DelLine ( ULong_t  pos  ) 

char* TGText::GetLine ( TGLongPosition  pos,
ULong_t  length 
)

TString TGText::AsString (  ) 

TGTextLine* TGText::GetCurrentLine (  )  const [inline]

Definition at line 116 of file TGText.h.

References fCurrent.

Bool_t TGText::BreakLine ( TGLongPosition  pos  ) 

Bool_t TGText::InsLine ( ULong_t  row,
const char *  string 
)

Long_t TGText::RowCount (  )  const [inline]

Definition at line 120 of file TGText.h.

References fRowCount.

Long_t TGText::ColCount (  )  const [inline]

Definition at line 121 of file TGText.h.

References fColCount.

Long_t TGText::GetLineLength ( Long_t  row  ) 

Long_t TGText::GetLongestLine (  )  const [inline]

Definition at line 124 of file TGText.h.

References fLongestLine.

void TGText::ReTab ( Long_t  row  ) 

Bool_t TGText::Search ( TGLongPosition foundPos,
TGLongPosition  start,
const char *  searchString,
Bool_t  direction,
Bool_t  caseSensitive 
)

Bool_t TGText::Replace ( TGLongPosition  start,
const char *  oldText,
const char *  newText,
Bool_t  direction,
Bool_t  caseSensitive 
)


Member Data Documentation

TString TGText::fFilename [protected]

Definition at line 74 of file TGText.h.

Referenced by Clear(), GetFileName(), Load(), LoadBuffer(), operator=(), and Save().

Bool_t TGText::fIsSaved [protected]

Definition at line 75 of file TGText.h.

Referenced by AddText(), Append(), BreakLine(), Clear(), DelChar(), DelLine(), DelText(), Init(), InsChar(), InsLine(), InsText(), IsSaved(), Load(), LoadBuffer(), operator=(), and Save().

TGTextLine* TGText::fFirst [protected]

Definition at line 76 of file TGText.h.

Referenced by Append(), AsString(), Clear(), DelLine(), Init(), InsLine(), Load(), LoadBuffer(), LongestLine(), operator=(), Save(), and ~TGText().

TGTextLine* TGText::fCurrent [protected]

Definition at line 77 of file TGText.h.

Referenced by BreakLine(), Clear(), DelChar(), DelLine(), DelText(), GetChar(), GetCurrentLine(), GetLine(), GetLineLength(), Init(), InsChar(), InsLine(), InsText(), Load(), LoadBuffer(), operator=(), ReTab(), Search(), and SetCurrentRow().

Long_t TGText::fCurrentRow [protected]

Definition at line 78 of file TGText.h.

Referenced by BreakLine(), Clear(), DelLine(), DelText(), Init(), InsLine(), InsText(), operator=(), Search(), and SetCurrentRow().

Long_t TGText::fRowCount [protected]

Definition at line 79 of file TGText.h.

Referenced by AddText(), BreakLine(), Clear(), DelChar(), DelLine(), DelText(), GetChar(), Init(), InsChar(), InsLine(), InsText(), Load(), LoadBuffer(), operator=(), RowCount(), and SetCurrentRow().

Long_t TGText::fColCount [protected]

Definition at line 80 of file TGText.h.

Referenced by AsString(), Clear(), ColCount(), Init(), LongestLine(), and operator=().

Long_t TGText::fLongestLine [protected]

Definition at line 81 of file TGText.h.

Referenced by AsString(), Clear(), GetLongestLine(), Init(), LongestLine(), and operator=().

TGTextLine* TGText::fFirst [protected]

Definition at line 76 of file TGText.h.

TGTextLine* TGText::fCurrent [protected]

Definition at line 77 of file TGText.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:40:58 2011 for ROOT_528-00b_version by  doxygen 1.5.1