Manual Pages for UNIX Darwin command on man subpad
MyWebUniversity

Manual Pages for UNIX Darwin command on man subpad

curspad(3X) curspad(3X)

NAME

nneewwppaadd, ssuubbppaadd, pprreeffrreesshh, ppnnoouuttrreeffrreesshh, ppeecchhoocchhaarr, ppeecchhoowwcchhaarr - create

and display ccuurrsseess pads

SYNOPSIS

##iinncclluuddee <>

WWIINNDDOOWW **nneewwppaadd((iinntt nnlliinneess,, iinntt nnccoollss));; WWIINNDDOOWW **ssuubbppaadd((WWIINNDDOOWW **oorriigg,, iinntt nnlliinneess,, iinntt nnccoollss,, iinntt bbeeggiinnyy,, iinntt bbeeggiinnxx));; iinntt pprreeffrreesshh((WWIINNDDOOWW **ppaadd,, iinntt ppmmiinnrrooww,, iinntt ppmmiinnccooll,, iinntt ssmmiinnrrooww,, iinntt ssmmiinnccooll,, iinntt ssmmaaxxrrooww,, iinntt ssmmaaxxccooll));; iinntt ppnnoouuttrreeffrreesshh((WWIINNDDOOWW **ppaadd,, iinntt ppmmiinnrrooww,, iinntt ppmmiinnccooll,, iinntt ssmmiinnrrooww,, iinntt ssmmiinnccooll,, iinntt ssmmaaxxrrooww,, iinntt ssmmaaxxccooll));; iinntt ppeecchhoocchhaarr((WWIINNDDOOWW **ppaadd,, cchhttyyppee cchh));; iinntt ppeecchhoowwcchhaarr((WWIINNDDOOWW **ppaadd,, ccoonnsstt cccchhaarrtt **wwcchh));;

DESCRIPTION

The nneewwppaadd routine creates and returns a pointer to a new pad data structure with the given number of lines, nlines, and columns, ncols. A pad is like a window, except that it is not restricted by the screen size, and is not necessarily associated with a particular part of the screen. Pads can be used when a large window is needed, and only a

part of the window will be on the screen at one time. Automatic re-

freshes of pads (e.g., from scrolling or echoing of input) do not oc-

cur. It is not legal to call wwrreeffrreesshh with a pad as an argument; the routines pprreeffrreesshh or ppnnoouuttrreeffrreesshh should be called instead. Note that these routines require additional parameters to specify the part of the pad to be displayed and the location on the screen to be used for the display. The ssuubbppaadd routine creates and returns a pointer to a subwindow within

a pad with the given number of lines, nlines, and columns, ncols. Un-

like ssuubbwwiinn, which uses screen coordinates, the window is at position (beginx,, beginy) on the pad. The window is made in the middle of the window orig, so that changes made to one window affect both windows. During the use of this routine, it will often be necessary to call ttoouucchhwwiinn or ttoouucchhlliinnee on orig before calling pprreeffrreesshh. The pprreeffrreesshh and ppnnoouuttrreeffrreesshh routines are analogous to wwrreeffrreesshh and wwnnoouuttrreeffrreesshh except that they relate to pads instead of windows. The additional parameters are needed to indicate what part of the pad and

screen are involved. pminrow and pmincol specify the upper left-hand

corner of the rectangle to be displayed in the pad. sminrow, smincol, smaxrow, and smaxcol specify the edges of the rectangle to be displayed

on the screen. The lower right-hand corner of the rectangle to be dis-

played in the pad is calculated from the screen coordinates, since the rectangles must be the same size. Both rectangles must be entirely

contained within their respective structures. Negative values of pmin-

row, pmincol, sminrow, or smincol are treated as if they were zero. The ppeecchhoocchhaarr routine is functionally equivalent to a call to aaddddcchh followed by a call to rreeffrreesshh, a call to wwaaddddcchh followed by a call to wwrreeffrreesshh, or a call to wwaaddddcchh followed by a call to pprreeffrreesshh. The knowledge that only a single character is being output is taken into

consideration and, for non-control characters, a considerable perfor-

mance gain might be seen by using these routines instead of their equivalents. In the case of ppeecchhoocchhaarr, the last location of the pad on the screen is reused for the arguments to pprreeffrreesshh.

The ppeecchhoowwcchhaarr function is the analogous wide-character form of ppee-

cchhoocchhaarr. It outputs one character to a pad and immediately refreshes

the pad. It does this by a call to wwaaddddwwcchh followed by a call to pprree-

ffrreesshh. RREETTUURRNN VVAALLUUEE Routines that return an integer return EERRRR upon failure and OOKK (SVr4

only specifies "an integer value other than EERRRR") upon successful com-

pletion. Routines that return pointers return NNUULLLL on error, and set eerrrrnnoo to EENNOOMMEEMM. X/Open does not define any error conditions. In this implementation pprreeffrreesshh and ppnnoouuttrreeffrreesshh return an error if the window pointer is null, or if the

window is not really a pad or if the area to refresh ex-

tends off-screen or if the minimum coordinates are greater

than the maximum. ppeecchhoocchhaarr returns an error if the window is not really a pad, and the associated call to wweecchhoocchhaarr returns an error. ppeecchhoowwcchhaarr returns an error if the window is not really a pad, and the associated call to wweecchhoowwcchhaarr returns an error. NNOOTTEESS Note that ppeecchhoocchhaarr may be a macro. PPOORRTTAABBIILLIITTYY The XSI Curses standard, Issue 4 describes these functions.

SEE ALSO

ccuurrsseess(3X), ccuurrssrreeffrreesshh(3X), ccuurrssttoouucchh(3X), ccuurrssaaddddcchh(3X). curspad(3X)




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