next up previous contents
Next: 8.14 Pads Up: 8 Character Cell Graphics Previous: 8.12 Cursor and Window

8.13 Scrolling

The following code should explain how to get the effect of scrolling a text on the screen. Look also in .c in the example directory.

We have a window with 18 lines and 66 columns and want to scroll a text in it. S[] is a character array with the text. Max_s is the number of the last line in s[]. Clear_line will print blank characters from the current cursor position up to the end of the line using the current attributes from the window (not A_NORMAL as clrtoeol does). Beg is the last line from s[] currently shown on the screen. Scroll is an enumerate to tell the function what to do, show the NEXT or PREVious line from the text.


next up previous contents
Next: 8.14 Pads Up: 8 Character Cell Graphics Previous: 8.12 Cursor and Window

Converted on:
Fri Mar 29 14:43:04 EST 1996

mirror server hosted at Truenetwork, Russian Federation.