Creates a subwindow within a pad.
#include <curses.h>
WINDOW *subpad(Orig, NLines, NCols, Begin_Y, Begin_X) WINDOW *Orig; int NCols, NLines, Begin_Y, Begin_X;
The subpad subroutine creates and returns a pointer to a subpad. A subpad is a window within a pad. You specify the size of the subpad by supplying a starting coordinate and the number of rows and columns within the subpad. Unlike the subwin subroutine, the starting coordinates are relative to the pad and not the terminal's display.
Changes to the subpad affect the character image of the parent pad, as well. If you change a subpad, use the touchwin or touchline subroutine on the parent pad before refreshing the parent pad. Use the prefresh subroutine to refresh a pad.
WINDOW *orig, *mypad;
orig = newpad(100, 200);
mypad = subpad(orig, 30, 5, 25, 180);
The parent pad is 100 lines by 200 columns. The subpad is 30 lines by 5 columns and starts in line 25 , column 180 of the parent pad.
This subroutine is part of Base Operating System (BOS) Runtime.
Curses Overview for Programming, List of Curses Subroutines, Windows in the Curses Environment in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.