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       int set_menu_format(MENU *menu, int rows, int cols);
11       void menu_format(const MENU *menu, int *rows, int *cols);
12

DESCRIPTION

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, post_menu
18       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

RETURN VALUE

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(3)).
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

SEE ALSO

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

NOTES

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

PORTABILITY

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

AUTHORS

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