2 .\" Copyright (c) 1990, 1995 by Mortice Kern Systems Inc. All Rights Reserved Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH NEWPAD 3XCURSES "Jun 5, 2002"
8 newpad, pnoutrefresh, prefresh, subpad \- create or refresh a pad or subpad
12 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-I\fR /usr/xpg4/include \fB -L \fR /usr/xpg4/lib \e
13 \fB -R \fR /usr/xpg4/lib \fB -lcurses \fR [ \fIlibrary\fR... ]
15 \fBc89\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lcurses\fR [ \fIlibrary\fR... ]
19 \fBWINDOW *\fR\fBnewpad\fR(\fBint\fR \fInlines\fR, \fBint\fR \fIncols\fR);
24 \fBint\fR \fBpnoutrefresh\fR(\fBWINDOW *\fR\fIpad\fR, \fBint\fR \fIpminrow\fR, \fBint\fR \fIpmincol\fR, \fBint\fR \fIsminrow\fR,
25 \fBint\fR \fIsmincol\fR,\fBint\fR \fIsmaxrow\fR, \fBint\fR \fIsmaxcol\fR);
30 \fBint\fR \fBprefresh\fR(\fBWINDOW *\fR\fIpad\fR, \fBint\fR \fIpminrow\fR, \fBint\fR \fIpmincol\fR, \fBint\fR \fIsminrow\fR,
31 \fBint\fR \fIsmincol\fR,\fBint\fR \fIsmaxrow\fR, \fBint\fR \fIsmaxcol\fR);
36 \fBWINDOW *\fR\fBsubpad\fR(\fBWINDOW *\fR\fIorig\fR, \fBint\fR \fInlines\fR, \fBint\fR \fIncols\fR);
46 Is the number of lines in the pad to be created.
55 Is the number of columns in the pad to be created.
64 Is a pointer to the pad to refresh.
73 Is the row coordinate of the upper left corner of the pad rectangle to be
83 Is the column coordinate of the upper left corner of the pad rectangle to be
93 Is the row coordinate of the upper left corner of the rectangle on the physical
94 screen where pad is to be positioned.
103 Is the column coordinate of the upper left corner of the rectangle on the
104 physical screen where pad is to be positioned.
113 Is the row coordinate of the lower right corner of the rectangle on the
114 physical screen where the pad is to be positioned.
123 Is the column coordinate of the lower right corner of the rectangle on the
124 physical screen where the pad is to be positioned.
133 Is a pointer to the parent pad within which a sub-pad is created.
139 The \fBnewpad()\fR function creates a new pad with the specified number of
140 lines and columns. A pointer to the new pad structure is returned. A pad
141 differs from a window in that it is not restricted to the size of the physical
142 screen. It is useful when only part of a large window will be displayed at any
146 Automatic refreshes by scrolling or echoing of input do not take place when
147 pads are used. Pads have their own refresh commands, \fBprefresh()\fR and
148 \fBpnoutrefresh()\fR.
151 The \fBprefresh()\fR function copies the specified portion of the logical pad
152 to the terminal screen. The parameters \fIpmincol\fR and \fIpminrow\fR specify
153 the upper left corner of the rectangular area of the pad to be displayed. The
154 lower right coordinate of the rectangular area of the pad that is to be
155 displayed is calculated from the screen parameters (\fIsminrow\fR,
156 \fIsmincol\fR, \fIsmaxrow\fR, \fIsmaxcol\fR).
159 This function calls the \fBpnoutrefresh()\fR function to copy the specified
160 portion of \fIpad\fR to the terminal screen and the \fBdoupdate\fR(3XCURSES)
161 function to do the actual update. The logical cursor is copied to the same
162 location in the physical window unless \fBleaveok\fR(3XCURSES) is enabled (in
163 which case, the cursor is placed in a position that the program finds
167 When outputting several pads at once, it is often more efficient to call the
168 \fBpnoutrefresh()\fR and \fBdoupdate()\fR functions directly. A call to
169 \fBpnoutrefresh()\fR for each pad first, followed by only one call to
170 \fBdoupdate()\fR to update the screen, results in one burst of output, fewer
171 characters sent, and less CPU time used.
174 The \fBsubpad()\fR function creates a sub-pad within the pad \fIorig\fR with
175 the specified number of lines and columns. A pointer to the new pad structure
176 is returned. The sub-pad is positioned in the middle of \fIorig\fR. Any
177 changes made to one pad affect the other. \fBtouchwin\fR(3XCURSES) or
178 \fBtouchline\fR(3XCURSES) will likely have to be called on pad \fIorig\fR to
179 correctly update the window.
183 On success, the \fBnewpad()\fR and \fBsubpad()\fR functions returns a pointer
184 to the new pad data structure. Otherwise, they return a null pointer.
187 On success, the \fBpnoutrefresh()\fR and \fBprefresh()\fR functions return
188 \fBOK\fR. Otherwise, they return \fBERR\fR.
192 See \fBattributes\fR(5) for descriptions of the following attributes:
200 ATTRIBUTE TYPE ATTRIBUTE VALUE
202 Interface Stability Standard
210 \fBclearok\fR(3XCURSES), \fBdoupdate\fR(3XCURSES),
211 \fBis_linetouched\fR(3XCURSES), \fBlibcurses\fR(3XCURSES),
212 \fBpechochar\fR(3XCURSES), \fBattributes\fR(5), \fBstandards\fR(5)