Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

ustyle.hpp

00001 /* ==================================================== ======== ======= *
00002  *
00003  *  ustyle.hh
00004  *  Ubit Project [Elc::2003]
00005  *  Author: Eric Lecolinet
00006  *
00007  *  Part of the Ubit Toolkit: A Brick Construction Game Model for Creating GUIs
00008  *
00009  *  (C) 1999-2003 Eric Lecolinet @ ENST Paris
00010  *  WWW: http://www.enst.fr/~elc/ubit   Email: elc@enst.fr (subject: ubit)
00011  *
00012  * ***********************************************************************
00013  * COPYRIGHT NOTICE : 
00014  * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY AND WITHOUT EVEN THE 
00015  * IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 
00016  * YOU CAN REDISTRIBUTE IT AND/OR MODIFY IT UNDER THE TERMS OF THE GNU 
00017  * GENERAL PUBLIC LICENSE AS PUBLISHED BY THE FREE SOFTWARE FOUNDATION; 
00018  * EITHER VERSION 2 OF THE LICENSE, OR (AT YOUR OPTION) ANY LATER VERSION.
00019  * SEE FILES 'COPYRIGHT' AND 'COPYING' FOR MORE DETAILS.
00020  * ***********************************************************************
00021  *
00022  * ==================================================== [Elc:03] ======= *
00023  * ==================================================== ======== ======= */
00024 
00025 #ifndef _ustyle_hh
00026 #define _ustyle_hh
00027 //pragma ident  "@(#)ustyle.hh  ubit:03.02.00"
00028 #include <ubit/ucontext.hpp>
00029 
00035 class UStyle {
00036 public:
00037   mutable ULocalProps local;
00038   mutable UFont   *font;
00039   mutable UCursor *cursor;
00040   mutable UBackground *background;
00041   mutable UColor  **fgcolors;
00042   mutable UColor  **bgcolors;
00043   mutable class UViewStyle *viewStyle;
00044   // text separator between two children when printing
00045   mutable UStr    *textSeparator;
00046   mutable char orient;
00047 
00048   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
00049 
00050   UStyle();
00051   //virtual void adapt(const class UContext*) const {}
00052 
00053   void set(const UStyle *model) {*this = *model;}
00055 
00056   const UColor* getColor(const UCtrl*) const;
00057   const UColor* getBgcolor(const UCtrl*) const;
00058 
00059   void setColors(int action, UColor&, 
00060                  bool when_unselected = true, bool when_selected = true);
00061   void setBgcolors(int action, UColor&,
00062                  bool when_unselected = true, bool when_selected = true);
00063 
00064   static UColor** makeColors(UColor *off, UColor *on);
00065   static void setColor(UColor**, int action, UColor*);
00066 };
00067 
00068 #endif
00069 /* ==================================================== [TheEnd] ======= */
00070 /* ==================================================== [Elc:03] ======= */

Generated on Thu May 19 11:39:59 2005 for Ubit[Eric.Lecolinet@enst.fr] by  doxygen 1.4.2