00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#ifndef _ucolor_h
00026
#define _ucolor_h
00027
00028
#include <ubit/uprop.hpp>
00029
00032 class UColor :
public UProp {
00033
public:
00035
static UColor none,
inherit,
white,
black,
grey,
lightgrey,
darkgrey,
00036
navy,
blue,
red,
green,
yellow,
lightyellow,
orange,
wheat,
teal,
00037
disabled;
00038
00039
00040
00041
UColor();
00043
00044
UColor(
const UColor&);
00046
00047
UColor(
const char *color_spec);
00048
UColor(
const UStr& color_spec);
00053
00054
00055
00056
friend UColor& ucolor(
const UColor& c) {
return *
new UColor(c);}
00057
friend UColor& ucolor(
const char* c) {
return *
new UColor(c);}
00058 friend UColor& ucolor(
const UStr& c) {
return *
new UColor(c);}
00060
00061 ~
UColor();
00062
00063
00064
00065
UColor& operator=(
const UColor&);
00067
00068
virtual void set(
const UColor&);
00069
virtual void set(
const char* color_spec);
00070
virtual void set(
const UStr& color_spec);
00072
00073
virtual bool equals(
const UColor&) const;
00075
00076
00078
00079 const
char* getCharSpec() const;
00081
00082
00083
00084 virtual
void update();
00086
00087
bool realize(class
UDisp*);
00095 #ifndef NO_DOC
00096
00097
00098
00099
UColor(const
UColor&, u_modes);
00100 UColor(class UColorImpl*, u_modes);
00101
00102 UColorImpl& getImpl()
const {
return *ci;}
00103
virtual void putProp(
class UContext*,
class UCtrl*);
00104
00105
protected:
00106 uptr<class UColorImpl> ci;
00107
#endif
00108
};
00109
00110
00111
00112
00115 class UBgcolor :
public UColor {
00116
public:
00117
static UBgcolor none,
inherit,
white,
black,
grey,
lightgrey,
darkgrey,
00118
navy,
blue,
red,
green,
yellow,
lightyellow,
orange,
wheat,
teal;
00120
00121
00122
00123
UBgcolor();
00124
UBgcolor(
const UColor&);
00125
UBgcolor(
const char* color_spec);
00126
UBgcolor(
const UStr& color_spec);
00128
00129
friend UBgcolor& ubgcolor(
const UColor& c) {
return *
new UBgcolor(c);}
00130
friend UBgcolor& ubgcolor(
const char* c) {
return *
new UBgcolor(c);}
00131 friend UBgcolor& ubgcolor(
const UStr& c) {
return *
new UBgcolor(c);}
00133
00134
UBgcolor& operator=(
const UColor&);
00136
00137
#ifndef NO_DOC
00138
00139
00140
00141
UBgcolor(
const UColor&, u_modes);
00142
UBgcolor(
class UColorImpl*, u_modes);
00143
00144
virtual void putProp(
class UContext*,
class UCtrl*);
00145
#endif
00146
};
00147
00148
00149
#endif
00150
00151
00152