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

text_options.h

00001 //  Copyright (c) 1996-2002 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 TEXT_OPTIONS_HEADER
00019 #define TEXT_OPTIONS_HEADER
00020 
00021 #include "whiptk/whipcore.h"
00022 #include "whiptk/file.h"
00023 #include "whiptk/drawable.h"
00024 
00032 // ====================================================================================
00034 
00036 class WHIPTK_API WT_Text_Option_Scoring : public WT_Option
00037 {
00038 private:
00039     WT_Unsigned_Integer16     m_count;
00040     WT_Unsigned_Integer16 *   m_positions;
00041 
00042     int                       m_materialization_counter;
00043 
00044     enum
00045     {
00046         Starting = 1001,
00047         Getting_Count = 1002,
00048         Getting_Positions = 1003,
00049         Eating_Pre_Open_Paren_Whitespace = 1004,
00050         Getting_Open_Paren = 1005,
00051         Getting_Close_Parens = 1006
00052     } ;
00053 
00054 public:
00055 
00057 
00058     WT_Text_Option_Scoring()
00059         : m_count(0)
00060         , m_positions(WD_Null)
00061     {
00062         m_stage = WT_Text_Option_Scoring::Starting;
00063     }
00065     WT_Text_Option_Scoring(WT_Text_Option_Scoring const & scoring);
00067     ~WT_Text_Option_Scoring();
00069 
00071 
00072     WT_Unsigned_Integer16           count() const                                 {   return m_count;     }
00074     virtual      char const *       opcode() const = 0;
00076     WT_Unsigned_Integer16 const *   positions() const                             {   return m_positions; }
00078     void  set(
00079         WT_Unsigned_Integer16 count, 
00080         WT_Unsigned_Integer16 const * pos 
00081         );
00083     WT_Text_Option_Scoring const &  operator= (WT_Text_Option_Scoring const & scoring);
00085 
00087     WT_Result        serialize  (WT_Object const & parent, WT_File & file) const;
00088     WT_Result        materialize(WT_Object       & parent, WT_Optioncode const & optioncode, WT_File & file);
00090 
00091 };
00092 
00093 
00094 // ====================================================================================
00096 
00098 class WHIPTK_API WT_Text_Option_Overscore : public WT_Text_Option_Scoring
00099 {
00100 public:
00102     WT_ID   object_id() const;
00104     virtual char const * opcode() const     {   return "(Overscore";    }
00105 };
00106 
00108 
00110 class WHIPTK_API WT_Text_Option_Underscore : public WT_Text_Option_Scoring
00111 {
00112 public:
00114     WT_ID   object_id() const;
00116     virtual char const * opcode() const     {   return "(Underscore";    }
00117 };
00118 
00119 
00120 // ====================================================================================
00122 
00127 class WHIPTK_API WT_Text_Option_Bounds : public WT_Option
00128 {
00129 private:
00130     WT_Logical_Point *       m_bounds;
00131     int                      m_materialization_counter;
00132 
00133     enum
00134     {
00135         Getting_Bounds = 1001
00136     };
00137 
00138 public:
00139 
00141 
00142     WT_Text_Option_Bounds()
00143         : m_bounds (WD_Null)
00144     { }
00146     WT_Text_Option_Bounds(
00147         WT_Logical_Point const * pos  
00148         );
00150     WT_Text_Option_Bounds(WT_Text_Option_Bounds const & bounds);
00152     ~WT_Text_Option_Bounds();
00154 
00156 
00157     WT_Logical_Point const *    bounds() const              {   return m_bounds;   }
00159     void                        de_relativize(WT_File & file);
00161     void                        relativize(WT_File & file);
00163     void                        set(WT_Logical_Point const * bounds);
00165     void                        transform(WT_Transform const & transform);
00167     WT_Text_Option_Bounds const &   operator=(WT_Text_Option_Bounds const & bounds);
00169 
00171     WT_ID            object_id() const;
00172     WT_Result        serialize  (WT_Object const & parent, WT_File & file) const;
00173     WT_Result        materialize(WT_Object       & parent, WT_Optioncode const & optioncode, WT_File & file);
00175 };
00176 
00177 
00178 // ====================================================================================
00179 
00181 
00183 class WHIPTK_API WT_Text_Option_Reserved : public WT_Option
00184 {
00185 private:
00186     WT_Unsigned_Integer16     m_count;
00187     WT_Unsigned_Integer16 *   m_values;
00188     int                       m_materialization_counter;
00189 
00190     enum
00191     {
00192         Starting = 1001,
00193         Getting_Count = 1002,
00194         Getting_Values = 1003,
00195         Eating_Pre_Open_Paren_Whitespace = 1004,
00196         Getting_Open_Paren = 1005,
00197         Getting_Close_Parens = 1006
00198     } ;
00199 
00200 public:
00201 
00203 
00204     WT_Text_Option_Reserved()
00205         : m_count(0)
00206         , m_values(WD_Null)
00207     {
00208         m_stage = WT_Text_Option_Reserved::Starting;
00209     }
00211     WT_Text_Option_Reserved(WT_Text_Option_Reserved const & reserved);
00213     ~WT_Text_Option_Reserved();
00215 
00217     WT_Unsigned_Integer16           count() const                                 {   return m_count;     }
00218     WT_Unsigned_Integer16 const *   values() const                                {   return m_values; }
00219     void                            set(WT_Unsigned_Integer16 count, WT_Unsigned_Integer16 const * values);
00220     WT_Text_Option_Reserved const &  operator= (WT_Text_Option_Reserved const & reserved);
00222 
00224     WT_ID            object_id() const;
00225     WT_Result        serialize  (WT_Object const & parent, WT_File & file) const;
00226     WT_Result        materialize(WT_Object       & parent, WT_Optioncode const & optioncode, WT_File & file);
00228 
00229 };
00230 
00231 // ====================================================================================
00232 
00234 class WHIPTK_API WT_Text_Optioncode : public WT_Optioncode
00235 {
00236 public:
00238     enum
00239     {
00240         Unknown_Option  = 0,
00241         Overscore_Option,
00242         Underscore_Option,
00243         Bounds_Option,
00244         Reserved_Option
00245     };
00246 
00248     virtual int option_id_from_optioncode();
00249 };
00250 
00251 
00252 #endif // TEXT_OPTIONS_HEADER

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