udata.hpp

00001 /* ==================================================== ======== ======= *
00002  *
00003  *  udata.hpp
00004  *  Ubit Project
00005  *  Part of the Ubit Toolkit: A Brick Construction Game Model for Creating GUIs
00006  *  (C) 1999-2006 / Eric Lecolinet / ENST Paris / http://www.enst.fr/~elc/ubit
00007  *
00008  * ***********************************************************************
00009  * COPYRIGHT NOTICE : 
00010  * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY AND WITHOUT EVEN THE 
00011  * IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 
00012  * YOU CAN REDISTRIBUTE IT AND/OR MODIFY IT UNDER THE TERMS OF THE GNU 
00013  * GENERAL PUBLIC LICENSE AS PUBLISHED BY THE FREE SOFTWARE FOUNDATION; 
00014  * EITHER VERSION 2 OF THE LICENSE, OR (AT YOUR OPTION) ANY LATER VERSION.
00015  * SEE FILES 'COPYRIGHT' AND 'COPYING' FOR MORE DETAILS.
00016  * ***********************************************************************
00017  * ==================================================== [(c)Elc] ======= *
00018  * ==================================================== ======== ======= */
00019 
00020 #ifndef _udata_hpp_
00021 #define _udata_hpp_
00022 #include <ubit/ubrick.hpp>
00023 //pragma ident  "@(#)udata.hpp  ubit:05.05.00"
00024 namespace ubit {
00025 
00026 /* ==================================================== ======== ======= */
00036 class UData: public UBrick {
00037 public:
00038   UData(UMask b_modes = 0): UBrick(b_modes) {};
00039 
00040   virtual class UData* dataCast() {return this;}
00042 
00043   virtual const UClass& getClass() const = 0;
00044 
00045   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
00046 
00047   virtual UData& onChange(UCall&);
00052   virtual void changed(bool update = true);
00058   virtual void update() = 0;
00060 
00061   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
00062 #ifndef NO_DOC
00063   friend class UArgs;
00064   friend class UBox;
00065   virtual void getSize(UContext&, int& w, int& h) const = 0;
00066   virtual void paint(UGraph&, UContext&, const URegion &r) const = 0;
00067 #endif
00068 };
00069 }
00070 #endif
00071 /* ==================================================== [TheEnd] ======= */
00072 /* ==================================================== [(c)Elc] ======= */

Generated on Mon Jan 29 00:20:37 2007 for Ubit by  doxygen 1.4.7