4 <!-- Manpage converted by man2html 3.0.1 -->
8 <B>menu</B> - curses extension for programming menus
12 <H2>SYNOPSIS</H2><PRE>
13 <B>#include</B> <B><menu.h></B>
17 <H2>DESCRIPTION</H2><PRE>
18 The <B>menu</B> library provides terminal-independent facilities
19 for composing menu systems on character-cell terminals.
20 The library includes: item routines, which create and mod-
21 ify menu items; and menu routines, which group items into
22 menus, display menus on the screen, and handle interaction
25 The <B>menu</B> library uses the <B>curses</B> libraries, and a curses
26 initialization routine such as <B>initscr</B> must be called
27 before using any of these functions. To use the <B>menu</B>
28 library, link with the options <B>-lmenu</B> <B>-lcurses</B>.
31 <B>Current</B> <B>Default</B> <B>Values</B> <B>for</B> <B>Item</B> <B>Attributes</B>
32 The <B>menu</B> library maintains a default value for item
33 attributes. You can get or set this default by calling
34 the appropriate <B>get_</B> or <B>set_</B> routine with a <B>NULL</B> item
35 pointer. Changing this default with a <B>set_</B> function
36 affects future item creations, but does not change the
37 rendering of items already created.
40 <B>Routine</B> <B>Name</B> <B>Index</B>
41 The following table lists each <B>menu</B> routine and the name
42 of the manual page on which it is described.
44 <B>curses</B> Routine Name Manual Page Name
45 --------------------------------------------
46 current_item <B><A HREF="mitem_current.3x.html">mitem_current(3x)</A></B>
47 free_item <B><A HREF="mitem_new.3x.html">mitem_new(3x)</A></B>
48 free_menu <B><A HREF="menu_new.3x.html">menu_new(3x)</A></B>
49 item_count <B><A HREF="menu_items.3x.html">menu_items(3x)</A></B>
50 item_description <B><A HREF="mitem_name.3x.html">mitem_name(3x)</A></B>
51 item_index <B><A HREF="mitem_current.3x.html">mitem_current(3x)</A></B>
52 item_init <B><A HREF="menu_hook.3x.html">menu_hook(3x)</A></B>
53 item_name <B><A HREF="mitem_name.3x.html">mitem_name(3x)</A></B>
54 item_opts <B><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></B>
55 item_opts_off <B><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></B>
56 item_opts_on <B><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></B>
57 item_term <B><A HREF="menu_hook.3x.html">menu_hook(3x)</A></B>
58 item_userptr <B><A HREF="mitem_userptr.3x.html">mitem_userptr(3x)</A></B>
59 item_value <B><A HREF="mitem_value.3x.html">mitem_value(3x)</A></B>
60 item_visible <B><A HREF="mitem_visible.3x.html">mitem_visible(3x)</A></B>
61 menu_back <B><A HREF="menu_attribs.3x.html">menu_attribs(3x)</A></B>
62 menu_driver <B><A HREF="menu_driver.3x.html">menu_driver(3x)</A></B>
63 menu_fore <B><A HREF="menu_attribs.3x.html">menu_attribs(3x)</A></B>
65 menu_format <B><A HREF="menu_format.3x.html">menu_format(3x)</A></B>
66 menu_grey <B><A HREF="menu_attribs.3x.html">menu_attribs(3x)</A></B>
67 menu_init <B><A HREF="menu_hook.3x.html">menu_hook(3x)</A></B>
68 menu_items <B><A HREF="menu_items.3x.html">menu_items(3x)</A></B>
69 menu_mark <B><A HREF="menu_mark.3x.html">menu_mark(3x)</A></B>
70 menu_opts <B><A HREF="menu_opts.3x.html">menu_opts(3x)</A></B>
71 menu_opts_off <B><A HREF="menu_opts.3x.html">menu_opts(3x)</A></B>
72 menu_opts_on <B><A HREF="menu_opts.3x.html">menu_opts(3x)</A></B>
73 menu_pad <B><A HREF="menu_attribs.3x.html">menu_attribs(3x)</A></B>
74 menu_pattern <B><A HREF="menu_pattern.3x.html">menu_pattern(3x)</A></B>
75 menu_request_by_name <B><A HREF="menu_requestname.3x.html">menu_requestname(3x)</A></B>
76 menu_request_name <B><A HREF="menu_requestname.3x.html">menu_requestname(3x)</A></B>
77 menu_spacing <B><A HREF="menu_spacing.3x.html">menu_spacing(3x)</A></B>
78 menu_sub <B><A HREF="menu_win.3x.html">menu_win(3x)</A></B>
79 menu_term <B><A HREF="menu_hook.3x.html">menu_hook(3x)</A></B>
80 menu_userptr <B><A HREF="menu_userptr.3x.html">menu_userptr(3x)</A></B>
81 menu_win <B><A HREF="menu_win.3x.html">menu_win(3x)</A></B>
82 new_item <B><A HREF="mitem_new.3x.html">mitem_new(3x)</A></B>
83 new_menu <B><A HREF="menu_new.3x.html">menu_new(3x)</A></B>
84 pos_menu_cursor <B><A HREF="menu_cursor.3x.html">menu_cursor(3x)</A></B>
85 post_menu <B><A HREF="menu_post.3x.html">menu_post(3x)</A></B>
86 scale_menu <B><A HREF="menu_win.3x.html">menu_win(3x)</A></B>
87 set_current_item <B><A HREF="mitem_current.3x.html">mitem_current(3x)</A></B>
88 set_item_init <B><A HREF="menu_hook.3x.html">menu_hook(3x)</A></B>
89 set_item_opts <B><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></B>
90 set_item_term <B><A HREF="menu_hook.3x.html">menu_hook(3x)</A></B>
91 set_item_userptr <B><A HREF="mitem_userptr.3x.html">mitem_userptr(3x)</A></B>
92 set_item_value <B><A HREF="mitem_value.3x.html">mitem_value(3x)</A></B>
93 set_menu_back <B><A HREF="menu_attribs.3x.html">menu_attribs(3x)</A></B>
94 set_menu_fore <B><A HREF="menu_attribs.3x.html">menu_attribs(3x)</A></B>
95 set_menu_format <B><A HREF="menu_format.3x.html">menu_format(3x)</A></B>
96 set_menu_grey <B><A HREF="menu_attribs.3x.html">menu_attribs(3x)</A></B>
97 set_menu_init <B><A HREF="menu_hook.3x.html">menu_hook(3x)</A></B>
98 set_menu_items <B><A HREF="menu_items.3x.html">menu_items(3x)</A></B>
99 set_menu_mark <B><A HREF="menu_mark.3x.html">menu_mark(3x)</A></B>
100 set_menu_opts <B><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></B>
101 set_menu_pad <B><A HREF="menu_attribs.3x.html">menu_attribs(3x)</A></B>
102 set_menu_pattern <B><A HREF="menu_pattern.3x.html">menu_pattern(3x)</A></B>
103 set_menu_spacing <B><A HREF="menu_spacing.3x.html">menu_spacing(3x)</A></B>
104 set_menu_sub <B><A HREF="menu_win.3x.html">menu_win(3x)</A></B>
105 set_menu_term <B><A HREF="menu_hook.3x.html">menu_hook(3x)</A></B>
106 set_menu_userptr <B><A HREF="menu_userptr.3x.html">menu_userptr(3x)</A></B>
107 set_menu_win <B><A HREF="menu_win.3x.html">menu_win(3x)</A></B>
108 set_top_row <B><A HREF="mitem_current.3x.html">mitem_current(3x)</A></B>
109 top_row <B><A HREF="mitem_current.3x.html">mitem_current(3x)</A></B>
110 unpost_menu <B><A HREF="menu_post.3x.html">menu_post(3x)</A></B>
114 <H2>RETURN VALUE</H2><PRE>
115 Routines that return pointers return <B>NULL</B> on error. Rou-
116 tines that return an integer return one of the following
119 <B>E_OK</B> The routine succeeded.
121 <B>E_SYSTEM_ERROR</B>
122 System error occurred (see <B>errno</B>).
124 <B>E_BAD_ARGUMENT</B>
125 Routine detected an incorrect or out-of-range argu-
129 The menu is already posted.
132 Routine was called from an initialization or termina-
136 Menu is too large for its window.
139 The menu has not been posted.
141 <B>E_UNKNOWN_COMMAND</B>
142 The menu driver code saw an unknown request code.
145 Character failed to match.
147 <B>E_NOT_SELECTABLE</B>
148 The designated item cannot be selected.
150 <B>E_NOT_CONNECTED</B>
151 No items are connected to the menu.
153 <B>E_REQUEST_DENIED</B>
154 The menu driver could not process the request.
158 <H2>SEE ALSO</H2><PRE>
159 <B><A HREF="ncurses.3x.html">curses(3x)</A></B> and 3x pages whose names begin "menu_" for
160 detailed descriptions of the entry points.
165 The header file <B><menu.h></B> automatically includes the header
166 files <B><curses.h></B> and <B><eti.h></B>.
168 In your library list, libmenu.a should be before libn-
169 curses.a; that is, you want to say `-lmenu -lncurses', not
170 the other way around (which would give you a link error
171 using GNU <B><A HREF="ld.1.html">ld(1)</A></B> and many other linkers).
175 <H2>PORTABILITY</H2><PRE>
176 These routines emulate the System V menu library. They
177 were not supported on Version 7 or BSD versions.
181 <H2>AUTHORS</H2><PRE>
182 Juergen Pfeifer. Manual pages and adaptation for ncurses
240 Man(1) output converted with
241 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>