4 <!-- Manpage converted by man2html 3.0.1 -->
8 <B>newpad</B>, <B>subpad</B>, <B>prefresh</B>, <B>pnoutrefresh</B>, <B>pechochar</B> - create
9 and display <B>curses</B> pads
13 <H2>SYNOPSIS</H2><PRE>
14 <B>#include</B> <B><curses.h></B>
16 <B>WINDOW</B> <B>*newpad(int</B> <B>nlines,</B> <B>int</B> <B>ncols);</B>
17 <B>WINDOW</B> <B>*subpad(WINDOW</B> <B>*orig,</B> <B>int</B> <B>nlines,</B> <B>int</B> <B>ncols,</B>
18 <B>int</B> <B>begin_y,</B> <B>int</B> <B>begin_x);</B>
19 <B>int</B> <B>prefresh(WINDOW</B> <B>*pad,</B> <B>int</B> <B>pminrow,</B> <B>int</B> <B>pmincol,</B>
20 <B>int</B> <B>sminrow,</B> <B>int</B> <B>smincol,</B> <B>int</B> <B>smaxrow,</B> <B>int</B> <B>smaxcol);</B>
21 <B>int</B> <B>pnoutrefresh(WINDOW</B> <B>*pad,</B> <B>int</B> <B>pminrow,</B> <B>int</B> <B>pmincol,</B>
22 <B>int</B> <B>sminrow,</B> <B>int</B> <B>smincol,</B> <B>int</B> <B>smaxrow,</B> <B>int</B> <B>smaxcol);</B>
23 <B>int</B> <B>pechochar(WINDOW</B> <B>*pad,</B> <B>chtype</B> <B>ch);</B>
27 <H2>DESCRIPTION</H2><PRE>
28 The <B>newpad</B> routine creates and returns a pointer to a new
29 pad data structure with the given number of lines, <I>nlines</I>,
30 and columns, <I>ncols</I>. A pad is like a window, except that
31 it is not restricted by the screen size, and is not neces-
32 sarily associated with a particular part of the screen.
33 Pads can be used when a large window is needed, and only a
34 part of the window will be on the screen at one time.
35 Automatic refreshes of pads (<I>e</I>.<I>g</I>., from scrolling or echo-
36 ing of input) do not occur. It is not legal to call <B>wre-</B>
37 <B>fresh</B> with a <I>pad</I> as an argument; the routines <B>prefresh</B> or
38 <B>pnoutrefresh</B> should be called instead. Note that these
39 routines require additional parameters to specify the part
40 of the pad to be displayed and the location on the screen
41 to be used for the display.
43 The <B>subpad</B> routine creates and returns a pointer to a sub-
44 window within a pad with the given number of lines,
45 <I>nlines</I>, and columns, <I>ncols</I>. Unlike <B>subwin</B>, which uses
46 screen coordinates, the window is at position (<I>begin</I>_<I>x</I><B>,</B>
47 <I>begin</I>_<I>y</I>) on the pad. The window is made in the middle of
48 the window <I>orig</I>, so that changes made to one window affect
49 both windows. During the use of this routine, it will
50 often be necessary to call <B>touchwin</B> or <B>touchline</B> on <I>orig</I>
51 before calling <B>prefresh</B>.
53 The <B>prefresh</B> and <B>pnoutrefresh</B> routines are analogous to
54 <B>wrefresh</B> and <B>wnoutrefresh</B> except that they relate to pads
55 instead of windows. The additional parameters are needed
56 to indicate what part of the pad and screen are involved.
57 <I>pminrow</I> and <I>pmincol</I> specify the upper left-hand corner of
58 the rectangle to be displayed in the pad. <I>sminrow</I>, <I>smin-</I>
59 <I>col</I>, <I>smaxrow</I>, and <I>smaxcol</I> specify the edges of the rectan-
60 gle to be displayed on the screen. The lower right-hand
61 corner of the rectangle to be displayed in the pad is cal-
62 culated from the screen coordinates, since the rectangles
63 must be the same size. Both rectangles must be entirely
64 contained within their respective structures. Negative
65 values of <I>pminrow</I>, <I>pmincol</I>, <I>sminrow</I>, or <I>smincol</I> are
66 treated as if they were zero.
68 The <B>pechochar</B> routine is functionally equivalent to a call
69 to <B>addch</B> followed by a call to <B>refresh</B>, a call to <B>waddch</B>
70 followed by a call to <B>wrefresh</B>, or a call to <B>waddch</B> fol-
71 lowed by a call to <B>prefresh.</B> The knowledge that only a
72 single character is being output is taken into considera-
73 tion and, for non-control characters, a considerable per-
74 formance gain might be seen by using these routines
75 instead of their equivalents. In the case of <B>pechochar</B>,
76 the last location of the pad on the screen is reused for
77 the arguments to <B>prefresh</B>.
81 <H2>RETURN VALUE</H2><PRE>
82 Routines that return an integer return <B>ERR</B> upon failure
83 and <B>OK</B> (SVr4 only specifies "an integer value other than
84 <B>ERR</B>") upon successful completion.
86 Routines that return pointers return <B>NULL</B> on error, and
87 set <B>errno</B> to <B>ENOMEM</B>.
92 Note that <B>pechochar</B> may be a macro.
96 <H2>PORTABILITY</H2><PRE>
97 The XSI Curses standard, Issue 4 describes these func-
102 <H2>SEE ALSO</H2><PRE>
103 <B><A HREF="ncurses.3x.html">curses(3x)</A></B>, <B><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></B>, <B><A HREF="curs_touch.3x.html">curs_touch(3x)</A></B>,
104 <B><A HREF="curs_addch.3x.html">curs_addch(3x)</A></B>.
130 Man(1) output converted with
131 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>