#ifndef ROOT_TGFont
#define ROOT_TGFont
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TGObject
#include "TGObject.h"
#endif
#ifndef ROOT_TRefCnt
#include "TRefCnt.h"
#endif
class THashTable;
struct FontMetrics_t {
Int_t fAscent;
Int_t fDescent;
Int_t fLinespace;
Int_t fMaxWidth;
Bool_t fFixed;
};
class TGFont : public TNamed, public TRefCnt {
friend class TGFontPool;
private:
FontStruct_t fFontStruct;
FontH_t fFontH;
FontMetrics_t fFM;
protected:
TGFont(const char *name)
: TNamed(name,""), TRefCnt(), fFontStruct(0), fFontH(0), fFM()
{
SetRefCount(1);
}
TGFont(const TGFont &font);
void operator=(const TGFont &rhs);
public:
virtual ~TGFont();
FontH_t GetFontHandle() const { return fFontH; }
FontStruct_t GetFontStruct() const { return fFontStruct; }
FontStruct_t operator()() const;
void GetFontMetrics(FontMetrics_t *m) const;
void Print(Option_t *option="") const;
virtual void SavePrimitive(ostream &out, Option_t * = "");
ClassDef(TGFont,0)
};
class TGFontPool : public TGObject {
private:
THashTable *fList;
protected:
TGFontPool(const TGFontPool& fp)
: TGObject(fp), fList(fp.fList) { }
TGFontPool& operator=(const TGFontPool& fp)
{if(this!=&fp) {TGObject::operator=(fp); fList=fp.fList;}
return *this;}
public:
TGFontPool(TGClient *client);
virtual ~TGFontPool();
TGFont *GetFont(const char *font, Bool_t fixedDefault = kTRUE);
TGFont *GetFont(const TGFont *font);
TGFont *GetFont(FontStruct_t font);
void FreeFont(const TGFont *font);
TGFont *FindFont(FontStruct_t font) const;
TGFont *FindFontByHandle(FontH_t font) const;
void Print(Option_t *option="") const;
ClassDef(TGFontPool,0)
};
#endif
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.