backgrnd.h

Go to the documentation of this file.
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 #if !defined BACKGRND_HEADER
00020 #define BACKGRND_HEADER
00021 
00025 
00026 #include "whiptk/whipcore.h"
00027 #include "whiptk/attribute.h"
00028 #include "whiptk/color.h"
00029 
00030 class WT_File;
00031 
00036 
00037 
00044 class WHIPTK_API WT_Background : public WT_Attribute
00045 {
00046 private:
00047     WT_Color        m_color;
00048     enum
00049     {
00050         Getting_Color,
00051         Getting_Close_Paren
00052     } m_stage;
00053 
00054 public:
00055 
00057 
00058     WT_Background()
00059         : m_color(0,0,0,255)
00060         , m_stage(Getting_Color)
00061     { }
00062 
00064     WT_Background(const WT_Color& color)
00065         : m_color(color)
00066         , m_stage(Getting_Color)
00067     { }
00068 
00069         virtual ~WT_Background()
00070         {}
00072 
00073 public:
00075     WT_ID            object_id() const;
00076     WT_Result        materialize(WT_Opcode const & opcode, WT_File & file);
00077     WT_Result        process(WT_File & file);
00078     WT_Result        skip_operand(WT_Opcode const & opcode, WT_File & file);
00079     WT_Result        serialize (WT_File & file) const;
00080     WT_Result        sync (WT_File & file) const;
00081     WT_Boolean       operator== (WT_Attribute const & attrib) const;
00083 
00085 
00086     virtual void       set(
00087         WT_Color const & color 
00088         );
00090     const WT_Color&   color() const
00091         ;
00093 
00095 
00097     static WT_Result default_process(
00098         WT_Background & item, 
00099         WT_File & file 
00100         );
00101 };
00102 
00104 
00105 #endif // BACKGRND_HEADER

Generated on Tue Jan 6 22:41:12 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5