trusted_font_list.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 #if !defined TRUSTED_FONT_LIST_HEADER
00020 #define TRUSTED_FONT_LIST_HEADER
00021 
00025 
00026 #include "whiptk/whipcore.h"
00027 #include "whiptk/attribute.h"
00028 
00029 class WT_Trusted_Font_Item;
00030 
00036 
00037 
00043 class WHIPTK_API WT_Trusted_Font_List : public WT_Object, public WT_Item_List
00044 {
00045 public:
00047     WT_Trusted_Font_List()
00048     { }
00049 
00051     virtual ~WT_Trusted_Font_List();
00052 
00054     void add (WT_Trusted_Font_Item &item);
00056     WT_Integer32 index_from_trusted_font_item(WT_Trusted_Font_Item & item_in);
00058     WT_Trusted_Font_Item * trusted_font_item_from_index(WT_Integer32 index);
00059 
00060     //WT_Object virtual methods
00061     WT_Result    materialize(WT_Opcode const & opcode, WT_File & file);
00062     WT_ID        object_id() const;
00063     WT_Type      object_type() const;
00064     WT_Result    process(WT_File & file);
00065     WT_Result    serialize (WT_File & file) const;
00066     WT_Result    skip_operand(WT_Opcode const & opcode, WT_File & file);
00067 
00069     WT_Trusted_Font_List const & operator=(WT_Trusted_Font_List const & trusted_font);
00071     WT_Boolean operator== (WT_Trusted_Font_List const & list) const;
00072 
00074 
00076     static WT_Result default_process(
00077         WT_Trusted_Font_List & item, 
00078         WT_File & file 
00079         );
00080 
00081 
00082 };
00083 
00085 class WHIPTK_API WT_Trusted_Font_Item : public WT_Item
00086 {
00087 private:
00088     WT_String m_font_name;
00089     WT_Integer32 m_index;
00090     void _deleteObject(void *object)
00091     {
00092         delete (WT_Trusted_Font_Item*)object;
00093     }
00094 
00095 
00096 public:
00097 
00099 
00100     WT_Trusted_Font_Item()
00101         : m_index(0)
00102     {}
00103 
00105     WT_Trusted_Font_Item(
00106         WT_Integer32 index, 
00107         WT_Unsigned_Integer16 const *font_name 
00108         )
00109     { set(index, font_name); }
00110 
00112     WT_Trusted_Font_Item(
00113         WT_Integer32 index, 
00114         char const *font_name 
00115         )
00116     { set(index, font_name); }
00117 
00119     WT_Trusted_Font_Item(
00120         WT_Integer32 index, 
00121         WT_String & font_name_in 
00122         );
00123 
00125     WT_Trusted_Font_Item(
00126         WT_Unsigned_Integer16 const *font_name 
00127         )
00128     { set(WD_URL_Optimize, font_name); }
00129 
00131     WT_Trusted_Font_Item(
00132         char const *font_name 
00133         )
00134     { set(WD_URL_Optimize, font_name); }
00135 
00137     WT_Trusted_Font_Item(
00138         WT_String & font_name_in 
00139         )
00140     { m_index = WD_URL_Optimize; m_font_name.set(font_name_in); }
00141 
00142         virtual ~WT_Trusted_Font_Item()
00143         {}
00145 
00147 
00148     WT_String    &    font_name()        { return m_font_name; }
00150     WT_Integer32      index()          { return m_index; }
00152     void set(
00153         WT_Integer32 index, 
00154         WT_Unsigned_Integer16 const *font_name 
00155         );
00157     void set(
00158         WT_Integer32 index, 
00159         char const *font_name 
00160         );
00162 };
00163 
00165 
00166 #endif // TRUSTED_FONT_LIST_HEADER

Generated on Tue Jan 6 22:41:13 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5