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