drawable.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 DRAWABLE_HEADER
00020 #define DRAWABLE_HEADER
00021 
00025 
00026 #include "whiptk/whipcore.h"
00027 #include "whiptk/object.h"
00028 #include "whiptk/file.h"
00029 
00031 class WHIPTK_API WT_Drawable : public WT_Object
00032 {
00033         friend class WT_File;
00034         friend class WT_Class_Factory;
00035 
00036 protected:
00037     WT_Logical_Box    m_bounds; 
00038     WT_Boolean        m_bounds_set; 
00040 protected:
00041 
00043 
00044     WT_Drawable ()
00045     : m_bounds_set(WD_False)
00046     {
00047     }
00048 
00050     virtual ~WT_Drawable ()
00051     { }
00053 public:
00055     WT_Logical_Box  bounds(
00056         WT_File * file=NULL 
00057         );
00058 
00060 
00061 
00067     virtual    WT_Result       delay(WT_File & file) const;
00069 
00074     virtual    WT_Result       dump(
00075         WT_File & file 
00076         ) const;
00077 
00079     virtual    WT_Type         object_type() const;
00080 
00082 
00084     virtual    WT_Boolean      merge(WT_Drawable const & current);
00086     virtual    void            update_bounds(WT_File * file);
00088 
00089 protected:
00091     void update_bounds(const WT_Logical_Point& pt, WT_File * file=NULL);
00093     void update_bounds(const WT_Point_Set_Data& set, WT_File * file=NULL);
00095     void update_bounds(const WT_Logical_Point*, int count, WT_File * file=NULL);
00096 };
00097 
00098 #endif // DRAWABLE_HEADER

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