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

uborder.hpp

00001 /* ==================================================== ======== ======= * 00002 * 00003 * uborder.hpp 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 _uborder_hpp_ 00026 #define _uborder_hpp_ 00027 //pragma ident "@(#)uborder.hpp ubit:03.05.00" 00028 #include <ubit/uprop.hpp> 00029 00030 /* ==================================================== [Elc:03] ======= */ 00031 /* ==================================================== ======== ======= */ 00034 struct UMargins { 00035 short top, right, bottom, left; 00036 00037 UMargins() {} 00038 UMargins(short _top_bottom, short _left_right); 00039 UMargins(short _top, short _right, short _bottom, short _left); 00040 00041 void set(short _top_bottom, short _left_right); 00042 void set(short _top, short _right, short _bottom, short _left); 00043 void incr(const UMargins&); 00044 }; 00045 00046 /* ==================================================== [Elc:03] ======= */ 00047 /* ==================================================== ======== ======= */ 00050 class UBorder : public UProp { 00051 public: 00052 enum {NONE=0, FLAT, SHADOW, ETCHED}; 00054 00055 static UBorder 00056 none, empty, flat, shadowIn, shadowOut, etchedIn, etchedOut; 00058 00059 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 00060 00061 UBorder(int decoration = -ETCHED); 00062 UBorder(int decoration, class UColor& color, class UColor& bgcolor, 00063 int top_bottom_margin = 1, int left_right_margin = 1, u_modes = 0); 00075 UBorder(const UBorder&); 00077 00078 UBorder(bool overlaid, const UArgs&); 00080 00081 virtual ~UBorder(); 00082 00083 UBorder& operator=(const UBorder&); 00084 00085 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 00086 00087 bool isOverlaid() const {return overlaid;} 00088 00089 UColor& bgcolor() {return *pbgcolor;} 00090 UColor& color() {return *pcolor;} 00099 const UColor& getBgcolor() const {return *pbgcolor;} 00100 const UColor& getColor() const {return *pcolor;} 00101 00102 int getDecoration() const; 00103 void setDecoration(int decoration); 00104 00105 const UMargins& getMargins() const; 00106 void setMargins(const class UMargins&); 00107 00108 virtual class UGroup* getSubGroup() {return psubgroup;} 00110 00111 virtual void update(); 00112 00113 #ifndef NO_DOC 00114 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 00115 // implementation 00116 00117 virtual void putProp(class UContext*, class UCtrl*); 00118 virtual void getSize(const UContext&, class UMargins&) const; 00119 virtual void paint(class UWinGraph&, const UContext&, const URegion &r) const; 00120 00121 protected: 00122 int decoration; 00123 bool overlaid; 00124 UMargins margins; 00125 uptr<class UColor> pcolor, pbgcolor; 00126 uptr<class UGroup> psubgroup; 00127 00128 virtual void constructs(int decoration, UColor& _color, UColor& _bgcolor); 00129 #endif 00130 }; 00131 00132 #endif 00133 /* ==================================================== [TheEnd] ======= */ 00134 /* ==================================================== [Elc:03] ======= */

Generated on Wed Aug 18 07:38:55 2004 for Ubit[Eric.Lecolinet@enst.fr] by doxygen 1.3.7