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

Paper.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 1996-2005 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 DWFToolkitMemory
00049                , public DWFXMLBuildable
00050 
00051 #ifndef DWFTK_READ_ONLY
00052                , public DWFXMLSerializable
00053 #endif
00054 {
00055 
00056 public:
00057 
00061     typedef vector<DWFPaper*>   tList;
00062 
00063 public:
00064 
00065     typedef enum
00066     {
00067         eMillimeters,
00068         eInches,
00069 
00070         eUnknown
00071 
00072     } teUnits;
00073 
00074 public:
00075 
00081     _DWFTK_API
00082     DWFPaper()
00083         throw();
00084 
00096     _DWFTK_API
00097     DWFPaper( double        nWidth,
00098               double        nHeight,
00099               teUnits       eUnits = eUnknown,
00100               unsigned int  nColorARGB = 0x00ffffff,
00101               const double* anClip = NULL,
00102               bool          bShow = true )
00103         throw();
00104 
00111     _DWFTK_API
00112     DWFPaper( const DWFPaper& rPaper )
00113         throw();
00114 
00121     _DWFTK_API
00122     DWFPaper& operator=( const DWFPaper& rPaper )
00123         throw();
00124 
00130     _DWFTK_API
00131     virtual ~DWFPaper()
00132         throw();
00133 
00141     _DWFTK_API
00142     bool show() const
00143         throw()
00144     {
00145         return _bShow;
00146     }
00147 
00154     _DWFTK_API
00155     double width() const
00156         throw()
00157     {
00158         return _nWidth;
00159     }
00160 
00167     _DWFTK_API
00168     double height() const
00169         throw()
00170     {
00171         return _nHeight;
00172     }
00173 
00180     _DWFTK_API
00181     unsigned int color() const
00182         throw()
00183     {
00184         return _nColorARGB;
00185     }
00186 
00193 
00194     _DWFTK_API
00195     const double* const clip() const
00196         throw()
00197     {
00198         return (const double* const)_anClip;
00199     }
00200 
00207     _DWFTK_API
00208     const teUnits units() const
00209         throw()
00210     {
00211         return _eUnits;
00212     }
00213 
00217     _DWFTK_API
00218     virtual void parseAttributeList( const char** ppAttributeList )
00219         throw( DWFException );
00220 
00221 #ifndef DWFTK_READ_ONLY
00222 
00226     _DWFTK_API
00227     void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00228         throw( DWFException );
00229 #endif
00230 
00231 private:
00232 
00233     bool            _bShow;
00234     double          _nWidth;
00235     double          _nHeight;
00236     unsigned int    _nColorARGB;
00237     double          _anClip[4];
00238     teUnits         _eUnits;
00239 };
00240 
00241 }
00242 
00243 #endif

Generated on Tue May 17 12:38:51 2005 for Autodesk DWF Toolkit by  doxygen 1.4.1