XamlFontExtension.h

00001 //
00002 //  Copyright (c) 2006 by Autodesk, Inc.
00003 //
00004 //  By using this code, you are agreeing to the terms and conditions of
00005 //  the License Agreement included in the documentation for this code.
00006 //
00007 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
00008 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00009 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00010 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00011 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00012 //
00013 //  Use, duplication, or disclosure by the U.S. Government is subject to
00014 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00015 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00016 //  Data and Computer Software), as applicable.
00017 //
00018 
00019 #if !defined XAML_FONT_EXTENSION_HEADER
00020 #define XAML_FONT_EXTENSION_HEADER
00021 
00022 #include "XAML/XamlCore.h"
00023 
00024 #include "whiptk/font.h"
00025 #include "XAML/XamlXML.h"
00026 
00027 
00032 
00033 
00039 class XAMLTK_API WT_XAML_Font_Extension
00040     : public WT_Font_Extension
00041     , public XamlDrawableAttributes::FontUri::Provider
00042     , public XamlDrawableAttributes::GlyphsAttributeProvider
00043 {
00044         friend class WT_XAML_Class_Factory;
00045         friend class WT_XAML_Rendition;
00046 
00047     WT_XAML_File* _pSerializeFile;
00048 protected:
00050 
00051     WT_XAML_Font_Extension()
00052         : WT_Font_Extension( ) 
00053         , _pSerializeFile( NULL )
00054         {}
00055 
00057     WT_XAML_Font_Extension(
00058         WT_String logfont_name, 
00059         WT_String cannonical_name 
00060         )
00061         : WT_Font_Extension( logfont_name, cannonical_name )
00062         , _pSerializeFile( NULL )
00063     {}
00064 
00065         virtual ~WT_XAML_Font_Extension()
00066         {}
00068 public:
00069 
00071     WT_XAML_Font_Extension const & operator=  (WT_XAML_Font_Extension const & font)
00072         {
00073                 WT_Font_Extension::operator = (font);
00074                 return *this;
00075         }
00076 
00078     WT_Result        serialize (WT_File & /*file*/) const;
00080         WT_Result                parseAttributeList(XamlXML::tAttributeMap& rMap, WT_XAML_File& rFile);
00081 
00082 protected:
00083 
00084     virtual WT_Result provideFontUri( XamlDrawableAttributes::FontUri*&  pUri);
00085     virtual WT_Result provideGlyphsAttributes( XamlDrawableAttributes::GlyphsAttributeConsumer* p, WT_XAML_File& r) const;
00086 };
00088 
00089 #endif //XAML_FONT_EXTENSION_HEADER

Generated on Tue Jan 6 22:40:06 2009 for Autodesk DWF Toolkit by  doxygen 1.4.5