Manual Pages for UNIX Darwin command on man current_item
MyWebUniversity

Manual Pages for UNIX Darwin command on man current_item

mitemcurrent(3X) mitemcurrent(3X)

NAME

mmiitteemmccuurrrreenntt - set and get currentmenuitem

SYNOPSIS

##iinncclluuddee <>

int setcurrentitem(MENU *menu, const ITEM *item); ITEM *currentitem(const MENU *menu); int settoprow(MENU *menu, int row); int toprow(const MENU *menu); int itemindex(const ITEM *item);

DESCRIPTION

The function sseettccuurrrreennttiitteemm sets the current item (the item on which the menu cursor is positioned). ccuurrrreennttiitteemm returns a pointer to the current item in the given menu. The function sseettttoopprrooww sets the top row of the menu to show the given row (the top row is initially 0, and is reset to this value whenever the OORROOWWMMAAJJOORR option is toggled). The item leftmost on the given row becomes current. The function ttoopprrooww returns the number of the top menu row being displayed.

The function iitteemmiinnddeexx returns the (zero-origin) index of item in the

menu's item pointer list. RREETTUURRNN VVAALLUUEE ccuurrrreennttiitteemm returns NNUULLLL on error. ttoopprrooww and iitteemmiinnddeexx return EERRRR (the general ccuurrsseess error value) on error. sseettccuurrrreennttiitteemm and sseettttoopprrooww return one of the following: EEOOKK The routine succeeded. EESSYYSSTTEEMMEERRRROORR System error occurred (see eerrrrnnoo). EEBBAADDAARRGGUUMMEENNTT

Routine detected an incorrect or out-of-range argument.

EEBBAADDSSTTAATTEE Routine was called from an initialization or termination function. EENNOOTTCCOONNNNEECCTTEEDD No items are connected to the menu.

SEE ALSO

ccuurrsseess(3X), mmeennuu(3X). NNOOTTEESS The header file <> automatically includes the header file <>. PPOORRTTAABBIILLIITTYY

These routines emulate the System V menu library. They were not sup-

ported on Version 7 or BSD versions. The SVr4 menu library documentation specifies the ttoopprrooww and

iinnddeexxiitteemm error value as -1 (which is the value of EERRRR).

AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. mitemcurrent(3X)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™