XamlURL.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 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 #if !defined XAML_URL_HEADER
00020 #define XAML_URL_HEADER
00021 
00025 
00026 #include "XAML/XamlCore.h"
00027 
00028 #include "whiptk/url.h"
00029 #include "XAML/XamlDrawableAttributes.h"
00030 #include "XAML/XamlXML.h"
00031 
00036 
00037 
00041 class XAMLTK_API WT_XAML_URL : public WT_URL
00042                                                          , public XamlDrawableAttributes::NavigateUri::Provider
00043                                                          , public XamlDrawableAttributes::PathAttributeProvider
00044                                                          , public XamlDrawableAttributes::GlyphsAttributeProvider
00045 {
00046         friend class WT_XAML_Class_Factory;
00047         friend class WT_XAML_Rendition;
00048 
00049 protected:
00050 
00052 
00053     WT_XAML_URL()
00054       : WT_URL()
00055       , _bXamlUrlEnabled( true )
00056      { }
00057 
00059     WT_XAML_URL(WT_URL_Item  &item)
00060                 : WT_URL(item)
00061         , _bXamlUrlEnabled( true )
00062         {}
00063 
00065     WT_XAML_URL(
00066         WT_Integer32 index, 
00067         WT_Unsigned_Integer16 const * address, 
00068         WT_Unsigned_Integer16 const * friendly_name 
00069         )
00070                 : WT_URL(index,address,friendly_name)
00071         , _bXamlUrlEnabled( true )
00072         {}
00073 
00075         WT_XAML_URL(WT_URL const& url)
00076                 :WT_URL(url)
00077         , _bXamlUrlEnabled( true )
00078         {}
00079 
00081         WT_XAML_URL(WT_XAML_URL const& url)
00082         : _bXamlUrlEnabled( true )
00083         {
00084         *this = url;
00085     }
00086 
00087         virtual ~WT_XAML_URL()
00088         {}
00090 
00091         WT_Result serializeUrlList(WT_XAML_File& rFile);
00092 
00093 public:
00095     WT_XAML_URL const & operator=(WT_XAML_URL const & url)
00096         {
00097         _szXamlNavigateUri = url._szXamlNavigateUri;
00098         _bXamlUrlEnabled = url._bXamlUrlEnabled;
00099                 WT_URL::operator= (url);
00100                 return *this;
00101         }
00102 
00103     DWFString const& xamlURL() const
00104     {   return _szXamlNavigateUri;   }
00105 
00106     DWFString&       xamlURL()
00107     {   return _szXamlNavigateUri;   }
00108 
00109     const bool& xamlUrlEnabled() const
00110     { return _bXamlUrlEnabled; }
00111 
00112     bool& xamlUrlEnabled()
00113     { return _bXamlUrlEnabled; }
00114 
00115     virtual void clear()
00116     {
00117         if(_szXamlNavigateUri.bytes())
00118             _szXamlNavigateUri.destroy();
00119 
00120         WT_URL::clear();
00121     }
00122 
00123     virtual WT_Result providePathAttributes( XamlDrawableAttributes::PathAttributeConsumer*, WT_XAML_File& ) const;
00124         virtual WT_Result provideGlyphsAttributes( XamlDrawableAttributes::GlyphsAttributeConsumer* pConsumer, WT_XAML_File& r) const;
00125 
00126         virtual WT_Result provideNavigateUri(XamlDrawableAttributes::NavigateUri* & rpNavigateUri);
00127 
00129     WT_Result        serialize (WT_File & file) const;
00131         WT_Result                parseAttributeList(XamlXML::tAttributeMap& rMap, WT_XAML_File& rFile);
00133 private:
00134     DWFString       _szXamlNavigateUri;
00135     bool            _bXamlUrlEnabled;
00136 };
00138 
00139 #endif //XAML_URL_HEADER

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