168 for (
Int_t i=0; i<256; i++) {
178 const char *
start,
int numChars,
179 int curX,
int newX,
int y)
const;
228 const char *
GetUid(
const char *
string);
Handle_t FontH_t
Font handle (as opposed to Font_t which is an index).
Handle_t Drawable_t
Drawable handle.
Handle_t GContext_t
Graphics context 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).
bool Bool_t
Boolean (0=false, 1=true) (bool).
const char Option_t
Option string (const char).
#define ClassDefOverride(name, id)
Bool_t ParseFontName(const char *string, FontAttributes_t *fa)
Converts a string into a set of font attributes that can be used to construct a font.
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get the specified font.
const char * NameOfFont(TGFont *font)
Given a font, return a textual string identifying it.
char ** GetFontFamilies()
Return information about the font families that are available on the current display.
TGFontPool(const TGFontPool &fp)=delete
Bool_t ParseXLFD(const char *string, XLFDAttributes_t *xa)
Break up a fully specified XLFD into a set of font attributes.
int FindStateNum(const FontStateMap_t *map, const char *strKey)
Given a lookup table, map a string to a number in the table.
TGFont * GetNativeFont(const char *name, Bool_t fixedDefault=kTRUE)
The return value is a pointer to an TGFont object that represents the native font.
const char * GetUid(const char *string)
Given a string, this procedure returns a unique identifier for the string.
Bool_t FieldSpecified(const char *field)
Helper function for ParseXLFD().
TGFont * FindFontByHandle(FontH_t font) const
Find font based on its font handle. Returns 0 if font is not found.
void FreeFont(const TGFont *font)
Free font. If ref count is 0 delete font.
char ** GetAttributeInfo(const FontAttributes_t *fa)
Return information about the font attributes as an array of strings.
const char * FindStateString(const FontStateMap_t *map, int numKey)
Given a lookup table, map a number to a string in the table.
void FreeFontFamilies(char **f)
Delete an array of families allocated GetFontFamilies() method.
TGFont * GetFontFromAttributes(FontAttributes_t *fa, TGFont *fontPtr)
Given a desired set of attributes for a font, find a font with the closest matching attributes and cr...
TGFont * MakeFont(TGFont *font, FontStruct_t fontStruct, const char *fontName)
Helper for GetNativeFont() and GetFontFromAttributes().
~TGFontPool() override
Cleanup font pool.
TGFont * FindFont(FontStruct_t font) const
Find font based on its font struct. Returns 0 if font is not found.
void Print(Option_t *option="") const override
List all fonts in the pool.
void FreeAttributeInfo(char **info)
Free attributes info.
TGFontPool & operator=(const TGFontPool &fp)=delete
Encapsulate fonts used in the GUI system.
char fTypes[256]
Array giving types of all characters in the font, used when displaying control characters.
void GetFontMetrics(FontMetrics_t *m) const
Get font metrics.
void UnderlineChars(Drawable_t dst, GContext_t gc, const char *string, Int_t x, Int_t y, Int_t firstChar, Int_t lastChar) const
This procedure draws an underline for a given range of characters in a given string.
friend class TGTextLayout
void DrawCharsExp(Drawable_t dst, GContext_t gc, const char *source, Int_t numChars, Int_t x, Int_t y) const
Draw a string of characters on the screen.
Int_t fBarHeight
Height of underline or overstrike bar (used for simulating a native underlined or strikeout font).
TObjString * fNamedHash
Pointer to the named object TGFont was based on.
Int_t fWidths[256]
Array giving widths of all possible characters in the font.
Int_t MeasureChars(const char *source, Int_t numChars, Int_t maxLength, Int_t flags, Int_t *length) const
Determine the number of characters from the string that will fit in the given horizontal span.
~TGFont() override
Delete font.
FontStruct_t GetFontStruct() const
Int_t fTabWidth
Width of tabs in this font (pixels).
Int_t TextWidth(const char *string, Int_t numChars=-1) const
A wrapper function for the more complicated interface of MeasureChars.
FontH_t fFontH
Font handle (derived from fontstruct).
Int_t fUnderlineHeight
Height of underline bar (used for drawing underlines on a non-underlined font).
FontStruct_t operator()() const
Not inline due to a bug in g++ 2.96 20000731 (Red Hat Linux 7.0).
FontAttributes_t fFA
Actual font attributes obtained when the font was created.
void operator=(const TGFont &)=delete
TGFont(const TGFont &)=delete
LayoutChunk_t * NewChunk(TGTextLayout *layout, int *maxPtr, const char *start, int numChars, int curX, int newX, int y) const
Helper function for ComputeTextLayout().
FontMetrics_t fFM
Cached font metrics.
Int_t XTextWidth(const char *string, Int_t numChars=-1) const
Return text width in pixels.
FontAttributes_t GetFontAttributes() const
void SavePrimitive(std::ostream &out, Option_t *="") override
Save the used font as a C++ statement(s) on output stream out.
TGTextLayout * ComputeTextLayout(const char *string, Int_t numChars, Int_t wrapLength, Int_t justify, Int_t flags, UInt_t *width, UInt_t *height) const
Computes the amount of screen space needed to display a multi-line, justified string of text.
Int_t fUnderlinePos
Offset from baseline to origin of underline bar (used for drawing underlines on a non-underlined font...
Int_t PostscriptFontName(TString *dst) const
Return the name of the corresponding Postscript font for this TGFont.
void DrawChars(Drawable_t dst, GContext_t gc, const char *source, Int_t numChars, Int_t x, Int_t y) const
Perform a quick sanity check to ensure we won't overflow the X coordinate space.
FontH_t GetFontHandle() const
FontStruct_t fFontStruct
Low level graphics fontstruct.
void Print(Option_t *option="") const override
Print font info.
Is used to keep track of string measurement information when using the text layout facilities.
void DrawText(Drawable_t dst, GContext_t gc, Int_t x, Int_t y, Int_t firstChar, Int_t lastChar) const
Use the information in the TGTextLayout object to display a multi-line, justified string of text.
Int_t PointToChar(Int_t x, Int_t y) const
Use the information in the TGTextLayout token to determine the character closest to the given point.
Int_t IntersectText(Int_t x, Int_t y, Int_t w, Int_t h) const
Determines whether a text layout lies entirely inside, entirely outside, or overlaps a given rectangl...
const TGFont * fFont
The font used when laying out the text.
void operator=(const TGTextLayout &tlayout)=delete
void ToPostscript(TString *dst) const
Outputs the contents of a text layout in Postscript format.
Int_t fNumChunks
Number of chunks actually used in following array.
TGTextLayout(const TGTextLayout &tlayout)=delete
Int_t DistanceToText(Int_t x, Int_t y) const
Computes the distance in pixels from the given point to the given text layout.
Int_t CharBbox(Int_t index, Int_t *x, Int_t *y, Int_t *w, Int_t *h) const
Use the information in the TGTextLayout token to return the bounding box for the character specified ...
LayoutChunk_t * fChunks
Array of chunks. The actual size will be maxChunks.
Int_t fWidth
The maximum width of all lines in the text layout.
void UnderlineChar(Drawable_t dst, GContext_t gc, Int_t x, Int_t y, Int_t underline) const
Use the information in the TGTextLayout object to display an underline below an individual character.
const char * fString
The string that was laid out.
~TGTextLayout() override
destructor
THashTable implements a hash table to store TObject's.
Collectable string class.
TObject()
TObject constructor.
void SetRefCount(UInt_t r)
FontAttributes_t & operator=(const FontAttributes_t &f)
FontAttributes_t(const FontAttributes_t &f)