mirror of
https://github.com/Aigor44/ncursesw-morphos.git
synced 2024-12-27 07:49:06 +08:00
0948e2c7ac
+ fix colors in ncurses 'b' test which did not work after changing it to put the test-strings in subwindows (cf: 20140705). + merge redundant SEE-ALSO sections in form and menu manpages.
239 lines
13 KiB
HTML
239 lines
13 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
|
<!--
|
|
* t
|
|
****************************************************************************
|
|
* Copyright (c) 1998-2010,2014 Free Software Foundation, Inc. *
|
|
* *
|
|
* Permission is hereby granted, free of charge, to any person obtaining a *
|
|
* copy of this software and associated documentation files (the *
|
|
* "Software"), to deal in the Software without restriction, including *
|
|
* without limitation the rights to use, copy, modify, merge, publish, *
|
|
* distribute, distribute with modifications, sublicense, and/or sell *
|
|
* copies of the Software, and to permit persons to whom the Software is *
|
|
* furnished to do so, subject to the following conditions: *
|
|
* *
|
|
* The above copyright notice and this permission notice shall be included *
|
|
* in all copies or substantial portions of the Software. *
|
|
* *
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
|
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
|
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
|
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
|
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
|
* *
|
|
* Except as contained in this notice, the name(s) of the above copyright *
|
|
* holders shall not be used in advertising or otherwise to promote the *
|
|
* sale, use or other dealings in this Software without prior written *
|
|
* authorization. *
|
|
****************************************************************************
|
|
* @Id: menu.3x,v 1.22 2014/08/16 20:32:08 tom Exp @
|
|
-->
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>menu 3x</TITLE>
|
|
<link rev=made href="mailto:bug-ncurses@gnu.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>menu 3x</H1>
|
|
<HR>
|
|
<PRE>
|
|
<!-- Manpage converted by man2html 3.0.1 -->
|
|
<STRONG><A HREF="menu.3x.html">menu(3x)</A></STRONG> <STRONG><A HREF="menu.3x.html">menu(3x)</A></STRONG>
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
<STRONG>menu</STRONG> - curses extension for programming menus
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>#include</STRONG> <STRONG><menu.h></STRONG>
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
The <STRONG>menu</STRONG> library provides terminal-independent facilities
|
|
for composing menu systems on character-cell terminals.
|
|
The library includes: item routines, which create and mod-
|
|
ify menu items; and menu routines, which group items into
|
|
menus, display menus on the screen, and handle interaction
|
|
with the user.
|
|
|
|
The <STRONG>menu</STRONG> library uses the <STRONG>curses</STRONG> libraries, and a curses
|
|
initialization routine such as <STRONG>initscr</STRONG> must be called
|
|
before using any of these functions. To use the <STRONG>menu</STRONG>
|
|
library, link with the options <STRONG>-lmenu</STRONG> <STRONG>-lcurses</STRONG>.
|
|
|
|
<STRONG>Current</STRONG> <STRONG>Default</STRONG> <STRONG>Values</STRONG> <STRONG>for</STRONG> <STRONG>Item</STRONG> <STRONG>Attributes</STRONG>
|
|
The <STRONG>menu</STRONG> library maintains a default value for item
|
|
attributes. You can get or set this default by calling
|
|
the appropriate <STRONG>get_</STRONG> or <STRONG>set_</STRONG> routine with a <STRONG>NULL</STRONG> item
|
|
pointer. Changing this default with a <STRONG>set_</STRONG> function
|
|
affects future item creations, but does not change the
|
|
rendering of items already created.
|
|
|
|
<STRONG>Routine</STRONG> <STRONG>Name</STRONG> <STRONG>Index</STRONG>
|
|
The following table lists each <STRONG>menu</STRONG> routine and the name
|
|
of the manual page on which it is described.
|
|
|
|
<STRONG>curses</STRONG> Routine Name Manual Page Name
|
|
--------------------------------------------
|
|
current_item <STRONG><A HREF="mitem_current.3x.html">mitem_current(3x)</A></STRONG>
|
|
free_item <STRONG><A HREF="mitem_new.3x.html">mitem_new(3x)</A></STRONG>
|
|
free_menu <STRONG><A HREF="menu_new.3x.html">menu_new(3x)</A></STRONG>
|
|
item_count <STRONG><A HREF="menu_items.3x.html">menu_items(3x)</A></STRONG>
|
|
item_description <STRONG><A HREF="mitem_name.3x.html">mitem_name(3x)</A></STRONG>
|
|
item_index <STRONG><A HREF="mitem_current.3x.html">mitem_current(3x)</A></STRONG>
|
|
item_init <STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>
|
|
item_name <STRONG><A HREF="mitem_name.3x.html">mitem_name(3x)</A></STRONG>
|
|
item_opts <STRONG><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></STRONG>
|
|
item_opts_off <STRONG><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></STRONG>
|
|
item_opts_on <STRONG><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></STRONG>
|
|
item_term <STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>
|
|
item_userptr <STRONG><A HREF="mitem_userptr.3x.html">mitem_userptr(3x)</A></STRONG>
|
|
item_value <STRONG><A HREF="mitem_value.3x.html">mitem_value(3x)</A></STRONG>
|
|
item_visible <STRONG><A HREF="mitem_visible.3x.html">mitem_visible(3x)</A></STRONG>
|
|
menu_back <STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>
|
|
menu_driver <STRONG><A HREF="menu_driver.3x.html">menu_driver(3x)</A></STRONG>
|
|
menu_fore <STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>
|
|
menu_format <STRONG><A HREF="menu_format.3x.html">menu_format(3x)</A></STRONG>
|
|
menu_grey <STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>
|
|
menu_init <STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>
|
|
menu_items <STRONG><A HREF="menu_items.3x.html">menu_items(3x)</A></STRONG>
|
|
menu_mark <STRONG><A HREF="menu_mark.3x.html">menu_mark(3x)</A></STRONG>
|
|
menu_opts <STRONG><A HREF="menu_opts.3x.html">menu_opts(3x)</A></STRONG>
|
|
menu_opts_off <STRONG><A HREF="menu_opts.3x.html">menu_opts(3x)</A></STRONG>
|
|
menu_opts_on <STRONG><A HREF="menu_opts.3x.html">menu_opts(3x)</A></STRONG>
|
|
menu_pad <STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>
|
|
menu_pattern <STRONG><A HREF="menu_pattern.3x.html">menu_pattern(3x)</A></STRONG>
|
|
|
|
menu_request_by_name <STRONG><A HREF="menu_requestname.3x.html">menu_requestname(3x)</A></STRONG>
|
|
menu_request_name <STRONG><A HREF="menu_requestname.3x.html">menu_requestname(3x)</A></STRONG>
|
|
menu_spacing <STRONG><A HREF="menu_spacing.3x.html">menu_spacing(3x)</A></STRONG>
|
|
menu_sub <STRONG><A HREF="menu_win.3x.html">menu_win(3x)</A></STRONG>
|
|
menu_term <STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>
|
|
menu_userptr <STRONG><A HREF="menu_userptr.3x.html">menu_userptr(3x)</A></STRONG>
|
|
menu_win <STRONG><A HREF="menu_win.3x.html">menu_win(3x)</A></STRONG>
|
|
new_item <STRONG><A HREF="mitem_new.3x.html">mitem_new(3x)</A></STRONG>
|
|
new_menu <STRONG><A HREF="menu_new.3x.html">menu_new(3x)</A></STRONG>
|
|
pos_menu_cursor <STRONG><A HREF="menu_cursor.3x.html">menu_cursor(3x)</A></STRONG>
|
|
post_menu <STRONG><A HREF="menu_post.3x.html">menu_post(3x)</A></STRONG>
|
|
scale_menu <STRONG><A HREF="menu_win.3x.html">menu_win(3x)</A></STRONG>
|
|
set_current_item <STRONG><A HREF="mitem_current.3x.html">mitem_current(3x)</A></STRONG>
|
|
set_item_init <STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>
|
|
set_item_opts <STRONG><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></STRONG>
|
|
set_item_term <STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>
|
|
set_item_userptr <STRONG><A HREF="mitem_userptr.3x.html">mitem_userptr(3x)</A></STRONG>
|
|
set_item_value <STRONG><A HREF="mitem_value.3x.html">mitem_value(3x)</A></STRONG>
|
|
set_menu_back <STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>
|
|
set_menu_fore <STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>
|
|
set_menu_format <STRONG><A HREF="menu_format.3x.html">menu_format(3x)</A></STRONG>
|
|
set_menu_grey <STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>
|
|
set_menu_init <STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>
|
|
set_menu_items <STRONG><A HREF="menu_items.3x.html">menu_items(3x)</A></STRONG>
|
|
set_menu_mark <STRONG><A HREF="menu_mark.3x.html">menu_mark(3x)</A></STRONG>
|
|
set_menu_opts <STRONG><A HREF="mitem_opts.3x.html">mitem_opts(3x)</A></STRONG>
|
|
set_menu_pad <STRONG><A HREF="menu_attributes.3x.html">menu_attributes(3x)</A></STRONG>
|
|
set_menu_pattern <STRONG><A HREF="menu_pattern.3x.html">menu_pattern(3x)</A></STRONG>
|
|
set_menu_spacing <STRONG><A HREF="menu_spacing.3x.html">menu_spacing(3x)</A></STRONG>
|
|
set_menu_sub <STRONG><A HREF="menu_win.3x.html">menu_win(3x)</A></STRONG>
|
|
set_menu_term <STRONG><A HREF="menu_hook.3x.html">menu_hook(3x)</A></STRONG>
|
|
set_menu_userptr <STRONG><A HREF="menu_userptr.3x.html">menu_userptr(3x)</A></STRONG>
|
|
set_menu_win <STRONG><A HREF="menu_win.3x.html">menu_win(3x)</A></STRONG>
|
|
set_top_row <STRONG><A HREF="mitem_current.3x.html">mitem_current(3x)</A></STRONG>
|
|
top_row <STRONG><A HREF="mitem_current.3x.html">mitem_current(3x)</A></STRONG>
|
|
unpost_menu <STRONG><A HREF="menu_post.3x.html">menu_post(3x)</A></STRONG>
|
|
|
|
|
|
</PRE>
|
|
<H2>RETURN VALUE</H2><PRE>
|
|
Routines that return pointers return <STRONG>NULL</STRONG> on error. Rou-
|
|
tines that return an integer return one of the following
|
|
error codes:
|
|
|
|
<STRONG>E_OK</STRONG> The routine succeeded.
|
|
|
|
<STRONG>E_BAD_ARGUMENT</STRONG>
|
|
Routine detected an incorrect or out-of-range argu-
|
|
ment.
|
|
|
|
<STRONG>E_BAD_STATE</STRONG>
|
|
Routine was called from an initialization or termina-
|
|
tion function.
|
|
|
|
<STRONG>E_NO_MATCH</STRONG>
|
|
Character failed to match.
|
|
|
|
<STRONG>E_NO_ROOM</STRONG>
|
|
Menu is too large for its window.
|
|
|
|
<STRONG>E_NOT_CONNECTED</STRONG>
|
|
No items are connected to the menu.
|
|
|
|
<STRONG>E_NOT_POSTED</STRONG>
|
|
The menu has not been posted.
|
|
|
|
<STRONG>E_NOT_SELECTABLE</STRONG>
|
|
The designated item cannot be selected.
|
|
|
|
<STRONG>E_POSTED</STRONG>
|
|
The menu is already posted.
|
|
|
|
<STRONG>E_REQUEST_DENIED</STRONG>
|
|
The menu driver could not process the request.
|
|
|
|
<STRONG>E_SYSTEM_ERROR</STRONG>
|
|
System error occurred (see <STRONG>errno</STRONG>).
|
|
|
|
<STRONG>E_UNKNOWN_COMMAND</STRONG>
|
|
The menu driver code saw an unknown request code.
|
|
|
|
|
|
</PRE>
|
|
<H2>NOTES</H2><PRE>
|
|
The header file <STRONG><menu.h></STRONG> automatically includes the header
|
|
files <STRONG><curses.h></STRONG> and <STRONG><eti.h></STRONG>.
|
|
|
|
In your library list, libmenu.a should be before libn-
|
|
curses.a; that is, you want to say `-lmenu -lncurses', not
|
|
the other way around (which would usually give a link-
|
|
error).
|
|
|
|
|
|
</PRE>
|
|
<H2>PORTABILITY</H2><PRE>
|
|
These routines emulate the System V menu library. They
|
|
were not supported on Version 7 or BSD versions.
|
|
|
|
|
|
</PRE>
|
|
<H2>AUTHORS</H2><PRE>
|
|
Juergen Pfeifer. Manual pages and adaptation for ncurses
|
|
by Eric S. Raymond.
|
|
|
|
|
|
</PRE>
|
|
<H2>SEE ALSO</H2><PRE>
|
|
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names begin "menu_" for
|
|
detailed descriptions of the entry points.
|
|
|
|
This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140816).
|
|
|
|
|
|
|
|
<STRONG><A HREF="menu.3x.html">menu(3x)</A></STRONG>
|
|
</PRE>
|
|
<HR>
|
|
<ADDRESS>
|
|
Man(1) output converted with
|
|
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
|
|
</ADDRESS>
|
|
</BODY>
|
|
</HTML>
|