xref: /netbsd-src/lib/libmenu/menu_mark.3 (revision 5e4c038a45edbc7d63b7c2daa76e29f88b64a4e3)
1.\"	$NetBSD: menu_mark.3,v 1.6 2002/02/20 11:47:56 wiz Exp $
2.\"
3.\" Copyright (c) 1999
4.\"	Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
5.\"
6.\" This code is donated to The NetBSD Foundation by the author.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\" 3. The name of the Author may not be used to endorse or promote
17.\"    products derived from this software without specific prior written
18.\"    permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.Dd September 10, 1999
33.Dt MENU_MARK 3
34.Os
35.Sh NAME
36.Nm menu_mark ,
37.Nm menu_unmark ,
38.Nm set_menu_mark ,
39.Nm set_menu_unmark
40.Nd get or set strings that show mark status for a menu
41.Sh LIBRARY
42.Lb libmenu
43.Sh SYNOPSIS
44.Fd #include \*[Lt]menu.h\*[Gt]
45.Ft char *
46.Fn menu_mark "MENU *menu"
47.Ft char *
48.Fn menu_unmark "MENU *menu"
49.Ft int
50.Fn set_menu_mark "MENU *menu" "char *mark"
51.Ft int
52.Fn set_menu_unmark "MENU *menu" "char *mark"
53.Sh DESCRIPTION
54The
55.Fn menu_mark
56function returns a pointer to the character string that is used to
57mark selected items in the menu.  The mark string is set by the
58.Fn set_menu_mark
59function.  The
60.Fn menu_unmark
61function returns a pointer to the character string that is used to
62indicate a menu items is not selected, this string is set by the
63.Fn set_menu_unmark
64function.
65The mark and unmark strings may be of differing lengths, the room
66allocated to drawing the mark will be the maximum of the lengths of
67both the mark and unmark strings.  The shorter of the two strings will
68be left justified and space padded.
69.Sh RETURN VALUES
70The functions return one of the following error values:
71.Pp
72.Bl -tag -width E_UNKNOWN_COMMAND -compact
73.It Er E_OK
74The function was successful.
75.It Er E_SYSTEM_ERROR
76There was a system error during the call.
77.It Er E_BAD_ARGUMENT
78One or more of the arguments passed to the function was incorrect.
79.It Er E_POSTED
80The menu is already posted.
81.It Er E_CONNECTED
82An item was already connected to a menu.
83.It Er E_BAD_STATE
84The function was called from within an initialisation or termination
85routine.
86.It Er E_NO_ROOM
87The menu does not fit within the subwindow.
88.It Er E_NOT_POSTED
89The menu is not posted.
90.It Er E_UNKNOWN_COMMAND
91The menu driver does not recognise the request passed to it.
92.It Er E_NO_MATCH
93The character search failed to find a match.
94.It Er E_NOT_SELECTABLE
95The item could not be selected.
96.It Er E_NOT_CONNECTED
97The item is not connected to a menu.
98.It Er E_REQUEST_DENIED
99The menu driver could not process the request.
100.El
101.Sh SEE ALSO
102.Xr curses 3 ,
103.Xr menus 3
104.Sh NOTES
105The header
106.Pa \*[Lt]menu.h\*[Gt]
107automatically includes both
108.Pa \*[Lt]curses.h\*[Gt]
109and
110.Pa \*[Lt]eti.h\*[Gt] .
111