ROOT  6.06/09
Reference Guide
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ROOT::MacOSX::Details::FontCache Class Reference

Definition at line 41 of file FontCache.h.

Classes

struct  FontList
 

Public Types

enum  Details { nPadFonts = 15 }
 

Public Member Functions

 FontCache ()
 
FontStruct_t LoadFont (const X11::XLFDName &xlfd)
 
void UnloadFont (FontStruct_t font)
 
char ** ListFonts (const X11::XLFDName &xlfd, int maxNames, int &count)
 
void FreeFontNames (char **fontList)
 
unsigned GetTextWidth (FontStruct_t font, const char *text, int nChars)
 
void GetFontProperties (FontStruct_t font, int &maxAscent, int &maxDescent)
 
CTFontRef SelectFont (Font_t fontIndex, Float_t fontSize)
 
void GetTextBounds (UInt_t &w, UInt_t &h, const char *text) const
 
void GetTextBounds (UInt_t &w, UInt_t &h, const std::vector< UniChar > &unichars) const
 
double GetAscent () const
 
double GetAscent (const char *text) const
 
double GetAscent (const std::vector< UniChar > &unichars) const
 
double GetDescent () const
 
double GetDescent (const char *text) const
 
double GetDescent (const std::vector< UniChar > &unichars) const
 
double GetLeading () const
 

Private Types

typedef Util::CFStrongReference< CTFontRef > CTFontGuard_t
 
typedef std::map< CTFontRef, CTFontGuard_t >::iterator font_iterator
 
typedef std::map< CTFontRef, CTFontGuard_t >::const_iterator const_font_iterator
 
typedef std::map< UInt_t, CTFontGuard_tFontMap_t
 
typedef FontMap_t::iterator font_map_iterator
 
typedef FontMap_t::const_iterator const_font_map_iterator
 
typedef std::map< std::string, std::string > PSNameMap_t
 

Private Member Functions

CTFontRef SelectSymbolFont (Float_t fontSize, unsigned fontIndex)
 
 FontCache (const FontCache &rhs)
 
FontCacheoperator= (const FontCache &rhs)
 

Private Attributes

std::map< CTFontRef, CTFontGuard_tfLoadedFonts
 
FontMap_t fFonts [nPadFonts]
 
CTFontRef fSelectedFont
 
std::list< FontListfFontLists
 
FontList fDummyList
 
PSNameMap_t fXLFDtoPostscriptNames
 
bool fSymbolFontRegistered
 

#include <FontCache.h>

+ Collaboration diagram for ROOT::MacOSX::Details::FontCache:

Member Typedef Documentation

typedef std::map<CTFontRef, CTFontGuard_t>::const_iterator ROOT::MacOSX::Details::FontCache::const_font_iterator
private

Definition at line 85 of file FontCache.h.

typedef FontMap_t::const_iterator ROOT::MacOSX::Details::FontCache::const_font_map_iterator
private

Definition at line 90 of file FontCache.h.

Definition at line 80 of file FontCache.h.

typedef std::map<CTFontRef, CTFontGuard_t>::iterator ROOT::MacOSX::Details::FontCache::font_iterator
private

Definition at line 84 of file FontCache.h.

typedef FontMap_t::iterator ROOT::MacOSX::Details::FontCache::font_map_iterator
private

Definition at line 89 of file FontCache.h.

Definition at line 88 of file FontCache.h.

typedef std::map<std::string, std::string> ROOT::MacOSX::Details::FontCache::PSNameMap_t
private

Definition at line 112 of file FontCache.h.

Member Enumeration Documentation

Enumerator
nPadFonts 

Definition at line 43 of file FontCache.h.

Constructor & Destructor Documentation

ROOT::MacOSX::Details::FontCache::FontCache ( )

Definition at line 233 of file FontCache.mm.

ROOT::MacOSX::Details::FontCache::FontCache ( const FontCache rhs)
private

Member Function Documentation

void ROOT::MacOSX::Details::FontCache::FreeFontNames ( char **  fontList)

Definition at line 401 of file FontCache.mm.

double ROOT::MacOSX::Details::FontCache::GetAscent ( ) const

Definition at line 600 of file FontCache.mm.

double ROOT::MacOSX::Details::FontCache::GetAscent ( const char *  text) const

Definition at line 607 of file FontCache.mm.

double ROOT::MacOSX::Details::FontCache::GetAscent ( const std::vector< UniChar > &  unichars) const

Definition at line 623 of file FontCache.mm.

double ROOT::MacOSX::Details::FontCache::GetDescent ( ) const

Definition at line 638 of file FontCache.mm.

double ROOT::MacOSX::Details::FontCache::GetDescent ( const char *  text) const

Definition at line 645 of file FontCache.mm.

double ROOT::MacOSX::Details::FontCache::GetDescent ( const std::vector< UniChar > &  unichars) const

Definition at line 661 of file FontCache.mm.

void ROOT::MacOSX::Details::FontCache::GetFontProperties ( FontStruct_t  font,
int &  maxAscent,
int &  maxDescent 
)

Definition at line 447 of file FontCache.mm.

double ROOT::MacOSX::Details::FontCache::GetLeading ( ) const

Definition at line 676 of file FontCache.mm.

void ROOT::MacOSX::Details::FontCache::GetTextBounds ( UInt_t w,
UInt_t h,
const char *  text 
) const

Definition at line 572 of file FontCache.mm.

void ROOT::MacOSX::Details::FontCache::GetTextBounds ( UInt_t w,
UInt_t h,
const std::vector< UniChar > &  unichars 
) const

Definition at line 586 of file FontCache.mm.

unsigned ROOT::MacOSX::Details::FontCache::GetTextWidth ( FontStruct_t  font,
const char *  text,
int  nChars 
)

Definition at line 417 of file FontCache.mm.

char ** ROOT::MacOSX::Details::FontCache::ListFonts ( const X11::XLFDName xlfd,
int  maxNames,
int &  count 
)

Definition at line 298 of file FontCache.mm.

FontStruct_t ROOT::MacOSX::Details::FontCache::LoadFont ( const X11::XLFDName xlfd)

Definition at line 243 of file FontCache.mm.

FontCache& ROOT::MacOSX::Details::FontCache::operator= ( const FontCache rhs)
private
CTFontRef ROOT::MacOSX::Details::FontCache::SelectFont ( Font_t  fontIndex,
Float_t  fontSize 
)

Definition at line 463 of file FontCache.mm.

CTFontRef ROOT::MacOSX::Details::FontCache::SelectSymbolFont ( Float_t  fontSize,
unsigned  fontIndex 
)
private

Definition at line 499 of file FontCache.mm.

Referenced by SelectFont().

void ROOT::MacOSX::Details::FontCache::UnloadFont ( FontStruct_t  font)

Definition at line 287 of file FontCache.mm.

Member Data Documentation

FontList ROOT::MacOSX::Details::FontCache::fDummyList
private

Definition at line 110 of file FontCache.h.

Referenced by ListFonts().

std::list<FontList> ROOT::MacOSX::Details::FontCache::fFontLists
private

Definition at line 109 of file FontCache.h.

Referenced by FreeFontNames(), and ListFonts().

FontMap_t ROOT::MacOSX::Details::FontCache::fFonts[nPadFonts]
private

Definition at line 92 of file FontCache.h.

Referenced by SelectFont(), and SelectSymbolFont().

std::map<CTFontRef, CTFontGuard_t> ROOT::MacOSX::Details::FontCache::fLoadedFonts
private

Definition at line 83 of file FontCache.h.

Referenced by GetFontProperties(), GetTextWidth(), LoadFont(), and UnloadFont().

CTFontRef ROOT::MacOSX::Details::FontCache::fSelectedFont
private
bool ROOT::MacOSX::Details::FontCache::fSymbolFontRegistered
private

Definition at line 118 of file FontCache.h.

Referenced by SelectSymbolFont().

PSNameMap_t ROOT::MacOSX::Details::FontCache::fXLFDtoPostscriptNames
private

Definition at line 113 of file FontCache.h.

Referenced by FontCache(), ListFonts(), and LoadFont().


The documentation for this class was generated from the following files: