|
|
Menu display attributes are visible menu characteristics that distinguish classes of menu items from each other. Low-level ETI (curses) video attributes are used to differentiate the menu display attributes. These menu display attributes include
SYNOPSIS
int set_menu_fore (menu, attr) MENU menu; chtype attr;In general, to establish uniformity throughout your program, you should set the menu display attributes with these functions at the start of the program.chtype menu_fore (menu) MENU menu;
int set_menu_back (menu, attr) MENU menu; chtype attr;
chtype menu_back (menu) MENU menu;
int set_menu_grey (menu, attr) MENU menu; chtype attr;
chtype menu_grey (menu) MENU menu;
int set_menu_pad (menu, pad) MENU menu; int pad;
int menu_pad (menu) MENU menu;
Function set_menu_fore sets the curses foreground attribute. The default is A_STANDOUT.
Function set_menu_back sets the curses background attribute. The default is A_NORMAL.
Function set_menu_grey sets the curses attribute used to display nonselectable items in multi-valued menus. The default is A_UNDERLINE.
To set the foreground attribute of menu m to A_BOLD and its background attribute to A_DIM, you write
MENU *m;All these functions can change or fetch the current default if passed a NULL menu pointer. As an example, to set the default grey attribute to A_NORMAL, you writeset_menu_fore(m,A_BOLD); set_menu_back(m,A_DIM);
set_menu_grey((MENU *)0, A_NORMAL);If functions set_menu_fore, set_menu_back, and set_menu_grey encounter an error, they return one of the following:
To change the pad character for menu m to a dot (.), you write
MENU * m;If function set_menu_pad encounters an error, it returns one of the following:set_menu_pad(m,'.');