Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
|MENU_ITEM_VALUE(3)||Library Functions Manual||MENU_ITEM_VALUE(3)|
get or set value for an itemCurses Menu Library (libmenu, -lmenu)
item_value(ITEM *item); int
set_item_value(ITEM *item, int flag); int
item_selected(MENU *menu, int **array);
item_value() function returns value of the item. If the item has been selected then this value will be TRUE. The value can also be set by calling
set_item_value() to set the value to a defined state. Setting the value to a value other than TRUE or FALSE will have undefined results. The
item_selected() function returns the number of items that are selected in the menu, that is the number of items whose value is TRUE. The indexes of the selected items will be returned in array which will be dynamically allocated to hold the number of indexes. It is the responsibility of the caller to release this storage by calling free(3) when the storage is no longer required. If there are no elements selected in the items array then
item_selected() will return 0 and array will be NULL. If an error occurs
item_selected() will return one of the below return values which are less than 0.
- The function was successful.
- The item is not connected to a menu.
- The menu driver could not process the request.
- A system error occurred whilst processing the request.
item_selected() is a NetBSD extension and must not be used in portable code.
|September 10, 1999||Debian|