XamlAttribute_Url.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 #if !defined WT_XAMLATTRIBUTE_URL_HEADER
00019 #define WT_XAMLATTRIBUTE_URL_HEADER
00020 
00024 
00025 #include "XAML/XamlCore.h"
00026 
00027 #include "whiptk/attribute_url.h"
00028 #include "XAML/XamlDrawableAttributes.h"
00029 #include "XAML/XamlXML.h"
00030 
00031 class XAMLTK_API WT_XAML_Attribute_URL : public WT_Attribute_URL
00032                                                                                 , public XamlDrawableAttributes::NavigateUri::Provider
00033                                                                                 , public XamlDrawableAttributes::PathAttributeProvider
00034                                                                                 , public XamlDrawableAttributes::GlyphsAttributeProvider
00035                                                                                 , public XamlDrawableAttributes::CanvasAttributeProvider
00036 {
00037         friend class WT_XAML_Class_Factory;
00038         friend class WT_XAML_Rendition;
00039         
00040 protected:
00041 
00043 
00044     WT_XAML_Attribute_URL()
00045         : WT_Attribute_URL()
00046         , _bXamlUrlEnabled( true )
00047     { }
00048 
00050     WT_XAML_Attribute_URL(WT_Attribute &attribute)
00051                 : WT_Attribute_URL(attribute)
00052         , _bXamlUrlEnabled( true )
00053         {}
00054 
00056     WT_XAML_Attribute_URL(WT_Attribute &attribute, WT_URL_Item &item)
00057                 : WT_Attribute_URL(attribute,item)
00058         , _bXamlUrlEnabled( true )
00059         {}
00060 
00062     WT_XAML_Attribute_URL(
00063         WT_Attribute &attribute, 
00064         WT_Integer32 index, 
00065         WT_Unsigned_Integer16 const * address, 
00066         WT_Unsigned_Integer16 const * friendly_name 
00067         )
00068                 : WT_Attribute_URL(attribute,index,address,friendly_name)
00069         , _bXamlUrlEnabled( true )
00070         {}
00071 
00072     WT_XAML_Attribute_URL(const WT_Attribute_URL& url)
00073         : WT_Attribute_URL( url )
00074         , _bXamlUrlEnabled( true )
00075         {}
00076 
00077         WT_XAML_Attribute_URL(const WT_XAML_Attribute_URL& url)
00078         : _bXamlUrlEnabled( true )
00079         {
00080                 *this = url;
00081         }
00082 
00083         virtual ~WT_XAML_Attribute_URL()
00084         {}
00086 
00087         WT_Result serializeUrlList(WT_XAML_File& rFile);
00088 public:
00089 
00091     WT_XAML_Attribute_URL const & operator=(WT_XAML_Attribute_URL const & url)
00092         {
00093         _szXamlNavigateUri = url._szXamlNavigateUri;
00094                 WT_Attribute_URL::operator= (url);
00095                 return *this;
00096         }
00097 
00098     DWFString const& xamlURL() const
00099     {   return _szXamlNavigateUri;   }
00100 
00101     DWFString&       xamlURL()
00102     {   return _szXamlNavigateUri;   }
00103 
00104     const bool& xamlUrlEnabled() const
00105     { return _bXamlUrlEnabled; }
00106 
00107     bool& xamlUrlEnabled()
00108     { return _bXamlUrlEnabled; }
00109 
00110     virtual void clear()
00111     {
00112         if(_szXamlNavigateUri.bytes())
00113             _szXamlNavigateUri.destroy();
00114 
00115         WT_Attribute_URL::clear();
00116     }
00117         virtual WT_Result providePathAttributes( XamlDrawableAttributes::PathAttributeConsumer*, WT_XAML_File& ) const;
00118         virtual WT_Result provideGlyphsAttributes( XamlDrawableAttributes::GlyphsAttributeConsumer* pConsumer, WT_XAML_File& r) const;
00119         virtual WT_Result provideCanvasAttributes( XamlDrawableAttributes::CanvasAttributeConsumer*, WT_XAML_File& ) const;
00120         virtual WT_Result provideNavigateUri(XamlDrawableAttributes::NavigateUri* & rpNavigateUri);
00121 
00123         WT_Result        serialize (WT_File & file) const;
00125         WT_Result                parseAttributeList(XamlXML::tAttributeMap& rMap, WT_XAML_File& rFile);
00127 
00128 private:
00129     DWFString   _szXamlNavigateUri;
00130     bool        _bXamlUrlEnabled;
00131 };
00132 #endif //WT_XAMLATTRIBUTE_URL_HEADER

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