A GR_COLOR type is a device independent value used to define a color within nano-X.
Nano-X uses an unsigned 32 bit integer to represent colors. The lowest order three bytes define the color, while the highest order byte is always 0. This results in approximately 16 million colors that can be sopecified. The colorvalue is laid out as:
The macro GR_RGB() can be used to specify a color.If you define MWINCLUDECOLORS before inclusion of the nano-X header file.
#define MWINCLUDECOLORS #include "nano-X.h" |
Table 3-2. Basic Color Definitions
BLACK | BLUE | GREEN | CYAN | RED |
MAGENTA | BROWN | LTGRAY | LTBLUE | LTGREEN |
LTCYAN | LTRED | LTMAGENTA | YELLOW | WHITE |
DKGRAY |
The following definitions are not actually colors of GR_COLOR but they can be used with the GrGetSysColor() to retrieve a GR_COLOR type value.
Table 3-3. System Color Definitions
Color Index | Description |
---|---|
GR_COLOR_DESKTOP | Desktop background color |
GR_COLOR_ACTIVECAPTION | Active window caption color |
GR_COLOR_ACTIVECAPTIONTEXT | Active window caption text color |
GR_COLOR_INACTIVECAPTION | Inactive window caption color |
GR_COLOR_INACTIVECAPTIONTEXT | Inactive window caption text color |
GR_COLOR_WINDOWFRAME | 3-D Window frame color |
GR_COLOR_BTNSHADOW | 3-D button shadow color |
GR_COLOR_3DLIGHT | 3-D window light color |
GR_COLOR_BTNHIGHLIGHT | 3-D button highlight color |
GR_COLOR_APPWINDOW | Top level window background color |
GR_COLOR_APPTEXT | Top level window text color |
GR_COLOR_BTNFACE | Button face color |
GR_COLOR_BTNTEXT | Button text color |
GR_COLOR_WINDOW | Normal backgrouns color in a window |
GR_COLOR_WINDOWTEXT | Normal text color in a window. |
GR_COLOR_HIGHLIGHT | Highlight background color |
GR_COLOR_HIGHLIGHTTEXT | Highlighted text color |
GR_COLOR_GRAYTEXT | Grayed out text color |
GR_COLOR_MENUTEXT | Menu text color |
GR_COLOR_MENU | Menu background color |