|
|
The following functions enable you to set and read the pad character and the low-level ETI (curses) attributes associated with your field's foreground and background. The foreground attribute applies only to those field characters that represent data proper, while the background attribute applies to the entire field.
SYNOPSIS
int set_field_fore (field, attr) FIELD field; chtype attr;The initial default for both the foreground and background are A_NORMAL. (See ``Output attributes'' and the curses(3ocurses) pages for more on screen attributes.) The pad character is the character displayed wherever a blank occurs in the field value stored in field buffer 0.chtype field_fore (field) FIELD field;
int set_field_back (field, attr) FIELD field; chtype attr;
chtype field_back (field) FIELD field;
int set_field_pad (field, pad) FIELD field; int pad;
int field_pad (field) FIELD field;
As an example, to change the background of a field total to A_UNDERLINE and A_STANDOUT, you write:
FIELD * total;set_field_back (total, A_UNDERLINE | A_STANDOUT);
If function set_field_fore or set_field_back encounter an error, they return one of the following:
To set the pad character for field total to an asterisk (*), you write:
FIELD * total;If successful, function set_field_pad returns E_OK. If not, it returns one of the following:set_field_pad (total, '*');
set_field_back ((FIELD *) 0, A_UNDERLINE);