X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=doc%2Fhtml%2Fncurses-intro.html;h=a6cd40c74ddb9aa602d114e2028213c85bb8e386;hp=1f09a7c2a265b5dc297f6e1947c17610935c1cfb;hb=302a066a01e4de40f08b397e87ca0e97f20870a7;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8 diff --git a/doc/html/ncurses-intro.html b/doc/html/ncurses-intro.html index 1f09a7c2..a6cd40c7 100644 --- a/doc/html/ncurses-intro.html +++ b/doc/html/ncurses-intro.html @@ -1,6 +1,33 @@ - +
@@ -404,6 +431,7 @@ mentioned above.Here is a sample program to motivate the discussion:
+#include <stdlib.h> #include <curses.h> #include <signal.h> @@ -887,15 +915,14 @@ Here is some sample code for shellout:Using NCURSES under XTERM
-A resize operation in X sends SIGWINCH to the application running under xterm. -Thencurses
library provides an experimental signal -handler, but in general does not catch this signal, because it cannot -know how you want the screen re-painted. You will usually have to write the -SIGWINCH handler yourself. Ncurses can give you some help.+A resize operation in X sends
SIGWINCH
to the application running +under xterm. -The easiest way to code your SIGWINCH handler is to have it do an -endwin
, followed by anrefresh
and a screen repaint you code -yourself. Therefresh
will pick up the new screen size from the +The easiest way to handleSIGWINCH
+is to do anendwin
, +followed by anrefresh
and a screen repaint you code +yourself. +Therefresh
will pick up the new screen size from the xterm's environment.That is the standard way, of course (it even works with some vendor's curses @@ -907,8 +934,17 @@ not resize subwindows which must be shrunk. are limited to the new screen dimensions, and pads
stdscr
with blanks if the screen is larger.-Finally, ncurses can be configured to provide its own SIGWINCH handler, -based on
resizeterm
. +Thencurses
library provides a SIGWINCH signal handler, +which pushes aKEY_RESIZE
via the wgetch() calls. +Whenncurses
returns that code, +it callsresizeterm
+to update the size of the standard screen's window, repainting that +(filling with blanks or truncating as needed). +It also resizes other windows, +but its effect may be less satisfactory because it cannot +know how you want the screen re-painted. +You will usually have to write special-purpose code to handle +KEY_RESIZE
yourself.Handling Multiple Terminal Screens
@@ -979,7 +1015,7 @@ on and refresh them, the changes made to the overlapping region under historic To understand why this is a problem, remember that screen updates are calculated between two representations of the entire display. The -documentation says that when you refresh a window, it is first copied to to the +documentation says that when you refresh a window, it is first copied to the virtual screen, and then changes are calculated to update the physical screen (and applied to the terminal). But "copied to" is not very specific, and subtle differences in how copying works can produce different behaviors in the @@ -2157,7 +2193,7 @@ These requests treat the list as cyclic; that is,REQ_NEXT_PAGE
from the last page goes to the first, andREQ_PREV_PAGE
from the first page goes to the last. -Inter-Field Navigation Requests
+Inter-Field Navigation Requests
These requests handle navigation between fields on the same page. @@ -2211,7 +2247,7 @@ of B and C to the right of B. AREQ_MOVE_RIGHT
from A will go to B only if A, B, and C all share the same first line; otherwise it will skip over B to C. -Intra-Field Navigation Requests
+Intra-Field Navigation Requests
These requests drive movement of the edit cursor within the currently selected field.