FontResource.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 1996-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 
00020 #ifndef _DWFTK_FONT_RESOURCE_H
00021 #define _DWFTK_FONT_RESOURCE_H
00022 
00027 
00028 
00029 #include "dwf/Toolkit.h"
00030 #include "dwf/package/Resource.h"
00031 
00032 namespace DWFToolkit
00033 {
00034 
00046 class DWFFontResource : public DWFResource
00047                         _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00048 {
00049 
00050 public:
00051 
00055     typedef enum
00056     {
00057         ePreviewPrint = 1,
00058         eEditable     = 2,
00059         eInstallable  = 3,
00060         eNoEmbedding  = 4
00061 
00062     } tePrivilege;
00063 
00067     typedef enum
00068     {
00069         eUnicode    = 1,
00070         eSymbol     = 2,
00071         eGlyphIndex = 3
00072     } teCharacterCode;
00073 
00074 public:
00075 
00088     _DWFTK_API
00089     DWFFontResource( DWFPackageReader*  pPackageReader )
00090         throw();
00091 
00108     _DWFTK_API
00109     DWFFontResource( int                nRequest,
00110                      tePrivilege        ePrivilege,
00111                      teCharacterCode    eCharacterCode,
00112                      const DWFString&   zCanonicalName,
00113                      const DWFString&   zLogfontName)
00114 throw();
00115 
00121     _DWFTK_API
00122     virtual ~DWFFontResource()
00123         throw();
00124 
00131     _DWFTK_API
00132     int request() const
00133         throw()
00134     {
00135         return _nRequest;
00136     }
00137 
00144     _DWFTK_API
00145     tePrivilege privilege() const
00146         throw()
00147     {
00148         return _ePrivilege;
00149     }
00150 
00157     _DWFTK_API
00158     teCharacterCode characterCode() const
00159         throw()
00160     {
00161         return _eCharacterCode;
00162     }
00163 
00170     _DWFTK_API
00171     const DWFString& logfontName() const
00172         throw()
00173     {
00174         return _zLogfontName;
00175     }
00176 
00183     _DWFTK_API
00184     const DWFString& canonicalName() const
00185         throw()
00186     {
00187         return _zCanonicalName;
00188     }
00189 
00193     _DWFTK_API
00194     virtual void parseAttributeList( const char** ppAttributeList )
00195         throw( DWFException );
00196 
00197 #ifndef DWFTK_READ_ONLY
00198 
00202     _DWFTK_API
00203     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00204         throw( DWFException );
00205 
00206 #endif
00207 
00208 
00209 private:
00210         
00211     int             _nRequest;
00212     tePrivilege     _ePrivilege;
00213     teCharacterCode _eCharacterCode;
00214     DWFString       _zLogfontName;
00215     DWFString       _zCanonicalName;
00216 
00217 private:
00218 
00219     DWFFontResource( const DWFFontResource& );
00220     DWFFontResource& operator=( const DWFFontResource& );
00221 };
00222 
00223 
00224 }
00225 
00226 #endif

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