Manual Pages for UNIX Darwin command on man slk_attr
MyWebUniversity

Manual Pages for UNIX Darwin command on man slk_attr

cursslk(3X) cursslk(3X)

NAME

ssllkkiinniitt, ssllkksseett, ssllkkrreeffrreesshh, ssllkknnoouuttrreeffrreesshh, ssllkkllaabbeell, ssllkkcclleeaarr, ssllkkrreessttoorree, ssllkkttoouucchh, ssllkkaattttrroonn, ssllkkaattttrrsseett, ssllkkaattttrrooffff,

ssllkkaattttrroonn, ssllkkaattttrrsseett, ssllkkaattttrrooffff, ssllkkaattttrr, ssllkkccoolloorr - ccuurrsseess

soft label routines

SYNOPSIS

##iinncclluuddee <>

iinntt ssllkkiinniitt((iinntt ffmmtt));; iinntt ssllkksseett((iinntt llaabbnnuumm,, ccoonnsstt cchhaarr **llaabbeell,, iinntt ffmmtt));; iinntt ssllkkrreeffrreesshh((vvooiidd));; iinntt ssllkknnoouuttrreeffrreesshh((vvooiidd));; cchhaarr **ssllkkllaabbeell((iinntt llaabbnnuumm));; iinntt ssllkkcclleeaarr((vvooiidd));; iinntt ssllkkrreessttoorree((vvooiidd));; iinntt ssllkkttoouucchh((vvooiidd));; iinntt ssllkkaattttrroonn((ccoonnsstt cchhttyyppee aattttrrss));; iinntt ssllkkaattttrrooffff((ccoonnsstt cchhttyyppee aattttrrss));; iinntt ssllkkaattttrrsseett((ccoonnsstt cchhttyyppee aattttrrss));; iinntt ssllkkaattttrroonn((aattttrrtt aattttrrss,, vvooiidd** ooppttss));; iinntt ssllkkaattttrrooffff((ccoonnsstt aattttrrtt aattttrrss,, vvooiidd ** ooppttss));; iinntt ssllkkaattttrrsseett((ccoonnsstt aattttrrtt aattttrrss,, sshhoorrtt ccoolloorrppaaiirrnnuummbbeerr,, vvooiidd** ooppttss));; aattttrrtt ssllkkaattttrr((vvooiidd));; iinntt ssllkkccoolloorr((sshhoorrtt ccoolloorrppaaiirrnnuummbbeerr));;

DESCRIPTION

The slk* functions manipulate the set of soft function-key labels that

exist on many terminals. For those terminals that do not have soft la-

bels, ccuurrsseess takes over the bottom line of ssttddssccrr, reducing the size of ssttddssccrr and the variable LLIINNEESS. ccuurrsseess standardizes on eight labels of

up to eight characters each. In addition to this, the ncurses implemen-

tation supports a mode where it simulates 12 labels of up to five char-

acters each. This is most common for todays PC like enduser devices. Please note that ncurses simulates this mode by taking over up to two lines at the bottom of the screen, it doesn't try to use any hardware support for this mode. The ssllkkiinniitt routine must be called before iinniittssccrr or nneewwtteerrmm is called. If iinniittssccrr eventually uses a line from ssttddssccrr to emulate the soft labels, then fmt determines how the labels are arranged on the

screen. Setting fmt to 00 indicates a 3-2-3 arrangement of the labels,

11 indicates a 4-4 arrangement and 22 indicates the PC like 4-4-4 mode.

If ffmmtt is set to 33, it is again the PC like 4-4-4 mode, but in addition

an index line is generated, helping the user to identify the key num-

bers easily. The ssllkksseett routine requires labnum to be a label number, from 11 to 88 (resp. 1122); label must be the string to be put on the label, up to eight (resp. five) characters in length. A null string or a null pointer sets up a blank label. fmt is either 00, 11, or 22, indicating

whether the label is to be left-justified, centered, or right-justi-

fied, respectively, within the label. The ssllkkrreeffrreesshh and ssllkknnoouuttrreeffrreesshh routines correspond to the wwrreeffrreesshh and wwnnoouuttrreeffrreesshh routines.

The ssllkkllaabbeell routine returns the current label for label number lab-

num, with leading and trailing blanks stripped. The ssllkkcclleeaarr routine clears the soft labels from the screen. The ssllkkrreessttoorree routine restores the soft labels to the screen after a ssllkkcclleeaarr has been performed. The ssllkkttoouucchh routine forces all the soft labels to be output the next time a ssllkknnoouuttrreeffrreesshh is performed.

The ssllkkaattttrroonn, ssllkkaattttrrsseett, ssllkkaattttrrooffff and ssllkkaattttrr routines corre-

spond to aattttrroonn, aattttrrsseett, aattttrrooffff and aattttrrggeett. They have an effect only if soft labels are simulated on the bottom line of the screen.

The default highlight for soft keys is ASTANDOUT (as in System V curs-

es, which does not document this fact). The ssllkkccoolloorr routine corresponds to ccoolloorrsseett. It has an effect only if soft labels are simulated on the bottom line of the screen. RREETTUURRNN VVAALLUUEE These routines return EERRRR upon failure and OK (SVr4 specifies only "an integer value other than EERRRR") upon successful completion. X/Open defines no error conditions. In this implementation ssllkkaattttrr returns the attribute used for the soft keys. ssllkkaattttrrooffff, ssllkkaattttrroonn, ssllkkcclleeaarr, ssllkknnoouuttrreeffrreesshh, ssllkkrreeffrreesshh, ssllkkttoouucchh return an error if the terminal or the softkeys were not initialized. ssllkkaattttrrsseett returns an error if the terminal or the softkeys were not initialized. ssllkkaattttrrsseett returns an error if the terminal or the softkeys were not

initialized, or the color pair is outside the range 0..COL-

ORPAIRS-1, or opts is not null.

ssllkkccoolloorr returns an error if the terminal or the softkeys were not

initialized, or the color pair is outside the range 0..COL-

ORPAIRS-1.

ssllkkiinniitt returns an error if the format parameter is outside the range 0..3. ssllkkllaabbeell returns NNUULLLL on error. ssllkksseett returns an error if the terminal or the softkeys were not initialized, or the labnum parameter is outside the range of label counts, or if the format parameter is outside the

range 0..2, or if memory for the labels cannot be allocat-

ed. NNOOTTEESS

Most applications would use ssllkknnoouuttrreeffrreesshh because a wwrreeffrreesshh is like-

ly to follow soon. PPOORRTTAABBIILLIITTYY The XSI Curses standard, Issue 4, describes these functions. It

changes the argument type of the attribute-manipulation functions

ssllkkaattttrroonn, ssllkkaattttrrooffff, ssllkkaattttrrsseett to be aattttrrtt, and adds ccoonnsstt qual-

ifiers. The format codes 22 and 33 for ssllkkiinniitt(()) and the function ssllkkaattttrr are specific to ncurses.

SEE ALSO

ccuurrsseess(3X), ccuurrssaattttrr(3X), ccuurrssiinniittssccrr(3X), ccuurrssrreeffrreesshh(3X) cursslk(3X)




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