Paper.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 
00020 #ifndef _DWFTK_PAPER_H
00021 #define _DWFTK_PAPER_H
00022 
00027 
00028 
00029 #include "dwfcore/STL.h"
00030 
00031 #include "dwf/Toolkit.h"
00032 #include "dwf/package/XML.h"
00033 #include "dwf/package/reader/PackageReader.h"
00034 #include "dwf/package/writer/PackageWriter.h"
00035 
00036 
00037 namespace DWFToolkit
00038 {
00039 
00048 class DWFPaper : public DWFXMLBuildable
00049 
00050 #ifndef DWFTK_READ_ONLY
00051                , public DWFXMLSerializable
00052 #endif
00053 
00054                _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00055 {
00056 
00057 public:
00058 
00062     typedef _DWFTK_STD_VECTOR(DWFPaper*)    tList;
00063 
00064 public:
00065 
00066     typedef enum
00067     {
00068         eMillimeters,
00069         eInches,
00070 
00071         eUnknown
00072 
00073     } teUnits;
00074 
00075 public:
00076 
00082     _DWFTK_API
00083     DWFPaper()
00084         throw();
00085 
00097     _DWFTK_API
00098     DWFPaper( double        nWidth,
00099               double        nHeight,
00100               teUnits       eUnits = eUnknown,
00101               unsigned int  nColorARGB = 0x00ffffff,
00102               const double* anClip = NULL,
00103               bool          bShow = true )
00104         throw();
00105 
00112     _DWFTK_API
00113     DWFPaper( const DWFPaper& rPaper )
00114         throw();
00115 
00122     _DWFTK_API
00123     DWFPaper& operator=( const DWFPaper& rPaper )
00124         throw();
00125 
00131     _DWFTK_API
00132     virtual ~DWFPaper()
00133         throw();
00134 
00142     _DWFTK_API
00143     bool show() const
00144         throw()
00145     {
00146         return _bShow;
00147     }
00148 
00155     _DWFTK_API
00156     double width() const
00157         throw()
00158     {
00159         return _nWidth;
00160     }
00161 
00168     _DWFTK_API
00169     double height() const
00170         throw()
00171     {
00172         return _nHeight;
00173     }
00174 
00181     _DWFTK_API
00182     unsigned int color() const
00183         throw()
00184     {
00185         return _nColorARGB;
00186     }
00187 
00194 
00195     _DWFTK_API
00196     const double* const clip() const
00197         throw()
00198     {
00199         return (const double* const)_anClip;
00200     }
00201 
00208     _DWFTK_API
00209     const teUnits units() const
00210         throw()
00211     {
00212         return _eUnits;
00213     }
00214 
00218     _DWFTK_API
00219     virtual void parseAttributeList( const char** ppAttributeList )
00220         throw( DWFException );
00221 
00222 #ifndef DWFTK_READ_ONLY
00223 
00227     _DWFTK_API
00228     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00229         throw( DWFException );
00230 #endif
00231 
00232 private:
00233 
00234     bool            _bShow;
00235     double          _nWidth;
00236     double          _nHeight;
00237     unsigned int    _nColorARGB;
00238     double          _anClip[4];
00239     teUnits         _eUnits;
00240 };
00241 
00242 }
00243 
00244 #endif

Generated on Tue Jan 6 22:40:05 2009 for Autodesk DWF Toolkit by  doxygen 1.4.5