7.1 About color

7.1.3 The color registry

The Window Tool Kit provides two ways to access the system color map:

When a color is registered in the color registry, it is automatically set into the next available entry in the system color map. All Window Tool Kit functions that accept a color as an argument accept the symbol or string representation of the registered color or the number of the entry in the system color map.

One registered color can use the same system color map entry as another registered color if the color components of the first registered color are within a specified delta of those of the second registered color. The delta of a color is the amount that it differs from its defined value. You can specify this flexibility when registering colors if you wish to conserve space in the system color map.

Using registered colors protects you from accidentally changing a color in the system color map because you must explicitly delete registered colors to reuse the associated system color map entry. The color registry simplifies and protects your use of the color system, while direct system color map access functions allow you to affect the color map with more control.


The Window Tool Kit - 9 SEP 1996

Generated with Harlequin WebMaker