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

trusted_font_list.h

00001 //  Copyright (c) 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 TRUSTED_FONT_LIST_HEADER
00019 #define TRUSTED_FONT_LIST_HEADER
00020 
00021 #include "whiptk/whipcore.h"
00022 #include "whiptk/attribute.h"
00023 
00024 class WT_Trusted_Font_Item;
00025 
00031 
00032 
00038 class WHIPTK_API WT_Trusted_Font_List : public WT_Object, public WT_Item_List
00039 {
00040 public:
00042     WT_Trusted_Font_List()
00043     { }
00044 
00046     ~WT_Trusted_Font_List();
00047 
00049     void add (WT_Trusted_Font_Item &item);
00051     WT_Integer32 index_from_trusted_font_item(WT_Trusted_Font_Item & item_in);
00053     WT_Trusted_Font_Item * trusted_font_item_from_index(WT_Integer32 index);
00054 
00055     //WT_Object virtual methods
00056     WT_Result    materialize(WT_Opcode const & opcode, WT_File & file);
00057     WT_ID        object_id() const;
00058     WT_Type      object_type() const;
00059     WT_Result    process(WT_File & file);
00060     WT_Result    serialize (WT_File & file) const;
00061     WT_Result    skip_operand(WT_Opcode const & opcode, WT_File & file);
00062 
00064     WT_Trusted_Font_List const & operator=(WT_Trusted_Font_List const & trusted_font);
00066     WT_Boolean operator== (WT_Trusted_Font_List const & list) const;
00067 
00069 
00071     static WT_Result default_process(
00072         WT_Trusted_Font_List & item, 
00073         WT_File & file 
00074         );
00075 
00076 
00077 };
00078 
00080 class WHIPTK_API WT_Trusted_Font_Item : public WT_Item
00081 {
00082 private:
00083     WT_String m_font_name;
00084     WT_Integer32 m_index;
00085     void _deleteObject(void *object)
00086     {
00087         delete (WT_Trusted_Font_Item*)object;
00088     }
00089 
00090 
00091 public:
00092 
00094 
00095     WT_Trusted_Font_Item()
00096         : m_index(0)
00097     {}
00098 
00100     WT_Trusted_Font_Item(
00101         WT_Integer32 index, 
00102         WT_Unsigned_Integer16 const *font_name 
00103         )
00104     { set(index, font_name); }
00105 
00107     WT_Trusted_Font_Item(
00108         WT_Integer32 index, 
00109         char const *font_name 
00110         )
00111     { set(index, font_name); }
00112 
00114     WT_Trusted_Font_Item(
00115         WT_Integer32 index, 
00116         WT_String & font_name_in 
00117         );
00118 
00120     WT_Trusted_Font_Item(
00121         WT_Unsigned_Integer16 const *font_name 
00122         )
00123     { set(WD_URL_Optimize, font_name); }
00124 
00126     WT_Trusted_Font_Item(
00127         char const *font_name 
00128         )
00129     { set(WD_URL_Optimize, font_name); }
00130 
00132     WT_Trusted_Font_Item(
00133         WT_String & font_name_in 
00134         )
00135     { m_index = WD_URL_Optimize; m_font_name.set(font_name_in); }
00137 
00139 
00140     WT_String    &    font_name()        { return m_font_name; }
00142     WT_Integer32      index()          { return m_index; }
00144     void set(
00145         WT_Integer32 index, 
00146         WT_Unsigned_Integer16 const *font_name 
00147         );
00149     void set(
00150         WT_Integer32 index, 
00151         char const *font_name 
00152         );
00154 };
00155 
00157 
00158 #endif // TRUSTED_FONT_LIST_HEADER

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