#include <fontman.h>
Inheritance diagram for CachedFontItem:
Public Member Functions | |
CachedFontItem () | |
Default constructor. | |
~CachedFontItem () | |
String_64 * | GetFontName () |
Get this items name. | |
WORD | GetFontHandle () |
FontClass | GetFontClass () |
Get this items class. | |
BOOL | Compare (String_64 *pFontName) |
See if this font has the same name as that passed as a param. | |
ENUMLOGFONT * | GetEnumLogFont () |
Returns the ENUMLOGFONT structure for this cached font. | |
OUTLINETEXTMETRIC * | GetOutlineTextMetric () |
Returns the OUTLINETEXTMETRIC structure for this cached font. | |
void | SetIsCorrupt (BOOL flag) |
void | SetIsReplaced (BOOL flag) |
BOOL | IsFullyCached () |
See if this item has all its cached structures resident. | |
BOOL | IsCorrupt () |
BOOL | IsValid () |
BOOL | IsReplaced () |
Private Member Functions | |
BOOL | SetCacheData (ENUMLOGFONT *lpelf) |
void | DeleteMetrics () |
Delete this items LOGFONT cached structure. | |
void | DeleteFontClass () |
void | Delete () |
void | Dump () |
Dump the contents of this cache entry out. | |
Private Attributes | |
FontBase * | pFontClass |
WORD | Handle |
ENUMLOGFONT * | pEnumLogFont |
OUTLINETEXTMETRIC * | pOutlineTextMetric |
BOOL | FlagIsCorrupt |
BOOL | FlagIsReplaced |
Friends | |
class | FontManager |
class | FontComponent |
Definition at line 131 of file fontman.h.
|
Default constructor.
Definition at line 170 of file fontman.cpp. 00171 { 00172 pFontClass = NULL; 00173 Handle = ILLEGALFHANDLE; 00174 pEnumLogFont = NULL; 00175 pOutlineTextMetric = NULL; 00176 FlagIsCorrupt = FALSE; 00177 FlagIsReplaced = FALSE; 00178 }
|
|
Definition at line 180 of file fontman.cpp. 00181 { 00182 Delete(); 00183 }
|
|
See if this font has the same name as that passed as a param.
Definition at line 360 of file fontman.cpp. 00361 { 00362 if( pFontClass == NULL ) 00363 { 00364 TRACE( _T("A CachedFontItem structure exists without a FontClass!!!") ); 00365 return FALSE; 00366 } 00367 00368 return pFontClass->Compare( pFontName ); 00369 }
|
|
Definition at line 317 of file fontman.cpp. 00318 { 00319 DeleteMetrics(); 00320 DeleteFontClass(); 00321 }
|
|
Definition at line 308 of file fontman.cpp. 00309 { 00310 if (pFontClass!=NULL) 00311 { 00312 delete pFontClass; 00313 pFontClass=NULL; 00314 } 00315 }
|
|
Delete this items LOGFONT cached structure.
Definition at line 288 of file fontman.cpp. 00289 { 00290 if( NULL == pFontClass ) 00291 { 00292 TRACE( _T("structure exists without a FontClass!!!") ); 00293 } 00294 00295 if (pEnumLogFont!=NULL) 00296 { 00297 delete pEnumLogFont; 00298 pEnumLogFont = NULL; 00299 } 00300 00301 if (pOutlineTextMetric!=NULL) 00302 { 00303 delete pOutlineTextMetric; 00304 pOutlineTextMetric = NULL; 00305 } 00306 }
|
|
Dump the contents of this cache entry out.
Definition at line 383 of file fontman.cpp. 00384 { 00385 #ifdef _DEBUG 00386 ERROR3IF(pFontClass==NULL, "A CachedFontItem structure exists without a FontClass!!!"); 00387 TRACE( _T("Font item:\n Handle = %d\n"),Handle); 00388 if (IsFullyCached()) 00389 { 00390 TRACE( _T(" Fully cached\n")); 00391 OILFontMan::DumpEnumLogFont(pEnumLogFont); 00392 } 00393 else 00394 { 00395 TRACE( _T(" Not fully cached\n")); 00396 } 00397 pFontClass->Dump(); 00398 #endif 00399 }
|
|
Returns the ENUMLOGFONT structure for this cached font.
Definition at line 201 of file fontman.cpp. 00202 { 00203 ERROR2IF(pFontClass==NULL, NULL, "structure exists without a FontClass!!!"); 00204 00205 if (pEnumLogFont!=NULL) 00206 return pEnumLogFont; 00207 00208 return NULL; 00209 }
|
|
Get this items class.
Definition at line 270 of file fontman.cpp. 00271 { 00272 ERROR3IF(pFontClass==NULL, "structure exists without a FontClass!!!"); 00273 return pFontClass->GetFontClass(); 00274 }
|
|
Definition at line 143 of file fontman.h. 00143 { return Handle; }
|
|
Get this items name.
Definition at line 252 of file fontman.cpp. 00253 { 00254 ERROR2IF(pFontClass==NULL, NULL, "structure exists without a FontClass!!!"); 00255 return pFontClass->GetFontName(); 00256 }
|
|
Returns the OUTLINETEXTMETRIC structure for this cached font.
Definition at line 224 of file fontman.cpp. 00225 { 00226 ERROR2IF(pFontClass==NULL, NULL, "this.pFontClass==NULL."); 00227 ERROR2IF(pEnumLogFont==NULL, NULL, "this.pEnumLogFont==NULL."); 00228 00229 if (pOutlineTextMetric==NULL) 00230 { 00231 // ask the font class for this structure, and cache it 00232 FontClass Class = GetFontClass(); 00233 pOutlineTextMetric=OILFontMan::GetOutlineTextMetric(Class, &(pEnumLogFont->elfLogFont)); 00234 } 00235 00236 // return the result. 00237 return pOutlineTextMetric; 00238 }
|
|
Definition at line 153 of file fontman.h. 00153 { return FlagIsCorrupt; }
|
|
See if this item has all its cached structures resident.
Definition at line 335 of file fontman.cpp. 00336 { 00337 PORTNOTE("text","CachedFontItem::IsFullyCached - do nothing"); 00338 #ifndef DISABLE_TEXT_RENDERING 00339 // TRACEUSER("wuerthne", _T("CachedFontItem::IsFullyCached called") ); 00340 ERROR2IF(pFontClass==NULL, FALSE, "A CachedFontItem structure exists without a FontClass!!!"); 00341 return (pEnumLogFont!=NULL); 00342 #else 00343 return TRUE; 00344 #endif 00345 }
|
|
Definition at line 155 of file fontman.h. 00155 { return FlagIsReplaced; };
|
|
Definition at line 154 of file fontman.h. 00154 { return IsFullyCached(); };
|
|
|
|
Definition at line 149 of file fontman.h. 00149 { FlagIsCorrupt = flag; };
|
|
Definition at line 150 of file fontman.h. 00150 { FlagIsReplaced = flag; };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|