66 const char *p =
Data();
68 const char *chunk = p;
77 int max_ascent, max_descent;
78 gVirtualX->GetFontProperties(font, max_ascent, max_descent);
79 th = max_ascent + max_descent + 1;
84 if (chunk)
gVirtualX->DrawString(
id,
gc,
x,
y, chunk, strlen(chunk));
87 tw =
gVirtualX->TextWidth(font, chunk, p-chunk);
107 const char *p =
Data();
108 const char *prev = p;
109 const char *chunk = p;
115 if (tw <= (
int)
w)
return nlines;
120 tw =
gVirtualX->TextWidth(font, chunk, p-chunk);
151 for (p = dup; *p; p++) {
155 for (
char *tmp = p; *tmp; tmp++)
162 for (; *p; p++) p[0] = p[1];
187 const char *p =
Data();
188 const char *prev = p;
189 const char *chunk = p;
199 int max_ascent, max_descent;
200 gVirtualX->GetFontProperties(font, max_ascent, max_descent);
201 th = max_ascent + max_descent + 1;
214 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.
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void w
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(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)
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.
TString(const char *a1, Ssiz_t n1, const char *a2, Ssiz_t n2)
Special constructor to initialize with the concatenation of a1 and a2.
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