Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <graph.h>
    void _FAR _scrolltextwindow( short rows );

Description:
    The _scrolltextwindow function scrolls the lines in the current text
    window.  A text window is defined with the  _settextwindow function.  By
    default, the text window is the entire screen.

    The argument rows specifies the number of rows to scroll.  A positive
    value means to scroll the text window up or towards the top of the
    screen.  A negative value means to scroll the text window down or
    towards the bottom of the screen.  Specifying a number of rows greater
    than the height of the text window is equivalent to clearing the text
    window with the  _clearscreen function.

    Two constants are defined that can be used with the _scrolltextwindow
    function:

    _GSCROLLUP
        the contents of the text window are scrolled up (towards the top of
        the screen) by one row

    _GSCROLLDOWN
        the contents of the text window are scrolled down (towards the
        bottom of the screen) by one row


Returns:
    The _scrolltextwindow function does not return a value.

See Also:
    _settextwindow, _clearscreen, _outtext, _outmem, _settextposition

Example:
    #include <conio.h>
    #include <graph.h>
    #include <stdio.h>

    main()
    {
        int i;
        char buf[ 80 ];

        _setvideomode( _TEXTC80 );
        _settextwindow( 5, 20, 20, 40 );
        for( i = 1; i <= 10; ++i ) {
            sprintf( buf, "Line %d\n", i );
            _outtext( buf );
        }
        getch();
        _scrolltextwindow( _GSCROLLDOWN );
        getch();
        _scrolltextwindow( _GSCROLLUP );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson