68 const char *
p =
Data();
70 const char *chunk =
p;
79 int max_ascent, max_descent;
80 gVirtualX->GetFontProperties(font, max_ascent, max_descent);
81 th = max_ascent + max_descent + 1;
86 if (chunk)
gVirtualX->DrawString(
id,
gc,
x,
y, chunk, strlen(chunk));
89 tw =
gVirtualX->TextWidth(font, chunk,
p-chunk);
109 const char *
p =
Data();
110 const char *prev =
p;
111 const char *chunk =
p;
117 if (tw <= (
int)
w)
return nlines;
122 tw =
gVirtualX->TextWidth(font, chunk,
p-chunk);
153 for (
p = dup; *
p;
p++) {
157 for (
char *tmp =
p; *tmp; tmp++)
164 for (; *
p;
p++)
p[0] =
p[1];
189 const char *
p =
Data();
190 const char *prev =
p;
191 const char *chunk =
p;
201 int max_ascent, max_descent;
202 gVirtualX->GetFontProperties(font, max_ascent, max_descent);
203 th = max_ascent + max_descent + 1;
216 tw =
gVirtualX->TextWidth(font, chunk,
p-chunk);
Handle_t GContext_t
Graphics context handle.
Handle_t Drawable_t
Drawable handle.
Handle_t FontStruct_t
Pointer to font structure.
winID h TVirtualViewer3D TVirtualGLPainter p
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 gc
char * StrDup(const char *str)
Duplicate the string str.
TGHotString is a string with a "hot" character underlined.
TGHotString(const char *s)
Create a hot string.
void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y) override
Draw a hot string and underline the hot character.
Int_t fOff1
variable used during drawing (cache)
char fHotChar
hot character
void DrawHotChar(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw the underline under the hot character.
void DrawWrapped(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, FontStruct_t font) override
Draw a hot string in a column with width w.
GContext_t fLastGC
context used during last drawing
Int_t fHotPos
position of hot character
Int_t fOff2
variable used during drawing (cache)
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
virtual Int_t GetLines(FontStruct_t font, UInt_t w)
Get number of lines of width w the string would take using a certain font.
virtual void DrawWrapped(Drawable_t id, GContext_t gc, Int_t x, Int_t y, UInt_t w, FontStruct_t font)
Draw a string in a column with width w.
const char * Data() const
TString & Append(const char *cs)
Graphics context structure.
Mask_t fMask
bit mask specifying which fields are valid
FontH_t fFont
default text font for text operations