C5_RESTORE SCREEN

 RESTORE SCREEN*
 Display a saved screen
------------------------------------------------------------------------------
 Syntax

     RESTORE SCREEN [FROM <cScreen>]

 Arguments

     FROM <cScreen> specifies a character expression to display to the
     screen.

 Description

     RESTORE SCREEN is a command synonym for the RESTSCREEN() function that
     redisplays a previously saved screen, and is used with SAVE SCREEN to
     avoid repainting the original screen painted with @...SAY, @...GET, and
     ? commands.

     RESTORE SCREEN works in two ways depending on whether or not you specify
     the FROM clause.  If you specify the FROM clause, the SCREEN is RESTOREd
     FROM <cScreen>.  <cScreen> is a character expression, usually a variable
     assigned a screen image by SAVE SCREEN.  If you do not specify the FROM
     clause, the SCREEN is RESTOREd from the default save screen buffer
     created by SAVE SCREEN specified without the TO clause.

     SAVESCREEN() and RESTORESCREEN() functions supersede SAVE SCREEN and
     RESTORE SCREEN commands.

     RESTORE SCREEN is a compatibility command and therefore not recommended.

     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 displays a small alert pop-up box using SAVE and
        RESTORE SCREEN:

        IF FileAlert()
           COPY FILE Them.txt TO My.txt
        ELSE
           BREAK
        ENDIF
        RETURN

        FUNCTION FileAlert
           LOCAL lAnswer := .F., cScreen
           SAVE SCREEN TO cScreen
           @ 10, 10 CLEAR TO 12, 45
           @ 10, 10 TO 12, 45 DOUBLE
           @ 11, 12 SAY "File exists, overwrite? (y/n) ";
                  GET lAnswer PICTURE "Y"
           READ
           RESTORE SCREEN FROM cScreen
           RETURN lAnswer

 Files   Library is CLIPPER.LIB.

See Also: RESTORE RESTSCREEN() SAVE SAVESCREEN()



Advertisements

3 responses to “C5_RESTORE SCREEN

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

  2. Pingback: C5 User Interface | Viva Clipper !

  3. Pingback: C5 Commands | 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.