#include <cdrfiltr.h>
Inheritance diagram for CDRFontnameStoredItem:
Public Attributes | |
DWORD | Reference |
WORD | hTypeface |
Private Member Functions | |
CC_DECLARE_MEMDUMP (CDRFontnameStoredItem) | |
BOOL | GetTypefaceForUse (DWORD Reference, TCHAR *FontName) |
Sets the Reference and hTypeface variables of the entry. It enumerates the font name to get the right class and capitalisation of the name, then caches it with the fontmanager. It then gets a typeface handle for it, which is stored for future retreval. | |
Friends | |
class | CDRAttributeStore |
class | CDRFontnameStore |
Definition at line 216 of file cdrfiltr.h.
|
|
|
Sets the Reference and hTypeface variables of the entry. It enumerates the font name to get the right class and capitalisation of the name, then caches it with the fontmanager. It then gets a typeface handle for it, which is stored for future retreval.
Definition at line 2017 of file cdrtext.cpp. 02018 { 02019 Reference = tReference; 02020 02021 // OK, so we need to enumerate all those lovely little font tickles, and 02022 // would like to know the real font name and the lovelyness known as the 02023 // font class thingy. Splendid! 02024 02025 // first of all, catch your font. 02026 CDRFontnameStoredItemEnumer EnumThing; 02027 EnumThing.TheFontName = FontName; 02028 EnumThing.Execute(); 02029 02030 // did we actually get one? 02031 if(EnumThing.Found == FALSE) 02032 { 02033 // make up a default typeface handle... 02034 hTypeface = FONTMANAGER->GetFont()->GetFontHandle(); 02035 02036 return TRUE; 02037 } 02038 02039 // righteho, we now have a nice font name... so let's cache the thingy and get 02040 // ourselves a nice handle. 02041 hTypeface = FONTMANAGER->CacheNamedFont(&EnumThing.TheRealFontName); 02042 TRACEUSER( "Ben", _T("Reference = %d, Real font name is '%s', handle is %d\n"), tReference, (TCHAR *)EnumThing.TheRealFontName, hTypeface); 02043 02044 // check to see nothing's gone terriably wrong 02045 if(!HNDLVALID(hTypeface)) 02046 return FALSE; 02047 02048 return TRUE; 02049 }
|
|
Reimplemented from CDRAttributeStoredItem. Definition at line 218 of file cdrfiltr.h. |
|
Reimplemented from CDRAttributeStoredItem. Definition at line 219 of file cdrfiltr.h. |
|
Definition at line 227 of file cdrfiltr.h. |
|
Definition at line 226 of file cdrfiltr.h. |