menuformat(3X) menuformat(3X)
NAME
menuformat - set and get menu sizes
SYNOPSIS
##include <>
int setmenuformat(MENU *menu, int rows, int cols);
void menuformat(const MENU *menu, int *rows, int *cols);
DESCRIPTION
The function setmenuformat sets the maximum display size of the given
menu. If this size is too small to display all menu items, the menu
will be made scrollable. If this size is larger than the menus subwin-
dow and the subwindow is too small to display all menu items,
postmenu() will fail.
The default format is 16 rows, 1 column. Calling setmenuformat with
a null menu pointer will change this default. A zero row or column
argument to setmenuformat is interpreted as a request not to change
the current value.
The function menuformat returns the maximum-size constraints for the
given menu into the storage addressed by rows and cols.
RETURN VALUE
These routines returns one of the following:
EOK The routine succeeded.
ESYSTEMEROR
System error occurred (see errno).
EBADARGUMENT
Routine detected an incorrect or out-of-range argument.
EPOSTED
The menu is already posted.
SEE ALSO
curses(3X), menu(3X).
NOTES
The header file <> automatically includes the header file
<>.
PORTABILITY
These routines emulate the System V menu library. They were not sup-
ported on Version 7 or BSD versions.
AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S.
Raymond.
menuformat(3X)
|