ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
TGLFontManager Class Reference

A FreeType GL font manager.

Each GL rendering context has an instance of FTGLManager. This enables FTGL fonts to be shared same way as textures and display lists.

Definition at line 119 of file TGLFontManager.h.

Public Types

typedef std::vector< Int_tFontSizeVec_t
 

Public Member Functions

 TGLFontManager ()
 
virtual ~TGLFontManager ()
 Destructor. More...
 
void RegisterFont (Int_t size, Int_t file, TGLFont::EMode mode, TGLFont &out)
 Provide font with given size, file and FTGL class. More...
 
void RegisterFont (Int_t size, const char *name, TGLFont::EMode mode, TGLFont &out)
 Get mapping from ttf id to font names. Table taken from TTF.cxx. More...
 
void ReleaseFont (TGLFont &font)
 Release font with given attributes. More...
 
void ClearFontTrash ()
 Delete FTFFont objects registered for destruction. More...
 
 ClassDef (TGLFontManager, 0)
 

Static Public Member Functions

static TObjArrayGetFontFileArray ()
 Get id to file name map. More...
 
static FontSizeVec_tGetFontSizeArray ()
 Get valid font size vector. More...
 
static Int_t GetExtendedFontStartIndex ()
 
static Int_t GetFontSize (Int_t ds)
 Get availabe font size. More...
 
static Int_t GetFontSize (Int_t ds, Int_t min, Int_t max)
 Get availabe font size. More...
 
static const char * GetFontNameFromId (Int_t)
 Get font name from TAttAxis font id. More...
 

Protected Types

typedef std::map< TGLFont, Int_tFontMap_t
 
typedef std::map< TGLFont,
Int_t >::iterator 
FontMap_i
 
typedef std::list< const
TGLFont * > 
FontList_t
 
typedef std::list< const
TGLFont * >::iterator 
FontList_i
 
typedef std::list< const
TGLFont * >::const_iterator 
FontList_ci
 

Static Protected Member Functions

static void InitStatics ()
 Create a list of available font files and allowed font sizes. More...
 

Protected Attributes

FontMap_t fFontMap
 
FontList_t fFontTrash
 

Static Protected Attributes

static TObjArray fgFontFileArray
 
static Int_t fgExtendedFontStart
 
static FontSizeVec_t fgFontSizeArray
 
static Bool_t fgStaticInitDone = kFALSE
 

Private Member Functions

 TGLFontManager (const TGLFontManager &)
 
TGLFontManageroperator= (const TGLFontManager &)
 

#include <TGLFontManager.h>

Member Typedef Documentation

typedef std::list<const TGLFont*>::const_iterator TGLFontManager::FontList_ci
protected

Definition at line 134 of file TGLFontManager.h.

typedef std::list<const TGLFont*>::iterator TGLFontManager::FontList_i
protected

Definition at line 133 of file TGLFontManager.h.

typedef std::list<const TGLFont*> TGLFontManager::FontList_t
protected

Definition at line 132 of file TGLFontManager.h.

typedef std::map<TGLFont, Int_t>::iterator TGLFontManager::FontMap_i
protected

Definition at line 130 of file TGLFontManager.h.

typedef std::map<TGLFont, Int_t> TGLFontManager::FontMap_t
protected

Definition at line 129 of file TGLFontManager.h.

typedef std::vector<Int_t> TGLFontManager::FontSizeVec_t

Definition at line 122 of file TGLFontManager.h.

Constructor & Destructor Documentation

TGLFontManager::TGLFontManager ( const TGLFontManager )
private
TGLFontManager::TGLFontManager ( )
inline

Definition at line 148 of file TGLFontManager.h.

TGLFontManager::~TGLFontManager ( )
virtual

Destructor.

Definition at line 429 of file TGLFontManager.cxx.

Member Function Documentation

TGLFontManager::ClassDef ( TGLFontManager  ,
 
)
void TGLFontManager::ClearFontTrash ( )

Delete FTFFont objects registered for destruction.

Definition at line 703 of file TGLFontManager.cxx.

Referenced by TGLContextIdentity::DeleteGLResources().

Int_t TGLFontManager::GetExtendedFontStartIndex ( )
static

Definition at line 573 of file TGLFontManager.cxx.

Referenced by TGLPadPainter::DrawTextHelper().

TObjArray * TGLFontManager::GetFontFileArray ( )
static

Get id to file name map.

Definition at line 556 of file TGLFontManager.cxx.

Referenced by TGLPadPainter::DrawTextHelper(), RegisterFont(), TEveText::SetFontFile(), and TEveTextEditor::TEveTextEditor().

const char * TGLFontManager::GetFontNameFromId ( Int_t  id)
static

Get font name from TAttAxis font id.

Definition at line 609 of file TGLFontManager.cxx.

Referenced by TEveProjectionAxesGL::DirectDraw(), TGLPadPainter::DrawTextHelper(), and TGLAxisPainter::PaintAxis().

Int_t TGLFontManager::GetFontSize ( Int_t  ds)
static

Get availabe font size.

Definition at line 585 of file TGLFontManager.cxx.

Referenced by GetFontSize(), RegisterFont(), and TGLAnnotation::Render().

Int_t TGLFontManager::GetFontSize ( Int_t  ds,
Int_t  min,
Int_t  max 
)
static

Get availabe font size.

Definition at line 599 of file TGLFontManager.cxx.

TGLFontManager::FontSizeVec_t * TGLFontManager::GetFontSizeArray ( )
static

Get valid font size vector.

Definition at line 565 of file TGLFontManager.cxx.

Referenced by TEveText::SetFontSize(), and TEveTextEditor::TEveTextEditor().

void TGLFontManager::InitStatics ( )
staticprotected

Create a list of available font files and allowed font sizes.

Definition at line 627 of file TGLFontManager.cxx.

Referenced by GetExtendedFontStartIndex(), GetFontFileArray(), GetFontNameFromId(), GetFontSize(), GetFontSizeArray(), and RegisterFont().

TGLFontManager& TGLFontManager::operator= ( const TGLFontManager )
private
void TGLFontManager::RegisterFont ( Int_t  size,
Int_t  file,
TGLFont::EMode  mode,
TGLFont out 
)

Provide font with given size, file and FTGL class.

Definition at line 442 of file TGLFontManager.cxx.

Referenced by TGLPadPainter::DrawTextHelper(), RegisterFont(), and TGLRnrCtx::RegisterFontNoScale().

void TGLFontManager::RegisterFont ( Int_t  size,
const char *  name,
TGLFont::EMode  mode,
TGLFont out 
)

Get mapping from ttf id to font names. Table taken from TTF.cxx.

Definition at line 514 of file TGLFontManager.cxx.

void TGLFontManager::ReleaseFont ( TGLFont font)

Release font with given attributes.

Returns false if font has not been found in the managers font set.

Definition at line 537 of file TGLFontManager.cxx.

Referenced by TGLRnrCtx::ReleaseFont(), and TGLFont::~TGLFont().

Member Data Documentation

FontMap_t TGLFontManager::fFontMap
protected

Definition at line 136 of file TGLFontManager.h.

Referenced by ClearFontTrash(), RegisterFont(), ReleaseFont(), and ~TGLFontManager().

FontList_t TGLFontManager::fFontTrash
protected

Definition at line 137 of file TGLFontManager.h.

Referenced by ClearFontTrash(), RegisterFont(), and ReleaseFont().

Int_t TGLFontManager::fgExtendedFontStart
staticprotected

Definition at line 141 of file TGLFontManager.h.

Referenced by GetExtendedFontStartIndex(), InitStatics(), and RegisterFont().

TObjArray TGLFontManager::fgFontFileArray
staticprotected

Definition at line 139 of file TGLFontManager.h.

Referenced by GetFontFileArray(), GetFontNameFromId(), InitStatics(), and RegisterFont().

TGLFontManager::FontSizeVec_t TGLFontManager::fgFontSizeArray
staticprotected

Definition at line 143 of file TGLFontManager.h.

Referenced by GetFontSize(), GetFontSizeArray(), and InitStatics().

Bool_t TGLFontManager::fgStaticInitDone = kFALSE
staticprotected
Collaboration diagram for TGLFontManager:
[legend]

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