CDRFontnameStoredItem Class Reference

A list item object for fontnames from a CDR file import. More...

#include <cdrfiltr.h>

Inheritance diagram for CDRFontnameStoredItem:

CDRAttributeStoredItem ListItem CCObject SimpleCCObject List of all members.

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

Detailed Description

A list item object for fontnames from a CDR file import.

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
22 03 95

Definition at line 216 of file cdrfiltr.h.


Member Function Documentation

CDRFontnameStoredItem::CC_DECLARE_MEMDUMP CDRFontnameStoredItem   )  [private]
 

BOOL CDRFontnameStoredItem::GetTypefaceForUse DWORD  tReference,
TCHAR FontName
[private]
 

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.

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
03 01 96
Parameters:
CDR file font reference, pointer to font name [INPUTS]
Returns:
error flag
See also:
CDRFilter

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 }


Friends And Related Function Documentation

friend class CDRAttributeStore [friend]
 

Reimplemented from CDRAttributeStoredItem.

Definition at line 218 of file cdrfiltr.h.

friend class CDRFontnameStore [friend]
 

Reimplemented from CDRAttributeStoredItem.

Definition at line 219 of file cdrfiltr.h.


Member Data Documentation

WORD CDRFontnameStoredItem::hTypeface
 

Definition at line 227 of file cdrfiltr.h.

DWORD CDRFontnameStoredItem::Reference
 

Definition at line 226 of file cdrfiltr.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:52:19 2007 for Camelot by  doxygen 1.4.4