1menu_win(3X) menu_win(3X)
2
3
4
6 menu_win - make and break menu window and subwindow associations
7
9 #include <menu.h>
10
11 int set_menu_win(MENU *menu, WINDOW *win);
12 WINDOW *menu_win(const MENU *menu);
13
14 int set_menu_sub(MENU *menu, WINDOW *sub);
15 WINDOW *menu_sub(const MENU *menu);
16
17 int scale_menu(const MENU *menu, int *rows, int *columns);
18
20 Every menu has an associated pair of curses windows. The menu window
21 displays any title and border associated with the window; the menu sub‐
22 window displays the items of the menu that are currently available for
23 selection.
24
25 The first four functions get and set those windows. It is not neces‐
26 sary to set either window; by default, the driver code uses stdscr for
27 both.
28
29 In the set_ functions, window argument of NULL is treated as though it
30 were stsdcr. A menu argument of NULL is treated as a request to change
31 the system default menu window or subwindow.
32
33 The function scale_menu returns the minimum size required for the sub‐
34 window of menu.
35
37 Routines that return pointers return NULL on error. Routines that re‐
38 turn an integer return one of the following error codes:
39
40 E_OK The routine succeeded.
41
42 E_SYSTEM_ERROR
43 System error occurred (see errno(3)).
44
45 E_BAD_ARGUMENT
46 Routine detected an incorrect or out-of-range argument.
47
48 E_POSTED
49 The menu has already been posted.
50
51 E_NOT_CONNECTED
52 No items are connected to the menu.
53
55 curses(3X), curs_variables(3X), menu(3X).
56
58 The header file <menu.h> automatically includes the header file
59 <curses.h>.
60
62 These routines emulate the System V menu library. They were not sup‐
63 ported on Version 7 or BSD versions.
64
66 Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S.
67 Raymond.
68
69
70
71 menu_win(3X)