xref: /netbsd/lib/libmenu/menu_mark.3 (revision 6550d01e)
1.\"	$NetBSD: menu_mark.3,v 1.9 2003/04/16 13:35:11 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.In menu.h
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.
58The mark string is set by the
59.Fn set_menu_mark
60function.
61The
62.Fn menu_unmark
63function returns a pointer to the character string that is used to
64indicate a menu items is not selected, this string is set by the
65.Fn set_menu_unmark
66function.
67The mark and unmark strings may be of differing lengths, the room
68allocated to drawing the mark will be the maximum of the lengths of
69both the mark and unmark strings.
70The shorter of the two strings will be left justified and space padded.
71.Sh RETURN VALUES
72The functions return one of the following error values:
73.Pp
74.Bl -tag -width E_UNKNOWN_COMMAND -compact
75.It Er E_OK
76The function was successful.
77.It Er E_SYSTEM_ERROR
78There was a system error during the call.
79.It Er E_BAD_ARGUMENT
80One or more of the arguments passed to the function was incorrect.
81.It Er E_POSTED
82The menu is already posted.
83.It Er E_CONNECTED
84An item was already connected to a menu.
85.It Er E_BAD_STATE
86The function was called from within an initialization or termination
87routine.
88.It Er E_NO_ROOM
89The menu does not fit within the subwindow.
90.It Er E_NOT_POSTED
91The menu is not posted.
92.It Er E_UNKNOWN_COMMAND
93The menu driver does not recognize the request passed to it.
94.It Er E_NO_MATCH
95The character search failed to find a match.
96.It Er E_NOT_SELECTABLE
97The item could not be selected.
98.It Er E_NOT_CONNECTED
99The item is not connected to a menu.
100.It Er E_REQUEST_DENIED
101The menu driver could not process the request.
102.El
103.Sh SEE ALSO
104.Xr curses 3 ,
105.Xr menus 3
106.Sh NOTES
107The header
108.Pa \*[Lt]menu.h\*[Gt]
109automatically includes both
110.Pa \*[Lt]curses.h\*[Gt]
111and
112.Pa \*[Lt]eti.h\*[Gt] .
113