1menu_format(3X)                                                menu_format(3X)
2
3
4

NAME

6       set_menu_format, menu_format - set and get menu sizes
7

SYNOPSIS

9       #include <menu.h>
10
11       int set_menu_format(MENU *menu, int rows, int cols);
12       void menu_format(const MENU *menu, int *rows, int *cols);
13

DESCRIPTION

15       The function set_menu_format sets the maximum display size of the given
16       menu.  If this size is too small to display all menu  items,  the  menu
17       will be made scrollable.  If this size is larger than the menus subwin‐
18       dow and the subwindow is too small to display all menu items, post_menu
19       will fail.
20
21       The  default format is 16 rows, 1 column.  Calling set_menu_format with
22       a null menu pointer will change this default.  A zero row or column ar‐
23       gument to set_menu_format is interpreted as a request not to change the
24       current value.
25
26       The function menu_format returns the maximum-size constraints  for  the
27       given menu into the storage addressed by rows and cols.
28

RETURN VALUE

30       These routines returns one of the following:
31
32       E_OK The routine succeeded.
33
34       E_SYSTEM_ERROR
35            System error occurred (see errno(3)).
36
37       E_BAD_ARGUMENT
38            Routine detected an incorrect or out-of-range argument.
39
40       E_POSTED
41            The menu is already posted.
42
43       E_NOT_CONNECTED
44            No items are connected to the menu.
45

SEE ALSO

47       curses(3X), menu(3X).
48

NOTES

50       The  header  file  <menu.h>  automatically  includes  the  header  file
51       <curses.h>.
52

PORTABILITY

54       These routines emulate the System V menu library.  They were  not  sup‐
55       ported on Version 7 or BSD versions.
56

AUTHORS

58       Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric S.
59       Raymond.
60
61
62
63                                                               menu_format(3X)
Impressum