Windows can be created, deleted, moved, copied, touched, duplicated and more.
Figure 8.1: Ncurses - scheme for newwin
The upper left corner of our window is in line 10 and column 10 and the window has 10 lines and 60 columns. If nlines is zero, the window will have LINES-begy rows. In the same way the, window will have COLS-begx columns when ncols is zero.
When you call newwin(...) with all argument zero:
the opened window will have the size of the screen.
With and we can open windows in the middle of the screen, whatever dimension it has:
This will open a window with 22 lines and 70 rows in the middle of the screen. Check the screen size before opening windows. In the Linux console we have 25 or more lines and 80 or more columns, but in xterms this may not be the case (they're resizable).
Alternatively, use and to adapt two windows to the screen size:
See .c in the example directory for more explanations.
begx and begy are relative to the screen, not to origwin.