void set_control_background(Control *c, Colour col); Colour get_control_background(Control *c); void set_control_foreground(Control *c, Colour col); Colour get_control_foreground(Control *c); void set_control_image(Control *c, Image *img); Image * get_control_image(Control *c); void set_control_font(Control *c, Font *f); Font * get_control_font(Control *c);
When a control or window is drawn on the screen, its rectangle is first automatically cleared by filling it with its background colour (unless it is set to be the special value CLEAR).
The set_control_background function takes a Colour value as a parameter and sets the background colour of the control to that value. The background colour is returned by get_control_background.
After the background is drawn, the foreground colour is used in some places to draw text and other features of a control. The set_control_foreground and get_control_foreground functions access this foreground colour. It is not guaranteed that the foreground colour will be used by all controls (for example, image labels draw images and don't need to use a foreground colour, while buttons do use the foreground colour when drawing text).
For controls which display an image, the set_control_image can be used to change the image displayed, and get_control_image returns the current image used.
For controls which display text, the set_control_font can be used to change the font used, and get_control_font returns the current font used.