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

plotinfo.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 PLOTINFO_HEADER
00019 #define PLOTINFO_HEADER
00020 
00026 
00027 
00033 class WHIPTK_API WT_Plot_Info
00034 : public WT_Object
00035 {
00036 public:
00038     enum WT_Paper_Units
00039     {
00040         Millimeters,
00041         Inches,
00042 
00043         // Not units
00044         Count, 
00045         Undefined = -1 
00046     };
00047 
00048 private:
00049     double          m_height;
00050     double          m_width;
00051     WT_Point2D      m_ll;   // lower left
00052     WT_Point2D      m_ur;   // upper right
00053     WT_Matrix2D     m_dwf2paper;
00054     WT_Paper_Units  m_units;
00055     WT_Boolean      m_show;
00056     WT_String       m_temp_string;
00057     long            m_rotation;
00058 
00059     enum WT_Materialize_Stage
00060     {   Eating_Initial_Whitespace,
00061         Getting_Show_Boolean,
00062         Getting_Landscape_To_Portrait_Flip,
00063         Getting_Units_String,
00064         Getting_Paper_Width,
00065         Getting_Paper_Height,
00066         Getting_Plot_Area_Left,
00067         Getting_Plot_Area_Bottom,
00068         Getting_Plot_Area_Right,
00069         Getting_Plot_Area_Top,
00070         Getting_To_Paper_Transform,
00071         Eating_End_Whitespace
00072     } m_stage;
00073 
00074 public:
00075 
00077 
00078     WT_Plot_Info()
00079     : m_height(11.0)
00080     , m_width(8.5)
00081     , m_ll(0.25,0.25)
00082     , m_ur(8.25,10.75)
00083     , m_units(Inches)
00084     , m_show(WD_False)
00085     , m_rotation(0)
00086     , m_stage(Eating_Initial_Whitespace)
00087     {}
00089 
00091 
00092     inline WT_Boolean&           for_display()     { return m_show; }
00094     inline const WT_Boolean&     for_display()     const { return m_show; }
00096     inline WT_Point2D&           lower_left()      { return m_ll; }
00098     inline const WT_Point2D&     lower_left()      const { return m_ll; }
00100     inline double&               paper_height()        { return m_height; }
00102     inline const double&         paper_height()        const { return m_height; }
00104     inline WT_Paper_Units&       paper_units() { return m_units; }
00106     inline const WT_Paper_Units& paper_units() const { return m_units; }
00108     inline double&               paper_width()         { return m_width; }
00110     inline const double&         paper_width()         const { return m_width; }
00112     inline const long&           rotation()              const { return m_rotation; }
00114     inline long&                 rotation()        { return m_rotation; }
00116     inline WT_Matrix2D&          to_paper()       { return m_dwf2paper; }
00118     inline const WT_Matrix2D&    to_paper()       const { return m_dwf2paper; }
00120     inline WT_Point2D&           upper_right()     { return m_ur; }
00122     inline const WT_Point2D&     upper_right()     const { return m_ur; }    //@}
00123 
00125     WT_Result materialize( const WT_Opcode& opcode, WT_File& file);
00126     WT_ID     object_id()   const { return WT_Object::Plot_Info_ID; }
00127     WT_Type   object_type() const { return WT_Object::Definition; }
00128     WT_Result process( WT_File& file);
00129     WT_Result serialize( WT_File& file ) const;
00131 
00133 
00135     static WT_Result default_process(
00136         WT_Plot_Info  & item, 
00137         WT_File & file 
00138         );
00139 };
00140 
00141 #endif // PLOTINFO_HEADER

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