1menu_win(3X)                                                      menu_win(3X)
2
3
4

NAME

6       menu_win - make and break menu window and subwindow associations
7

SYNOPSIS

9       #include <menu.h>
10       int set_menu_win(MENU *menu, WINDOW *win);
11       WINDOW *menu_win(const MENU *menu);
12       int set_menu_sub(MENU *menu, WINDOW *sub);
13       WINDOW *menu_sub(const MENU *menu);
14       int scale_menu(const MENU *menu, int *rows, int *columns);
15

DESCRIPTION

17       Every  menu  has an associated pair of curses windows.  The menu window
18       displays any title and border associated with the window; the menu sub‐
19       window  displays the items of the menu that are currently available for
20       selection.
21
22       The first four functions get and set those windows.  It is  not  neces‐
23       sary  to set either window; by default, the driver code uses stdscr for
24       both.
25
26       In the set_ functions, window argument of NULL is treated as though  it
27       were stsdcr.  A menu argument of NULL is treated as a request to change
28       the system default menu window or subwindow.
29
30       The function scale_menu returns the minimum size required for the  sub‐
31       window of menu.
32

RETURN VALUE

34       Routines  that  return  pointers  return  NULL on error.  Routines that
35       return an integer return one of the following error codes:
36
37       E_OK The routine succeeded.
38
39       E_SYSTEM_ERROR
40            System error occurred (see errno).
41
42       E_BAD_ARGUMENT
43            Routine detected an incorrect or out-of-range argument.
44
45       E_POSTED
46            The menu has already been posted.
47
48       E_NOT_CONNECTED
49            No items are connected to the menu.
50

SEE ALSO

52       curses(3X), curs_variables(3X), menu(3X).
53

NOTES

55       The  header  file  <menu.h>  automatically  includes  the  header  file
56       <curses.h>.
57

PORTABILITY

59       These  routines  emulate the System V menu library.  They were not sup‐
60       ported on Version 7 or BSD versions.
61

AUTHORS

63       Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric S.
64       Raymond.
65
66
67
68                                                                  menu_win(3X)
Impressum