86 fPrev(
tl.fPrev), fNext(
tl.fNext)
317 fFilename(
gt.fFilename),
318 fIsSaved(
gt.fIsSaved),
320 fCurrent(
gt.fCurrent),
321 fCurrentRow(
gt.fCurrentRow),
322 fRowCount(
gt.fRowCount),
323 fColCount(
gt.fColCount),
324 fLongestLine(
gt.fLongestLine)
376 end.fY =
text->RowCount() - 1;
377 end.fX =
text->GetLineLength(end.fY) - 1;
454 buf2 =
new char[count+1];
459 while ((
c = *
src++)) {
461 if (
c == 0x0D ||
c == 0x0A)
464 else if (
c == 0x09) {
466 while (((
dst-
buf2) & 0x7) && (cnt++ < count-1))
470 if (cnt++ >= count-1)
break;
475 buffer =
new char[bufferSize];
551 while ((
c = *
src++)) {
553 if (
c == 0x0D ||
c == 0x0A)
556 else if (
c == 0x09) {
567 buffer =
new char[bufferSize];
619 buffer =
new char[
travel->fLength+2];
621 buffer[
travel->fLength] =
'\n';
622 buffer[
travel->fLength+1] =
'\0';
623 while (buffer[i] !=
'\0') {
624 if (buffer[i] ==
'\t') {
626 while (buffer[
j] == 16)
660 buffer =
new char[
travel->fLength+2];
662 buffer[
travel->fLength] =
'\n';
663 buffer[
travel->fLength+1] =
'\0';
664 while (buffer[i] !=
'\0') {
665 if (buffer[i] ==
'\t') {
667 while (buffer[
j] == 16 && buffer[
j] !=
'\0')
738 if ((start.fY < 0) || (start.fY >=
fRowCount) ||
751 if (start.fY == end.fY) {
757 for (
Long_t i = start.fY+1; i < end.fY; i++) {
1098 while (buffer[i] !=
'\0') {
1099 if (buffer[i] ==
'\t') {
1101 while (buffer[
j] == 16 && buffer[
j] !=
'\0') {
1118 while ((
c = *
src++)) {
1128 if (cnt++ >=
kMaxLen-1)
break;
1169 for (
int i = (
int)start.fX; i >= 0; i--) {
1172 if (
x >= start.fX) {
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
Option_t Option_t TPoint TPoint const char text
virtual ~TGTextLine()
Delete a line of text.
TGTextLine * fPrev
previous line
char * fString
line of text
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.
char * GetWord(ULong_t pos)
Get word at position. Returned string must be deleted.
void InsText(ULong_t pos, const char *text)
Insert text in line starting at position pos.
TGTextLine * fNext
next line
void Clear()
Clear a line of text.
TGTextLine()
Create empty line of text (default ctor).
void DelText(ULong_t pos, ULong_t length)
Delete length chars from line starting at position pos.
ULong_t fLength
length of line
char * GetText(ULong_t pos, ULong_t length)
Get length characters from line starting at pos.
TGTextLine & operator=(const TGTextLine &)
assignment operator
A TGText is a multi line text buffer.
Bool_t InsChar(TGLongPosition pos, char c)
Insert character c at the specified position pos.
void ReTab(Long_t row)
Redo all tabs in a line. Needed after a new tab is inserted.
virtual ~TGText()
Destroy text buffer.
Long_t fColCount
number of columns in current line
Bool_t AddText(TGText *text)
Add another text buffer to this buffer.
TGTextLine * fFirst
first line of text
Bool_t DelText(TGLongPosition start, TGLongPosition end)
Delete text between start and end positions.
TString fFilename
name of opened file ("" if open buffer)
TGText()
Create default (empty) text buffer.
Long_t fLongestLine
length of longest line
Long_t fRowCount
number of rows
Bool_t fIsSaved
false if text needs to be saved
void LongestLine()
Set fLongestLine.
Bool_t Search(TGLongPosition *foundPos, TGLongPosition start, const char *searchString, Bool_t direction, Bool_t caseSensitive)
Search for string searchString starting at the specified position going in forward (direction = true)...
Bool_t DelLine(ULong_t pos)
Delete specified row. Returns false if row does not exist.
Bool_t Save(const char *fn)
Save text buffer to file fn.
Bool_t Replace(TGLongPosition start, const char *oldText, const char *newText, Bool_t direction, Bool_t caseSensitive)
Replace oldText by newText. Returns false if nothing replaced.
Bool_t InsLine(ULong_t row, const char *string)
Insert string before specified position.
Bool_t SetCurrentRow(Long_t row)
Make specified row the current row.
Long_t fCurrentRow
current row number
Bool_t DelChar(TGLongPosition pos)
Delete character at specified position pos.
Bool_t BreakLine(TGLongPosition pos)
Break line at position pos. Returns false if pos is not valid.
Bool_t InsText(TGLongPosition pos, const char *buf)
Insert single line at specified position.
char * GetLine(TGLongPosition pos, ULong_t length)
Return string at position pos.
TGTextLine * fCurrent
current line
char GetChar(TGLongPosition pos)
Get character a position pos. If character not valid return -1.
Bool_t Load(const char *fn, Long_t startpos=0, Long_t length=-1)
Load text from file fn.
Bool_t LoadBuffer(const char *txtbuf)
Load a 0 terminated buffer. Lines will be split at ' '.
void Clear()
Clear text buffer.
Bool_t Append(const char *fn)
Append buffer to file fn.
Long_t GetLineLength(Long_t row)
Get length of specified line. Returns -1 if row does not exist.
void Init()
Common initialization method.
TString AsString()
Returns content as ROOT string.
TGText & operator=(const TGText &)
assignment operator
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const