C5_RESTSCREEN

 RESTSCREEN()
 Display a saved screen region to a specified location
------------------------------------------------------------------------------
 Syntax

     RESTSCREEN([<nTop>], [<nLeft>],
        [<nBottom>], [<nRight>], <cScreen>) --> NIL

 Arguments

     <nTop>, <nLeft>, <nBottom>, and <nRight> define the
     coordinates of the screen information contained in <cScreen>.  If
     <cScreen> was saved without coordinates to preserve the entire screen,
     no screen coordinates are necessary with RESTSCREEN().

     <cScreen> is a character string containing the saved screen region.

 Returns

     RESTSCREEN() always returns NIL.

 Description

     RESTSCREEN() is a screen function that redisplays a screen region saved
     with SAVESCREEN().  The target screen location may be the same as or
     different from the original location when the screen region was saved.
     If you specify a new screen location, the new screen region must be the
     same size or you will get ambiguous results.  To use RESTSCREEN() to
     restore screen regions saved with SAVE SCREEN, specify the region
     coordinates as 0, 0, MAXROW(), MAXCOL().

     Warning!  SAVE SCREEN, RESTORE SCREEN, SAVESCREEN(), and
     RESTSCREEN() are supported when using the default (IBM PC memory mapped)
     screen driver.  Other screen drivers may not support saving and
     restoring screens.

 Examples

     .  This example demonstrates RESTSCREEN() as part of a general
        purpose pop-up menu function, PopMenu():

        ? PopMenu({1, 1, 3, 10, {"ItemOne", "ItemTwo"}, ;
              "BG+/B"})

        FUNCTION PopMenu( aList )
           LOCAL cScreen, nChoice, cOldColor := ;
                    SETCOLOR(aList[6])
           cScreen := SAVESCREEN(aList[1], aList[2],;
               aList[3], aList[4])
           @ aList[1], aList[2], TO aList[3], aList[4] DOUBLE
           nChoice := ACHOICE(++aList[1], ++aList[2],;
              --aList[3], --aList[4], aList[5])
           SETCOLOR(cOldColor)
           RESTSCREEN(--aList[1], --aList[2], ++aList[3],;
               ++aList[4], cScreen)
           RETURN nChoice

 Files   Library is EXTEND.LIB.

See Also: RESTORE RESTORE SCREEN* SAVE SAVESCREEN()

 

2 responses to “C5_RESTSCREEN

  1. Pingback: C5 UI – Basics | Viva Clipper !

  2. Pingback: C5_RESTORE SCREEN | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.