SCROLLTEXTWINDOW

Graphics Subroutine: Scrolls the contents of a text window.

Module: USE DFLIB

Syntax

CALL SCROLLTEXTWINDOW (rows)

rows
(Input) INTEGER(2). Number of rows to scroll.

The SCROLLTEXTWINDOW subroutine scrolls the text in a text window (previously defined by SETTEXTWINDOW). The default text window is the entire window.

The rows argument specifies the number of lines to scroll. A positive value for rows scrolls the window up (the usual direction); a negative value scrolls the window down. Specifying a number larger than the height of the current text window is equivalent to calling CLEARSCREEN ($GWINDOW). A value of 0 for rows has no effect.

Compatibility

STANDARD GRAPHICS QUICKWIN GRAPHICS LIB

See Also: CLEARSCREEN, GETTEXTPOSITION, GETTEXTWINDOW, GRSTATUS, OUTTEXT, SETTEXTPOSITION, SETTEXTWINDOW, WRAPON

Example

 !  Build as QuickWin or Standard Graphics app.
 USE DFLIB
 INTEGER(2) row
 CHARACTER(18) string
 TYPE (rccoord) oldpos

 CALL SETTEXTWINDOW (INT2(1), INT2(0), &
                     INT2(25), INT2(80))
 CALL CLEARSCREEN ( $GCLEARSCREEN )

 DO row = 1, 6
    string = 'Hello, World # '
    CALL SETTEXTPOSITION( row, INT2(1), oldpos )
    WRITE(string(15:16), '(I2)') row
    CALL OUTTEXT( string )
 END DO
 WRITE(*,*) "Hit ENTER"
 READ (*,*) ! wait for ENTER
 !  Scroll window down 4 lines
 CALL SCROLLTEXTWINDOW(INT2( -4) )
 WRITE(*,*) "Hit ENTER"
 READ( *,* ) ! wait for ENTER
 !  Scroll window up 5 lines
 CALL SCROLLTEXTWINDOW( INT2(5 ))
 END