subpad.3x (2010 09)

s
subpad(3X) subpad(3X)
(ENHANCED CURSES)
NAME
subpad enhanced pad management function
SYNOPSIS
#include <curses.h>
WINDOW *subpad(WINDOW *orig, int nlines, int ncols, int begin_y,
int begin_x);
DESCRIPTION
The subpad() function creates a subwindow within a pad with nlines lines and ncols columns. Unlike
subwin(), which uses screen coordinates, the window is at position (begin_y, begin_x) on the pad. The
window is made in the middle of the window orig, so that changes made to one window affect both win-
dows.
RETURN VALUE
subpad() function returns a pointer to the pad data structure. Otherwise, it returns a null pointer.
ERRORS
No errors are defined.
APPLICATION USAGE
To refresh a pad, call
prefresh() or pnoutrefresh()
, not wrefresh(). When porting code to use
pads from WINDOWS, remember that these functions require additional arguments to specify the part of
the pad to be displayed and the location on the screen to be used for the display.
Although a subwindow and its parent pad may share memory representing characters in the pad, they
need not share status information about what has changed in the pad. Therefore, after modifying a
subwindow within a pad, it may be necessary to call
touchwin() or touchline() on the pad before
calling prefresh().
SEE ALSO
derwin(3X), doupdate(3X), is_linetouched(3X), newpad(3X), <curses.h>.
CHANGE HISTORY
First released in X/Open Curses, Issue 4.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)