FT_REVATTR

FT_REVATTR()
 Reverse colors of specified screen coordinates

 Syntax

      FT_REVATTR( <nTRow>, <nLCol>, <nBRow>, <nRCol> ) -> NIL

 Arguments

     <nTRow>, <nLCol>, <nBRow>, and <nRCol> are the coordinates of the
     screen region.

 Returns

     NIL

 Description

     This is a high speed function to reverse the color of a specified
     screen region without disturbing any text on the screen.  This
     function will correctly reverse the color attributes in a region
     containing multiple color combinations.

 Examples

     FT_REVATTR( 0, 0, MaxRow(), MaxCol() )

     This example will change the entire screen's colors to their reverse
     attributes without changing  or overwriting any text.

 Source: VIDEO1.C

 Author: Robert A. DiFalco

 

FT_RESTATT

FT_RESTATT()
 Restore the attribute bytes of a specified screen region.

 Syntax

     FT_RESTATT( <nTop>, <nLeft>, <nBottom>, <nRight>, <cAttributes> ) -> NIL

 Arguments

    <nTop>, <nLeft>, <nBottom>, and <nRight> define the screen region.
    <cAttributes> is a character string containing the attribute bytes
                  for the screen region.  This will most often be a string
                  previously returned by FT_SAVEATT(), but any character
                  string may be used (provided it is of the proper size).

 Returns

    NIL

 Description

    This function is similar to Clipper's RestScreen(), except that it only
    restores the attribute bytes.  This is useful if you want to change the
    screen color without affecting the text.

    *** INTERNALS ALERT ***

    This function calls the Clipper internals __gtSave and __gtRest to
    manipulate the the screen image.  If you're too gutless to use
    internals, then this function isn't for you.

 Examples

    // Restore attributes of row 4
    FT_RESTATT( 4, 0, 4, maxcol(), cBuffer)

    // Restore attributes to middle of screen
    FT_RESTATT(10,20,14,59,cBuffer)

 Source: RESTATT.ASM

 Author: Ted Means

See Also: FT_SAVEATT()

 

FT_PUSHVID

FT_PUSHVID()
 Save current video states on internal stack.

 Syntax

      FT_PushVid() -> <nStackSize>

 Arguments

     None

 Returns

     The current size of the internal stack (i.e. the number of times
     FT_PushVid() has been called).

 Description

     Menus, picklists, browses, and other video-intensive items often
     require you to save certain video states -- screen image, cursor
     position, and so forth.  Constantly saving and restoring these items
     can get very tedious.  This function attempts to alleviate this
     problem.  When called, it saves the cursor position, color setting,
     screen image, cursor style, blink setting, scoreboard setting, snow
     setting, and maximum row and column to a series of static arrays.  All
     that is needed to restore the saved settings is a call to FT_PopVid().

 Examples

     FT_PushVid()          // Save the current video states

 Source: PVID.PRG

 Author: Ted Means

See Also: FT_PopVid()

FT_POPVID

FT_POPVID()
 Restore previously saved video states.

 Syntax

      FT_PopVid() -> <nStackSize>

 Arguments

     None

 Returns

     The number of items remaining in the internal stack.

 Description

     This is the complementary function to FT_PushVid().  At some time
     after saving the video states it will probably be necessary to restore
     them.  This is done by restoring the settings from the last call to
     FT_PushVid().  The number of items on the internal stack is then
     reduced by one.  Note that the use of stack logic means that items on
     the stack are retrieved in Last In First Out order.

 Examples

     FT_PopVid()          // Restore video states

 Source: PVID.PRG

 Author: Ted Means

See Also: FT_PushVid()

 

FT_GETVPG

FT_GETVPG()
 Get the currently selected video page

 Syntax

      FT_GETVPG() -> <nPage>

 Arguments

     None.

 Returns

     The video page, as a numeric.

 Description

     Get the currently selected video page

     For more information on graphics programming and video pages,
     consult a reference such as _Programmer's Guide to PC and PS/2
     Video Systems_ (Microsoft Press).

 Examples

     nPage := FT_GETVPG()

 Source: PAGE.PRG

 Author: Glenn Scott

See Also: FT_SETVPG()

 

FT_GETVCUR

FT_GETVCUR()
 Return info about the cursor on a specified video page

 Syntax

      FT_GETVCUR( [ <nPage> ] ) -> <aCurInfo>

 Arguments

    <nPage> is the video page to get the cursor information for.
    Defaults to the current page, as returned by FT_GETVPG().

 Returns

     A four-element array (<aCurInfo>), set up as follows:

     aCurInfo[1] = Top line of cursor
     aCurInfo[2] = Bottom line of cursor
     aCurInfo[3] = Character row
     aCurInfo[4] = Character column

 Description

    FT_GETVCUR() uses FT_INT86() to invoke interrupt 10h, function
    3, to return the character cursor location for the specified
    video page.

    The top line and bottom line of cursor are set depending on
    the current cursor mode, and are only meaningful in alphanumeric
    video modes.

    For more information on graphics programming, cursors, and
    cursor modes, refer to Richard Wilton's _Programmer's Guide to
    PC and PS/2 Video Systems_ (Microsoft Press).

 Examples

     aCurInfo := getVCur( 1 )    // Get info on cursor pos in page 1
     QOut("Row: " + str( aCurInfo[3] ) + "  Col: " + str( aCurInfo[4] ) )

 Source: VIDCUR.PRG

 Author: Glenn Scott

 

FT_GETMODE

FT_GETMODE()
 Get the video mode

 Syntax

      FT_GETMODE() -> nVMode

 Arguments

     None.

 Returns

     The video mode, as a numeric.

 Description

     Use this function to find out what mode your display adapter is in.
     Uses DOS interrupt 10h to get the mode.  For a table of modes
     available on various graphics adapters, refer to a book such
     as Wilton's "Programmer's Guide to PC & PS/2 Video Systems"
     (Microsoft Press)

 Examples

        function main( cMode )

          FT_SETMODE( val( cMode ) )
          QOut( "Video mode is: " + str( FT_GETMODE() ) )
          return ( nil )

 Source: VIDMODE.PRG

 Author: Glenn Scott

 

FT_DISPCNT

FT_DISPCNT()
 Return the number of outstanding calls to DispBegin()

 Syntax

     FT_DispCnt() --> nCount

 Arguments

    None

 Returns

    An integer.

 Description

    Some routines (like exception handlers, for example) must be able to
    guarantee that their output makes it to the screen.  This can be
    difficult if a call to DispBegin() is in effect, because any error
    messages will be sent to Clipper's virtual screen buffer instead of
    the actual physical screen.  This function alleviates the problem by
    allowing you to determine if screen output is being buffered, and if
    so, how many DispEnd() calls are necessary to flush the buffer.

    Although this function does not use "internals" in the conventional
    sense, it still makes use of version-specific information in order
    to locate the virtual screen buffer.  DO NOT attempt to use this
    function with any version of Clipper other than 5.01.

 Examples

    function ErrorHandler()

    // Guarantee that the error message will reach the screen

    while FT_DispCnt() > 0 ; dispend(); end

    // Now it's okay to do the error message

    ErrorMessage( "Something terrible has happened" )

    return NIL

 Source: DISPCNT.ASM

 Author: Ted Means

 

FT_CLS

FT_CLS()
 Clear screen

 Syntax

      FT_CLS( <nTRow>, <nLCol>, <nBRow>, <nRCol>, <nColor> ) -> NIL

 Arguments

     <nTRow>, <nLCol>, <nBRow> and  <nRCol> are the screen coordinates
     to clear.

     <nColor> is an integer representing the color attribute.
     The formula is:

       nFore + ( nBack * 16 )

     The default is black.

 Returns

     NIL

 Description

     This is a high speed function to clear the screen at the given
     coordinates with the given color attribute.  This does not change
     Clipper's color settings.  It uses direct video writes for speed.

 Examples

     FT_CLS( 0, 0, MaxRow(), MaxCol(), 165 )

     This example will clear the entire screen with the colors
     bright white on magenta.

 Source: VIDEO1.C

 Author: Robert A. DiFalco

 

FT_ADAPTER

FT_ADAPTER()
 Report the type of video adapter installed

 Syntax

     FT_ADAPTER() -> nResult

 Arguments

    None

 Returns

    Integer representing type of video adapter

       0 - monochrome
       1 - CGA
       2 - EGA
       3 - VGA

 Description

    This function is valuable if you use a graphics library and need to
    know what type of graphics adapter is installed.

    The source code is written to adhere to Turbo Assembler's IDEAL mode.
    To use another assembler, you will need to rearrange the PROC and
    SEGMENT directives, and also the ENDP and ENDS directives (a very
    minor task).

 Examples

    iVideo := FT_ADAPTER()

    DO CASE
       CASE iVideo == 0
          QOUT( "You have a monochrome adapter." )
       CASE iVideo == 1
          QOUT( "You have a CGA adapter." )
       CASE iVideo == 2
          QOUT( "You have an EGA adapter." )
       CASE iVideo == 3
          QOUT( "You have a VGA adapter." )
    ENDCASE

 Source: ADAPTER.ASM

 Author: Ted Means

See Also: FT_SETMODE()