XamlFile.h

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 #if !defined WT_XAML_FILE_HEADER
00021 #define WT_XAML_FILE_HEADER
00022 
00023 #include <set>
00024 
00025 //using namespace std;
00026 #include "dwf/Toolkit.h"
00027 #include "dwf/package/XML.h"
00028 #include "dwfcore/Core.h"
00029 #include "dwfcore/UUID.h"
00030 #include "dwfcore/StreamFileDescriptor.h"
00031 #include "dwfcore/FileInputStream.h"
00032 #include "dwfcore/FileOutputStream.h"
00033 #include "dwfcore/StreamFileDescriptor.h"
00034 #include "dwfcore/XML.h"
00035 #include "dwfcore/DWFXMLSerializer.h"
00036 #include "dwfcore/Exception.h"
00037 
00038 // DWFXml stuff and expat might be needed to be moved to the DWFCore
00039 #include "whiptk/whip_toolkit.h"
00040 #include "XAML/XamlPath.h"
00041 #include "XAML/XamlCanvas.h"
00042 #include "XAML/XamlRendition.h"
00043 #include "XAML/XamlResource.h"
00044 #include "XAML/OpcResourceSerializer.h"
00045 #include "XAML/OpcResourceMaterializer.h"
00046 #include "XAML/XamlW2XParser.h"
00047 #include "XAML/XamlParser.h"
00048 #include "XAML/xversion.h"
00049 #include "XAML/MemoryBuffer.h"
00050 
00051 using namespace DWFCore;
00052 
00053 #define LONG_MAX_FLOAT_MANTISSA             16777215.0f                           // 2^24 - 1 
00054 #define LONG_TO_FLOAT_SCALE                 LONG_MAX_FLOAT_MANTISSA / (float)LONG_MAX       //
00055 #define XAML_DPI_MULTIPLIER                 96.0f
00056 #define DEFAULT_DPI                         400.0f
00057 
00058 class WT_Units;
00059 class WT_XAML_Units;
00060 class WT_XAML_Macro_Definition;
00061 
00062 class XAMLTK_API WT_XAML_File : public WT_File 
00063     , public XamlDrawableAttributes::Name::Provider
00064 {
00065     friend class WT_XAML_Class_Factory;
00066 
00067 protected:
00068     WT_XAML_File() throw(WT_Result);
00069 
00070 
00071 public:
00072 
00073         class WT_XAML_ObjectList
00074         {
00075     private:
00076 
00077         //This private class is a node item in a doubly-linked list.  
00078         //We have two linked lists in the WT_XAML_ObjectList class;
00079         //One for attribures, and one for all other objects.  With
00080         //one exception (DWF_Header), Attributes always get emitted
00081         //first via the "get_next_object" method.
00082         class Node
00083         {
00084         private:
00085             Node **_head, **_tail;
00086         public:
00087             Node *prev, *next;
00088             WT_Object *object;
00089 
00090             Node();
00091             void init( WT_Object *pObject, Node **pHead, Node **pTail);
00092             void set_tail();
00093             void add_before( Node* );
00094             void remove();
00095         };
00096 
00097     public:
00098                 WT_XAML_ObjectList();
00099                 ~WT_XAML_ObjectList();
00100 
00101                 // insert the object in one of the internal linked lists,
00102         // based on a few rules (see the implementation for a 
00103         // walkthrough of the logic.)
00104                 void insert( WT_Object* ) throw (DWFException);
00105 
00106                 // performs an update of the "first incomplete" pointer,
00107         // starting a linear search from the given object's next
00108         // sibling - looking for the next incomplete object 
00109                 void update_next_incomplete( WT_Object* );
00110 
00111                 // peek front of virtually aggregated list
00112                 WT_Object*& front();
00113 
00114                 // removes front entity from the virtually aggregated list
00115                 void pop_front();
00116 
00117                 // number of objects in the virtually aggregated list
00118                 size_t size() const;
00119 
00120                 // is the virtually aggregated list empty
00121                 bool empty() const;
00122 
00123                 // find by id
00124                 bool find_by_id( WT_Object::WT_ID,
00125                                                  std::multimap<WT_Object::WT_ID, WT_Object*>::iterator&, 
00126                                                  std::multimap<WT_Object::WT_ID, WT_Object*>::iterator& );
00127 
00128                 // find by type
00129                 bool find_by_type( WT_Object::WT_Type,
00130                                                    std::multimap<WT_Object::WT_Type, WT_Object*>::iterator&, 
00131                                                    std::multimap<WT_Object::WT_Type, WT_Object*>::iterator& );
00132 
00133                 // find by id, first incomplete
00134                 bool find_first_incomplete( WT_Object::WT_Type, WT_Object::WT_ID, WT_Object*& );
00135       
00136 
00137                 // find by type, first incomplete
00138                 bool find_first_incomplete( WT_Object::WT_Type, WT_Object*& );
00139 
00140         private:
00141         // removes objects from the search maps
00142                 void _cull( WT_Object* pObj );
00143 
00144         private:
00145         // the first item is a pointer to the object list head node, 
00146         // the second is the tail node
00147         pair<Node*, Node*> _oObjects;
00148         // likewise, for the attribute list
00149         pair<Node*, Node*> _oAttributes;
00150 
00151         // A stack (pool) which tracks unused nodes.  The object list 
00152         // gets pretty busy, so it behooves us to keep the allocations 
00153         // to a minimum by recycling memory
00154         stack<Node*> _oNodePool;
00155 
00156         // Points to the first incomplete object in the object linked-list
00157         // list.  Incomplete here means that the referenced WT_Object is
00158         // marked as !materialized().  There are only a few such entities
00159         // that are partially defined in both the W2X and XAML, so it is
00160         // important that we manage the materialization flag properly, as
00161         // it is a factor in directing the insertion of Nodes referencing
00162         // WT_Objects in the linked list(s).
00163         Node *_pIncompleteObjects;
00164         Node *_pIncompleteAttributes;
00165 
00166         // The number of nodes/objects currently in the list.
00167         size_t _nObjects;
00168 
00169         // Special-case flag.  This is the only non-attribute which gets
00170         // sent out first.  It's the first thing the application must see
00171         // from the object list, so it gets special treatment.
00172         bool _bIsDwfHeaderSent;
00173 
00174         // multimap for searching for object ids.
00175                 std::multimap<WT_Object::WT_ID, WT_Object*> _idmap;
00176 
00177         // multimap for searching for object types.
00178                 std::multimap<WT_Object::WT_Type, WT_Object*> _typemap;
00179 
00180         // map to find a linked-list node given a WT_Object.
00181         std::map<WT_Object*, Node* > _nodemap;
00182         };
00183 
00184     class WT_XAML_Memory_File : public WT_FileExt
00185     {
00186     public:
00187         WT_XAML_Memory_File( DWFInputStream *pInputStream = NULL );
00188         ~WT_XAML_Memory_File();
00189 
00190         WT_Result process_stream_close (void);
00191         WT_Result process_stream_end_seek (void);
00192         WT_Result process_stream_open (void);
00193         WT_Result process_stream_read (int desired_bytes, int& bytes_read, void* buffer);
00194         WT_Result process_stream_seek (int distance, int& amount_seeked);
00195         WT_Result process_stream_tell (unsigned long *current_file_pointer_position);
00196         WT_Result process_stream_write(int size, void const* buffer);
00197 
00198         DWFInputStream *pSourceInputStream;
00199         DWFBufferInputStream *pInputStream;
00200         DWFBufferOutputStream *pOutputStream;
00201     };
00202 
00203 public:
00204     typedef  map< const wchar_t*, const wchar_t*, tDWFWCharCompareLess >  tStringMap;
00205     typedef  map< WT_Integer32, WT_XAML_Macro_Definition* >               tMacroMap;
00206     typedef  map< const wchar_t*, WT_XAML_Font::CachedTTFFontData*, tDWFWCharCompareLess >      tCachedTTFFontMap;
00207     typedef  stack< WT_Object *>                                          tObjectStack; 
00208 
00209 public:
00210     virtual ~WT_XAML_File() throw();
00211 
00212     // Serializers
00213     DWFXMLSerializer*&          xamlSerializer();
00214     DWFXMLSerializer*&          w2xSerializer();
00215     DWFXMLSerializer*&          xamlDictionarySerializer();
00216 
00217     // I/O (these pointers can be both set and retrieved through these methods)
00218     DWFOutputStream*&                       xamlStreamOut();
00219     DWFOutputStream*&                       w2xStreamOut();
00220     DWFInputStream*&                        xamlStreamIn();
00221     DWFInputStream*&                        w2xStreamIn();
00222     WT_OpcResourceSerializer*&              opcResourceSerializer();
00223     WT_OpcResourceMaterializer*&            opcResourceMaterializer();
00224     WT_XAML_W2X_Parser*&                    w2xParser();
00225     WT_XAML_Xaml_Parser*&                   xamlParser();
00226 
00227     //ObjectList access
00228         const WT_XAML_ObjectList&   object_list() const; 
00229         WT_XAML_ObjectList&                 object_list(); 
00230     void                        set_materialized( WT_Object* );
00231 
00232     const tObjectStack&         nested_object_stack() const;
00233     tObjectStack&               nested_object_stack();
00234 
00235     //Font methods
00236     const bool&                 obfuscate_embedded_fonts() const;
00237     bool&                       obfuscate_embedded_fonts();
00238     tCachedTTFFontMap&          cached_ttf_fonts();
00239 
00240     DWFOutputStream *&          xamlDictionaryStreamOut();
00241     DWFInputStream *&           xamlDictionaryStreamIn();
00242 
00243     // WT_File overrides
00244     virtual WT_Result           open();
00245     virtual WT_Result           close();
00246     virtual WT_Rendition &      desired_rendition();
00247     virtual WT_Rendition &      rendition();
00248     virtual WT_Result           get_next_object();
00249     virtual WT_Result           compress_write(int count, void const * data);
00250 
00251 
00252     //
00253     // page layout methods
00254     //
00255     // - definePageLayout() : must be called before the first drawable is serialized
00256     //   - may be called several times before a <Path>, <Glyph> or <Canvas> gets
00257     //     serialized
00258     //   - after that, an error code is returned
00259     //
00260     // - isLayoutValid() : returns true iif definePageLayout() was called with proper parameters
00261     //
00262     // - isTopLevelCanvasWritten() : returns true if the top-level canvas has been
00263     // committed to xml
00264     //   - in that case, definePageLayout() will always return an error code
00265     //
00266     // - innerPageTransform() : returns the 3x3 paper transform (used by the top-level
00267     // <Canvas> element)
00268     //
00269     // - flipPoint() : modifies the point so that it's paper projection will be
00270     // mirrored in y - should be called for all points by all drawables (otherwise the
00271     // result will be reversed in XPS)
00272     //
00273     // - convertToPaperSpace() : converts a lenght expressed in logical units into
00274     // page space units
00275     //
00276     WT_Result                   definePageLayout(const WT_Matrix2D &rTransform, double fWidth, double fHeight, double fScale);
00277     WT_Result                   writeTopLevelCanvas();
00278     bool                        isLayoutValid() const;
00279     bool                        isTopLevelCanvasWritten() const;
00280     const WT_Matrix2D &         innerPageTransform() const;  
00281     WT_Result                   flipPoint(WT_Point2D &);
00282     WT_Result                   unflipPoint(WT_Point2D &);
00283     float                       convertToPaperSpace(float length) const;
00284 
00285     //
00286     // overposting methods
00287     //
00288     void                        addToOverpostClip(const WT_Logical_Box &);
00289     bool                        isFittingInOverpostClip(const WT_Logical_Box &);
00290 
00291     // relative point utils     
00292     virtual WT_Point2D          de_update_current_point(WT_Point2D const & delta);
00293     virtual WT_Point2D          update_current_point(WT_Point2D const & new_point);
00294     virtual WT_Logical_Point    de_update_current_point(WT_Logical_Point const & delta);
00295     virtual WT_Logical_Point    update_current_point(WT_Logical_Point const & new_point);
00296 
00297     // utility functions
00298     static float                scaleLongToFloat(long n);
00299     static float                scaleToXamlResolution(float fDots);
00300     const DWFString &           getDictionaryResourcePath() const;
00301     XamlDictionary *            dictionary() const;
00302     WT_Result                   calculateDesiredFontStringSize( const WT_String& rString, double &rfWidth, double &rfHeight, double &rfBase, double &rfAscent ) const;
00303     WT_Result                   registerFontUri( const wchar_t* zFontName,  const wchar_t* zFontUri );
00304     const wchar_t*              resolveFontUri( const wchar_t* zFontName ) const;
00305     WT_Result                   registerMacro( const WT_XAML_Macro_Definition * );
00306     bool                        findMacro( WT_Integer32 nIndex, WT_XAML_Macro_Definition *& ) const;
00307     bool&                       serializingAsW2DContent();
00308     const bool &                serializingAsW2DContent() const;
00309     WT_File* &                  w2dContentFile();
00310     WT_File* const &            w2dContentFile() const;
00311     tMemoryBuffer*              getBuffer( size_t nMinLengthInBytes ) throw(DWFException);
00312     void                        releaseBuffer( tMemoryBuffer *pBuffer ) throw(DWFException);
00313     tMemoryBuffer*              exchangeBuffer( tMemoryBuffer*, size_t nMinLengthInBytes ) throw(DWFException);
00314 
00315     // file state
00316     const int&                  nameIndex() const;
00317     int&                        nameIndex();
00318 
00319     // version overrides            
00320     int                         toolkit_major_revision() const;
00321     int                         toolkit_minor_revision() const;
00322 
00323     // path delay logic
00324     virtual WT_Result           merge_or_delay_path(XamlPath const & current);
00325     void                        set_delayed_path(XamlPath *path);
00326     XamlPath *                  delayed_path() const;
00327     WT_Result                   dump_delayed_drawable();
00328 
00329     //RenditionSync tag started flag - used in all attributes serialization method
00330     bool                        isRenditionSyncStarted();
00331     void                        setRenditionSyncStarted(bool bRenditionSyncStarted);
00332     WT_Result                   serializeRenditionSyncStartElement();
00333     WT_Result                   serializeRenditionSyncEndElement();
00334     //Viewport serialization needs to start new Canvas element
00335     WT_Result                   serializeCanvasStartElement( bool bNesting=true );
00336     WT_Result                   serializeCanvasEndElement( bool bNesting=true );
00337     // path utilities
00338     void                        setPathData(const char* pData);
00339     const char*                 getPathData() const;
00340     bool                        isPathDataSet() const;
00341     WT_Result                   materializePathData();
00342 
00343     // refName string 
00344     const wchar_t*              nameIndexString();
00345     const DWFString&            nameIndexPrefix() const;
00346     DWFString&                  nameIndexPrefix();
00347     int                         parseNameIndex( const char* pName );
00348 
00349     // XamlDrawableAttributes::Name::Provider
00350     WT_Result                   provideName( XamlDrawableAttributes::Name *& );
00351 
00352 private:
00353     DWFString                   generateUniquePrefix() const;
00354     bool                        isWriteMode() const;
00355     void                        setCurrentCmd(const char* pStartAddress);
00356     char                        getNextCommand();//const char* &pPathString);
00357     static WT_Result            DWFXamlStreamOpen(WT_File & file);
00358     static WT_Result            DWFXamlStreamClose (WT_File & file);
00359 
00360 public:
00361     // String defines for each WhipTk class, overkill but we'll need most of them
00362 #define CALLBACK_MACRO(class_name, class_lower) \
00363     static const char* const pcW2X##class_name##_Element;
00364     CALLBACK_LIST
00365 #undef CALLBACK_MACRO
00366 
00367         //Name prefix
00368         static const wchar_t* const kpzName_Prefix;
00369 
00370 private:
00371 
00372     // I/O
00373     DWFOutputStream*                    _pXamlStreamOut;
00374     DWFOutputStream*                    _pXamlDictionaryStreamOut;
00375     DWFOutputStream*                    _pW2xStreamOut;
00376     DWFInputStream*                     _pXamlStreamIn;
00377     DWFInputStream*                     _pXamlDictionaryStreamIn;
00378     DWFInputStream*                     _pW2xStreamIn;
00379     DWFXMLSerializer*                   _pXamlSerializer;
00380     DWFXMLSerializer*                   _pXamlDictionarySerializer;
00381     DWFXMLSerializer*                   _pW2xSerializer;
00382     WT_OpcResourceSerializer*           _pOpcResourceSerializer;
00383     WT_OpcResourceMaterializer*         _pOpcResourceMaterializer;
00384     WT_XAML_W2X_Parser*                 _pW2XParser;
00385     WT_XAML_Xaml_Parser*                _pXamlParser;
00386 
00387     // WT_File override data
00388     WT_XAML_Rendition           _oDesiredRendition;
00389     WT_XAML_Rendition*          _pRendition;
00390         WT_XAML_ObjectList                      _oObjectList;
00391     tObjectStack                _oNestedObjectStack;
00392 
00393     // Page layout
00394 
00395     //
00396     // the page/reverse page transforms are the actual logical-space <->
00397     // final paper projections
00398     //
00399     // the inner page transform is just a translation matrix used to
00400     // inhibit the translation from the 2D graphics resource page transform
00401     // (added by the toolkit to the top-level xml element). This is
00402     // mandatory to preserve accuracy (the idea is to have a concatenated
00403     // page transform * inner transform with a 0 translation)
00404     //
00405     WT_Matrix2D                 _oPageTransform;
00406     WT_Matrix2D                 _oReversePageTransform;
00407     WT_Matrix2D                 _oInnerPageTransform;
00408 
00409     WT_Point2D                  _oPageSize;
00410     WT_Point2D                  _oTranslation;
00411     double                      _fYMirror;
00412     bool                        _bValidLayout;
00413     bool                        _bTopLevelCanvasWritten;
00414 
00415 
00416     // Overposting
00417     vector<WT_Logical_Box>      _oOverpostClip;
00418 
00419     // Path state
00420     XamlPath*                   _pDelayedPath;
00421     WT_Point2D                  _oCurrentPoint;
00422 
00423     // Flags
00424     bool                        _bIsCurrentlyDumpingDelayedPath;
00425     bool                        _bIsUnitsTransformSet;
00426     bool                        _bIsRenditionSyncStarted;
00427     bool                        _bIsNonNestedCanvasElementStarted;
00428     bool                        _bIsObfuscateEmbeddedFonts;
00429     bool                        _bIsEndOfDwfSent;
00430     bool                        _bSerializingMacroDefinition;
00431 
00432     // State
00433     int                         _nNameIndex;
00434     wchar_t*                    _pwcNameString;
00435     DWFString                   _zNamePrefix;
00436 
00437     // Utility objects
00438     DWFString                   _szDictionaryResourcePath;
00439     XamlDictionary *            _pDictionary;
00440     DWFUUID                     _oUUIDProvider;
00441     tStringMap                  _oFontRefNameMap;
00442     tMacroMap                   _oMacroMap;
00443     tCachedTTFFontMap           _oCachedTTFFontMap;
00444 
00445     WT_File*                    _pMacroDefinitionFile;
00446     tMemoryBufferMap            _oAvailableBuffers;
00447 };
00448 
00449 //Inlines
00450 inline DWFXMLSerializer*&
00451 WT_XAML_File::xamlSerializer()   
00452 { 
00453     return _pXamlSerializer; 
00454 }
00455 
00456 inline DWFXMLSerializer*&
00457 WT_XAML_File::xamlDictionarySerializer()   
00458 { 
00459     return _pXamlDictionarySerializer; 
00460 }
00461 
00462 inline DWFXMLSerializer*&
00463 WT_XAML_File::w2xSerializer()
00464 { 
00465     return _pW2xSerializer; 
00466 }
00467 
00468 inline DWFOutputStream*&
00469 WT_XAML_File::xamlStreamOut()
00470 {
00471     return _pXamlStreamOut;
00472 }
00473 
00474 inline DWFOutputStream*&
00475 WT_XAML_File::xamlDictionaryStreamOut()
00476 {
00477     return _pXamlDictionaryStreamOut;
00478 }
00479 
00480 inline DWFOutputStream*&
00481 WT_XAML_File::w2xStreamOut()
00482 {
00483     return _pW2xStreamOut;
00484 }
00485 
00486 inline DWFInputStream*&
00487 WT_XAML_File::xamlStreamIn()
00488 {
00489     return _pXamlStreamIn;
00490 }
00491 
00492 inline DWFInputStream*&
00493 WT_XAML_File::xamlDictionaryStreamIn()
00494 {
00495     return _pXamlDictionaryStreamIn;
00496 }
00497 
00498 inline DWFInputStream*&
00499 WT_XAML_File::w2xStreamIn()
00500 {
00501     return _pW2xStreamIn;
00502 }
00503 
00504 inline WT_XAML_W2X_Parser*&
00505 WT_XAML_File::w2xParser()
00506 {
00507     return _pW2XParser;
00508 }
00509 
00510 inline WT_XAML_Xaml_Parser*&
00511 WT_XAML_File::xamlParser()
00512 {
00513     return _pXamlParser;
00514 }
00515 
00516 inline const WT_XAML_File::WT_XAML_ObjectList&
00517 WT_XAML_File::object_list() const
00518 {
00519     return _oObjectList;
00520 }
00521 
00522 inline WT_XAML_File::WT_XAML_ObjectList&
00523 WT_XAML_File::object_list()
00524 {
00525     return _oObjectList;
00526 }
00527 
00528 inline const WT_XAML_File::tObjectStack&
00529 WT_XAML_File::nested_object_stack() const
00530 {
00531     return _oNestedObjectStack;
00532 }
00533 
00534 inline WT_XAML_File::tObjectStack&
00535 WT_XAML_File::nested_object_stack()
00536 {
00537     return _oNestedObjectStack;
00538 }
00539 
00540 
00541 inline bool
00542 WT_XAML_File::isLayoutValid() const
00543 {
00544     return _bValidLayout;
00545 }
00546 
00547 inline bool
00548 WT_XAML_File::isTopLevelCanvasWritten() const
00549 {
00550     return _bTopLevelCanvasWritten;
00551 }
00552 
00553 //
00554 // note : to switch back to the initial layout scheme, return
00555 // _oPageTransform, instead of _oInnerPageTransform
00556 //
00557 inline const WT_Matrix2D &
00558 WT_XAML_File::innerPageTransform() const
00559 {
00560     return _oInnerPageTransform;
00561 }
00562 
00563 inline const DWFString &
00564 WT_XAML_File::getDictionaryResourcePath() const
00565 {
00566     return _szDictionaryResourcePath;
00567 }
00568 
00569 inline XamlDictionary *
00570 WT_XAML_File::dictionary() const
00571 {
00572     return _pDictionary;
00573 }
00574 
00575 inline void 
00576 WT_XAML_File::set_delayed_path(XamlPath *pPath) 
00577 {   
00578     WD_Assert(!_pDelayedPath); 
00579     _pDelayedPath = pPath; 
00580 }
00581 
00582 inline XamlPath *
00583 WT_XAML_File::delayed_path() const
00584 {
00585     return _pDelayedPath; 
00586 }
00587 
00588 inline float
00589 WT_XAML_File::scaleLongToFloat(long n)
00590 {
00591     return (float)n * LONG_TO_FLOAT_SCALE; 
00592 }
00593 
00594 inline float
00595 WT_XAML_File::scaleToXamlResolution(float fDots)
00596 {
00597     return fDots / DEFAULT_DPI * XAML_DPI_MULTIPLIER; 
00598 }
00599 
00600 inline int const &
00601 WT_XAML_File::nameIndex() const
00602 {
00603     return _nNameIndex; 
00604 }
00605 
00606 inline int&
00607 WT_XAML_File::nameIndex()
00608 {
00609     return _nNameIndex; 
00610 }
00611 
00612 inline WT_Rendition &
00613 WT_XAML_File::desired_rendition()
00614 {
00615     return _oDesiredRendition; 
00616 }
00617 
00618 inline WT_Rendition &
00619 WT_XAML_File::rendition()
00620 {
00621     return *_pRendition; 
00622 }
00623 
00624 inline bool
00625 WT_XAML_File::isWriteMode() const  
00626 { 
00627     return file_mode() != WT_File::File_Read && file_mode() != WT_File::Block_Read; 
00628 }
00629 
00630 inline WT_OpcResourceSerializer*&   
00631 WT_XAML_File::opcResourceSerializer()
00632 {
00633     return _pOpcResourceSerializer;
00634 }
00635 
00636 inline WT_OpcResourceMaterializer*& 
00637 WT_XAML_File::opcResourceMaterializer()
00638 {
00639     return _pOpcResourceMaterializer;
00640 }
00641 
00642 inline bool
00643 WT_XAML_File::isRenditionSyncStarted()
00644 {
00645     return _bIsRenditionSyncStarted;
00646 }
00647 
00648 inline void
00649 WT_XAML_File::setRenditionSyncStarted(bool bRenditionSyncStarted)
00650 {
00651     _bIsRenditionSyncStarted = bRenditionSyncStarted;
00652 }
00653 
00654 inline const bool&
00655 WT_XAML_File::obfuscate_embedded_fonts() const
00656 {
00657     return _bIsObfuscateEmbeddedFonts;
00658 }
00659 
00660 inline bool&
00661 WT_XAML_File::obfuscate_embedded_fonts()
00662 {
00663     return _bIsObfuscateEmbeddedFonts;
00664 }
00665 
00666 inline WT_XAML_File::tCachedTTFFontMap&
00667 WT_XAML_File::cached_ttf_fonts()
00668 {
00669     return _oCachedTTFFontMap;
00670 }
00671 
00672 inline bool&
00673 WT_XAML_File::serializingAsW2DContent()
00674 {
00675     return _bSerializingMacroDefinition;
00676 }
00677 
00678 inline const bool&
00679 WT_XAML_File::serializingAsW2DContent() const
00680 {
00681     return _bSerializingMacroDefinition;
00682 }
00683 
00684 inline WT_File* &
00685 WT_XAML_File::w2dContentFile()
00686 {
00687     return _pMacroDefinitionFile;
00688 }
00689 
00690 inline  WT_File* const &
00691 WT_XAML_File::w2dContentFile() const
00692 {
00693     return _pMacroDefinitionFile;
00694 }
00695 
00696 inline int
00697 WT_XAML_File::toolkit_major_revision() const    
00698 {    
00699     return WD_XAML_Toolkit_Major_Revision;    
00700 }
00701 
00702 inline int
00703 WT_XAML_File::toolkit_minor_revision() const
00704 {    
00705     return WD_XAML_Toolkit_Minor_Revision;    
00706 }
00707 
00708 #endif // WT_XAML_FILE_HEADER

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