Function RestScreen() Foundation
Redisplays screen contents previously saved with SaveScreen().
RestScreen( [<nTop>] , [<nLeft>] , ;
[<nBottom>], [<nRight>], <cScreen>) --> NIL
RestScreen() always returns the value NIL.
The screen function RestScreen() normally redisplays a segment of screen previously saved using the function SaveScreen(). The display can occur any place on the entire screen. When a saved screen segment is displayed at a new location, the new segment must have the same dimensions as the original.
Every second character in the character pairs comprising <cScreen> contains the color attribute for the visible character placed on the screen.
// The example shows how a shadow can be output around
// a box using RestScreen().
// Further detailed examples of SaveScreen() and RestScreen()
// are shown with the function SaveScreen().
PROCEDURE Main
LOCAL nTop:=7, nLeft:=10, nBottom:=17 , nRight:=60, cScreen
SetColor("N/BG") // output background
DispBox(0,0,MaxRow(),MaxCol(),Replicate(Chr(176),9) )
// output box
DispBox( nTop, nLeft, nBottom, nRight, 2, "W+/R" )
// save right shadow area
cScreen := SaveScreen(nTop+1,nRight+1,nBottom+1,nRight+2)
// replace color attributes with
cScreen := Transform( cScreen,; // attribute for "N+/N"
Replicate("X"+Chr(8), Len(cScreen)/2) )
// output right shadow area
RestScreen(nTop+1,nRight+1,nBottom+1,nRight+2,cScreen )
// save bottom shadow area
cScreen := SaveScreen(nBottom+1,nLeft+2,nBottom+1,nRight)
// replace color attributes with
cScreen := Transform( cScreen,; // attribute for "N+/N"
Replicate("X"+Chr(8), Len(cScreen)/2) )
// output bottom shadow area
RestScreen(nBottom+1,nLeft+2,nBottom+1,nRight,cScreen )
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.