XamlUserFillPattern.h

Go to the documentation of this file.
00001 //  Copyright (c) 2006 by Autodesk, Inc.
00002 //
00003 //  By using this code, you are agreeing to the terms and conditions of
00004 //  the License Agreement included in the documentation for this code.
00005 //
00006 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
00007 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00008 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00009 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00010 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00011 //
00012 //  Use, duplication, or disclosure by the U.S. Government is subject to
00013 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00014 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00015 //  Data and Computer Software), as applicable.
00016 //
00017 
00018 #if !defined XAML_USER_FILL_PATTERN_HEADER
00019 #define XAML_USER_FILL_PATTERN_HEADER
00020 
00024 
00025 #include "XAML/XamlCore.h"
00026 
00027 #include "whiptk/usrfillpat.h"
00028 #include "XAML/XamlDrawableAttributes.h"
00029 #include "XAML/XamlXML.h"
00030 
00039 
00040 class XAMLTK_API WT_XAML_User_Fill_Pattern :
00041     public WT_User_Fill_Pattern,
00042     public XamlDrawableAttributes::PathAttributeProvider,
00043     public XamlDrawableAttributes::Fill::Provider
00044 {
00045     friend class WT_XAML_Class_Factory;
00046     friend class WT_XAML_Rendition;
00047 
00048 private :
00049 
00050     WT_XAML_File *_pSerializeFile;                          // serialized file, !=0
00051 
00052 protected:
00054 
00056     WT_XAML_User_Fill_Pattern()
00057     : WT_User_Fill_Pattern(),  // important: -1 means "does not exist", which is the default state
00058       _pSerializeFile( NULL )
00059     {
00060     }
00061 
00063     WT_XAML_User_Fill_Pattern (WT_Integer16 pattern_num)
00064     : WT_User_Fill_Pattern(pattern_num),
00065       _pSerializeFile( NULL )
00066     {
00067     }
00068     
00070     WT_XAML_User_Fill_Pattern (
00071             WT_Integer16    pattern_num, 
00072             WT_Unsigned_Integer16    rows, 
00073             WT_Unsigned_Integer16    columns, 
00074                         WT_Unsigned_Integer32    data_size, 
00075             WT_Byte const *          data) 
00076         : WT_User_Fill_Pattern(pattern_num,rows,columns,data_size,data),
00077       _pSerializeFile( NULL )
00078         {
00079     }
00080         
00082     WT_XAML_User_Fill_Pattern (
00083             WT_Integer16    pattern_num, 
00084             Fill_Pattern * fill_pattern
00085             )
00086     : WT_User_Fill_Pattern(pattern_num,fill_pattern),
00087       _pSerializeFile( NULL )
00088         {
00089     }
00090 
00092     WT_XAML_User_Fill_Pattern(WT_User_Fill_Pattern const &other)
00093     : WT_User_Fill_Pattern(other),
00094     _pSerializeFile( NULL)
00095     {
00096     }
00097     
00099     virtual ~WT_XAML_User_Fill_Pattern()
00100         {
00101     }
00102 
00104 public:
00105 
00107         WT_XAML_User_Fill_Pattern const & operator =(WT_XAML_User_Fill_Pattern const & other)
00108         {
00109                 WT_User_Fill_Pattern::operator = (other);
00110                 return *this;
00111         }
00112         
00113     //
00114     // from XamlDrawableAttributes::PathAttributeProvider
00115     //
00116     virtual WT_Result providePathAttributes(
00117         XamlDrawableAttributes::PathAttributeConsumer *,    // consumer, != 0
00118         WT_XAML_File &) const;                      // current file
00119 
00120     //
00121     // from XamlDrawableAttributes::Fill::Provider
00122     //
00123     virtual WT_Result provideFill(
00124         XamlDrawableAttributes::Fill *&);               // memento, may be null
00125 
00127     WT_Result        serialize (WT_File & /*file*/) const;
00129         WT_Result                parseAttributeList(XamlXML::tAttributeMap& rMap, WT_XAML_File& rFile);
00131 };
00133 
00134 #endif //XAML_USER_FILL_PATTERN_HEADER

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