1menu_format(3X) menu_format(3X)
2
3
4
6 menu_format - set and get menu sizes
7
9 #include <menu.h>
10 int set_menu_format(MENU *menu, int rows, int cols);
11 void menu_format(const MENU *menu, int *rows, int *cols);
12
14 The function set_menu_format sets the maximum display size of the given
15 menu. If this size is too small to display all menu items, the menu
16 will be made scrollable. If this size is larger than the menus subwin‐
17 dow and the subwindow is too small to display all menu items,
18 post_menu() will fail.
19
20 The default format is 16 rows, 1 column. Calling set_menu_format with
21 a null menu pointer will change this default. A zero row or column
22 argument to set_menu_format is interpreted as a request not to change
23 the current value.
24
25 The function menu_format returns the maximum-size constraints for the
26 given menu into the storage addressed by rows and cols.
27
29 These routines returns one of the following:
30
31 E_OK The routine succeeded.
32
33 E_SYSTEM_ERROR
34 System error occurred (see errno).
35
36 E_BAD_ARGUMENT
37 Routine detected an incorrect or out-of-range argument.
38
39 E_POSTED
40 The menu is already posted.
41
42 E_NOT_CONNECTED
43 No items are connected to the menu.
44
46 curses(3X), menu(3X).
47
49 The header file <menu.h> automatically includes the header file
50 <curses.h>.
51
53 These routines emulate the System V menu library. They were not sup‐
54 ported on Version 7 or BSD versions.
55
57 Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S.
58 Raymond.
59
60
61
62 menu_format(3X)