[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _gtScroll()
 Scroll a region of the screen
------------------------------------------------------------------------------
 C Prototype

     #include "gt.api"
     ERRCODE _gtScroll(
                        USHORT uiTop
                        USHORT uiLeft,
                        USHORT uiBottom,
                        USHORT uiRight,
                        SHORT iRows,
                        SHORT iCols
                      )

 Arguments

     uiTop, uiLeft, uiBottom, and uiRight define the scroll region
     coordinates.  Row and columns values may range from (0,0) to (_gtMaxRow(),
     _gtMaxCol()).

     iRows defines the number of rows to scroll.  A value greater than
     zero scrolls the specified screen area up by the specified number of
     rows.  A value less than zero scrolls the specified screen area down by
     the specified number of rows.

     iCols defines the number columns to scroll. A value greater than
     zero scrolls the specified screen area left by the specified number of
     columns.  A value less than zero scrolls the specified screen area right
     by the specified number of columns.

     If only one of the parameters iRows or iCols is supplied a zero value,
     the specified screen area will not be scrolled in that direction.  If
     both iRows and iCols are supplied zero values, the specified screen
     region will be blanked (cleared).

 Returns

     _gtScroll() returns zero if successful.  Any other value indicates an
     error.

 Description

     _gtScroll() scrolls a screen region up, down , left, or right.

     When a screen region scrolls up the first line of the region is erased,
     all other lines are moved up, and a blank line is displayed in the
     current standard color on the bottom line of specified region.  When a
     screen region scrolls down, the orientation is reversed.  If the screen
     region is scrolled more than one line, this process is repeated.

     When a screen region scrolls right the first column of the region is
     erased, all other columns are moved right, and a blank column is
     displayed in the current standard color on the left of specified region.
     When a screen region scrolls left, the orientation is reversed.  If the
     screen region is scrolled more than one column, this process is
     repeated.

     The screen can be scrolled vertically or horizontally.  Additionally,
     the screen can be scrolled both directions at once causing the screen to
     be scrolled diagonally.  Also, the screen region can be blanked
     (cleared).

 Examples

     .  The following examples demonstrate the effects of the
        different parameter  combinations.

        #include "gt.api"

        .
        .
        .
           /*
              Demonstrate how to scroll the contents of a screen area
              (5, 5 to 20, 50) in different ways
           */

           _gtScroll( 5, 5, 20, 50,  1,  0 );       // up
           _gtScroll( 5, 5, 20, 50, -1,  0 );       // down
           _gtScroll( 5, 5, 20, 50,  0,  1 );       // left
           _gtScroll( 5, 5, 20, 50,  1, -1 );       // right
           _gtScroll( 5, 5, 20, 50,  1,  1 );       // up and left
           _gtScroll( 5, 5, 20, 50, -1, -1 );       // down and right
           _gtScroll( 5, 5, 20, 50,  0,  0 );       // clears screen area
        .
        .
        .

 Files  Library is CLIPPER.LIB, header file is Gt.api.


See Also: _gtMaxCol() _gtMaxRow() _gtWriteAt()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson