* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_pad.3x,v 1.19 2017/01/07 19:25:15 tom Exp @
+ * @Id: curs_pad.3x,v 1.23 2017/11/19 01:29:46 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
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 <STRONG>wrefresh</STRONG> with a <EM>pad</EM> as an argument; the
- routines <STRONG>prefresh</STRONG> or <STRONG>pnoutrefresh</STRONG> should be called instead. Note that
+ cur.
+
+ It is not legal to call <STRONG>wrefresh</STRONG> with a <EM>pad</EM> as an argument; the rou-
+ tines <STRONG>prefresh</STRONG> or <STRONG>pnoutrefresh</STRONG> 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 <STRONG>prefresh</STRONG> and <STRONG>pnoutrefresh</STRONG> routines are analogous to <STRONG>wrefresh</STRONG> and
<STRONG>wnoutrefresh</STRONG> 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. The <EM>pminrow</EM> and <EM>pmincol</EM> parameters specify the
- upper left-hand corner of the rectangle to be displayed in the pad.
- The <EM>sminrow</EM>, <EM>smincol</EM>, <EM>smaxrow</EM>, and <EM>smaxcol</EM> parameters specify the edges
- of the rectangle to be displayed on the screen. The lower right-hand
- corner of the rectangle to be displayed 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 <EM>pminrow</EM>, <EM>pmincol</EM>, <EM>sminrow</EM>, or <EM>smincol</EM>
- are treated as if they were zero.
+ screen are involved.
+
+ <STRONG>o</STRONG> The <EM>pminrow</EM> and <EM>pmincol</EM> parameters specify the upper left-hand cor-
+ ner of the rectangle to be displayed in the pad.
+
+ <STRONG>o</STRONG> The <EM>sminrow</EM>, <EM>smincol</EM>, <EM>smaxrow</EM>, and <EM>smaxcol</EM> parameters specify the
+ edges of the rectangle to be displayed on the screen.
+
+ The lower right-hand corner of the rectangle to be displayed 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 <EM>pminrow</EM>, <EM>pmincol</EM>, <EM>sminrow</EM>,
+ or <EM>smincol</EM> are treated as if they were zero.
</PRE><H3><a name="h3-pechochar">pechochar</a></H3><PRE>
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- The XSI Curses standard, Issue 4 describes these functions.
+ BSD curses has no <EM>pad</EM> feature.
+
+ SVr2 curses (1986) provided the <STRONG>newpad</STRONG> and related functions, document-
+ ing them in a single line each. SVr3 (1987) provided more extensive
+ documentation.
+
+ The documentation does not explain the term <EM>pad</EM>. However, the Apollo
+ <EM>Aegis</EM> workstation operating system supported a graphical <EM>pad</EM> feature:
+
+ <STRONG>o</STRONG> These graphical pads could be much larger than the computer's dis-
+ play.
+
+ <STRONG>o</STRONG> The read-only output from a command could be scrolled back to in-
+ spect, and select text from the pad.
+
+ The two uses may be related.
+
+ The XSI Curses standard, Issue 4 describes these functions, without
+ significant change from the SVr3 documentation. It describes no error
+ conditions. The behavior of <STRONG>subpad</STRONG> if the parent window is not a pad
+ is undocumented, and is not checked by the vendor Unix implementations:
+
+ <STRONG>o</STRONG> SVr4 curses sets a flag in the <STRONG>WINDOW</STRONG> structure in <STRONG>newpad</STRONG> which
+ tells if the window is a <EM>pad</EM>.
+
+ However, it uses this information only in <STRONG>wscrl</STRONG>, and does not check
+ in <STRONG>wrefresh</STRONG> to ensure that the pad is refreshed properly.
+
+ <STRONG>o</STRONG> Solaris X/Open Curses checks if a window is a pad in <STRONG>wnoutrefresh</STRONG>,
+ returning <STRONG>ERR</STRONG> in that case.
+
+ However, it only sets the flag for subwindows if the parent window
+ is a pad. Its <STRONG>newpad</STRONG> function does not set this information. Con-
+ sequently, the check will never fail.
+
+ It makes no comparable check in <STRONG>pnoutrefresh</STRONG>, though interestingly
+ enough, a comment in the source code states that the lack of a
+ check was an MKS extension.
+
+ <STRONG>o</STRONG> NetBSD 7 curses sets a flag in the <STRONG>WINDOW</STRONG> structure for <STRONG>newpad</STRONG> and
+ <STRONG>subpad</STRONG>, using this to help with the distinction between <STRONG>wnoutre-</STRONG>
+ <STRONG>fresh</STRONG> and <STRONG>pnoutrefresh</STRONG>.
+
+ It does not check for the case where a subwindow is created in a
+ pad using <STRONG>subwin</STRONG> or <STRONG>derwin</STRONG>.
+
+ The <STRONG>dupwin</STRONG> function returns a regular window when duplicating a
+ pad. Likewise, <STRONG>getwin</STRONG> always returns a window, even if the saved
+ data was from a pad.
+
+ This implementation
+
+ <STRONG>o</STRONG> sets a flag in the <STRONG>WINDOW</STRONG> structure for <STRONG>newpad</STRONG> and <STRONG>subpad</STRONG>,
+
+ <STRONG>o</STRONG> allows a <STRONG>subwin</STRONG> or <STRONG>derwin</STRONG> call to succeed having a pad parent by
+ forcing the subwindow to be a pad,
+
+ <STRONG>o</STRONG> checks in both <STRONG>wnoutrefresh</STRONG> and <STRONG>pnoutrefresh</STRONG> to ensure that pads
+ and windows are handled distinctly, and
+
+ <STRONG>o</STRONG> ensures that <STRONG>dupwin</STRONG> and <STRONG>getwin</STRONG> treat pads versus windows consis-
+ tently.
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>