1 .\" $NetBSD: menu_item_value.3,v 1.11 2003/04/16 13:35:11 wiz Exp $ .\"
3 .\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
5 .\" This code is donated to The NetBSD Foundation by the author.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
15 .\" 3. The name of the Author may not be used to endorse or promote
16 .\" products derived from this software without specific prior written
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .Dd September 10, 1999
38 .Nd get or set value for an item
44 .Fn item_value "ITEM *item"
46 .Fn set_item_value "ITEM *item" "int flag"
48 .Fn item_selected "MENU *menu" "int **array"
52 function returns value of the item.
53 If the item has been selected then this value will be TRUE.
54 The value can also be set by calling
56 to set the value to a defined state.
57 Setting the value to a value
58 other than TRUE or FALSE will have undefined results.
61 function returns the number of items that are selected in the menu, that
62 is the number of items whose value is TRUE.
63 The indexes of the selected
64 items will be returned in
66 which will be dynamically allocated to hold the number of indexes.
67 It is the responsibility of the caller to release this storage by calling
69 when the storage is no longer required.
70 If there are no elements selected in the items array then
77 will return one of the below return values which are less than 0.
79 The functions return one of the following error values:
81 .Bl -tag -width E_REQUEST_DENIED -compact
83 The function was successful.
84 .It Er E_NOT_CONNECTED
85 The item is not connected to a menu.
86 .It Er E_REQUEST_DENIED
87 The menu driver could not process the request.
89 A system error occurred whilst processing the request.
96 .Pa \*[Lt]menu.h\*[Gt]
97 automatically includes both
98 .Pa \*[Lt]curses.h\*[Gt]
100 .Pa \*[Lt]eti.h\*[Gt] .
106 extension and must not be used in portable code.