#include <ucolor.hpp>
Inheritance diagram for ubit::UColor:
Public Member Functions | |
UColor (const UColor &) | |
UColor (int r, int g, int b) | |
UColor (const char *color_spec) | |
UColor (const UStr &color_spec) | |
creates a new color object. | |
UColor & | operator= (const UColor &c) |
virtual void | set (const UColor &) |
virtual void | set (int r, int g, int b) |
virtual void | set (const char *color_spec) |
virtual void | set (const UStr &color_spec) |
changes color. | |
bool | operator== (const UColor &c) const |
bool | operator!= (const UColor &c) const |
virtual bool | equals (const UColor &) const |
virtual void | update () |
update parents' graphics. | |
bool | realize (UDisp *) |
[impl] allocates physical resources on this display. | |
Static Public Attributes | |
static UColor | none |
predefined color constants. | |
static UColor | inherit |
static UColor | white |
static UColor | black |
static UColor | grey |
static UColor | lightgrey |
static UColor | darkgrey |
static UColor | navy |
static UColor | lightblue |
static UColor | blue |
static UColor | red |
static UColor | green |
static UColor | yellow |
static UColor | orange |
static UColor | wheat |
static UColor | teal |
static UColor | disabled |
Friends | |
UColor & | ucolor (const UColor &c) |
UColor & | ucolor (int r, int g, int b) |
UColor & | ucolor (const char *c) |
UColor & | ucolor (const UStr &c) |
creator shortcut that is equivalent to: *new UColor(). |
this property specifies the foreground color of a container. It is inherited by children, except if they have their own UColor property, or if their UStyle specifies that they don't inherit UColor.
As for other properties, a UColor object should be added to the attribute list of containers. It can also be inserted in the child list in which case it takes effect on the following children.
ubit::UColor::UColor | ( | const UStr & | color_spec | ) |
creates a new color object.
default value is black. arguments are specified as follows:
bool ubit::UColor::realize | ( | UDisp * | ) |
[impl] allocates physical resources on this display.
this function is called when the color is used for the first time. There no need to call it explicitely except for loading colors in advance. Note: the UAppli can be given as an argument.