00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _uborder_hpp_
00021 #define _uborder_hpp_
00022
00023 #include <ubit/uprop.hpp>
00024 #include <ubit/ugeom.hpp>
00025 namespace ubit {
00026
00027
00030 class UBorder : public UProp {
00031 public:
00032 UBIT_ATTR_CLASS(UBorder, UProp)
00033
00034 enum {NONE, LINE, SHADOW, ETCHED, BIGSHADOW};
00036
00037 static UBorder none, empty,
00038 line, shadowIn, shadowOut, etchedIn, etchedOut;
00040
00041 UBorder(int decoration = NONE);
00042 UBorder(int decoration, const UColor& color, const UColor& bgcolor,
00043 int hmargins = 1, int vmargins = 1, UMask = 0);
00053 UBorder(const UBorder&);
00055
00056 UBorder(const UArgs& children);
00058
00059 virtual ~UBorder();
00060
00061 UBorder& operator=(const UBorder&);
00062
00063 UBorder& addlist(const UArgs&);
00064 UBorder& addlist(bool is_overlaid, const UArgs&);
00065
00066
00067
00068 int getDecoration() const {return decoration;}
00069 UBorder& setDecoration(int decoration);
00070
00071 const UColor& getColor() const {return *pcolor;}
00072 UBorder& setColor(const UColor&);
00074
00075 const UColor& getBgcolor() const {return *pbgcolor;}
00076 UBorder& setBgcolor(const UColor&);
00078
00079 int getThickness() const {return thickness;}
00080 UBorder& setThickness(int);
00081
00082 const UMargins& getMargins() const {return margins;}
00083 UBorder& setMargins(const UMargins&);
00084
00085 virtual UGroup* getSubGroup() {return pchildren;}
00087
00088 bool isSuperimposed() const {return is_superimposed;}
00090
00091
00092
00093 virtual void update();
00094 virtual void putProp(UContext*, UControl*);
00095
00096 virtual void paint(UGraph&, const UContext&, const URegion& r) const;
00097 virtual void getSize(const UContext&, UMargins&) const;
00098
00099 #ifndef NO_DOC
00100 protected:
00101 short decoration, thickness;
00102 bool is_superimposed;
00103 UMargins margins;
00104 uptr<const UColor> pcolor, pbgcolor;
00105 uptr<UGroup> pchildren;
00106 virtual void constructs(int decoration, const UColor& _color, const UColor& _bgcolor);
00107 #endif
00108 };
00109
00110 }
00111 #endif
00112
00113