Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages | Examples

font_extension.h

00001 //  Copyright (c) 1996-2001 by Autodesk, Inc.
00002 //
00003 //  By using this code, you are agreeing to the terms and conditions of
00004 //  the License Agreement included in the documentation for this code.
00005 //
00006 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
00007 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00008 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00009 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00010 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00011 //
00012 //  Use, duplication, or disclosure by the U.S. Government is subject to
00013 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00014 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00015 //  Data and Computer Software), as applicable.
00016 //
00017 
00018 #if !defined FONT_EXTENSION_HEADER
00019 #define FONT_EXTENSION_HEADER
00020 
00021 #include "whiptk/whipcore.h"
00022 #include "whiptk/attribute.h"
00023 
00024 class WT_File;
00025 
00026 
00031 
00032 
00036 class WHIPTK_API WT_Font_Extension : public WT_Attribute
00037 {
00038 private:
00039     WT_String   m_logfont_name;
00040     WT_String   m_cannonical_name;
00041 
00042     enum WT_Materialize_Stage
00043     {
00044         Eating_Initial_Whitespace,
00045         Gathering_LogFont_Name,
00046         Eating_Middle_Whitespace,
00047         Gathering_Cannonical_Name,
00048         Eating_End_Whitespace
00049     }   m_stage;
00050 
00051 public:
00052 
00054 
00055     WT_Font_Extension()
00056     {  m_stage = Eating_Initial_Whitespace; }
00057 
00059     WT_Font_Extension(
00060         WT_String logfont_name, 
00061         WT_String cannonical_name 
00062         )
00063     {
00064         m_logfont_name = logfont_name;
00065         m_cannonical_name = cannonical_name;
00066         m_stage = Eating_Initial_Whitespace;
00067     }
00069 
00071 
00072     WT_String cannonical_name() {    return m_cannonical_name;    }
00074     WT_String logfont_name() {    return m_logfont_name;    }
00076     void set_cannonical_name(WT_String cannonical_name) {    m_cannonical_name = cannonical_name;    }
00078     void set_logfont_name(WT_String logfont_name) {    m_logfont_name = logfont_name;    }
00080 
00082     WT_ID            object_id() const;
00083     WT_Result        materialize(WT_Opcode const & opcode, WT_File & file);
00084     WT_Result        process(WT_File & file);
00085     WT_Result        skip_operand(WT_Opcode const & opcode, WT_File & file);
00086     WT_Result        serialize (WT_File & file) const;
00087     WT_Result        sync (WT_File & file) const;
00088     WT_Boolean       operator== (WT_Attribute const & attrib) const;
00090 
00092 
00094     static WT_Result default_process(
00095         WT_Font_Extension & item, 
00096         WT_File & file 
00097         );
00098 };
00100 
00101 #endif // FONT_EXTENSION_HEADER

Generated on Tue May 17 12:07:44 2005 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.1