FT_GETMODE() | Get the video mode |
FT_GETVCUR() | Return info about the cursor on a specified video page |
FT_GETVPG() | Get the currently selected video page |
FT_POPVID() | Restore previously saved video states. |
FT_PUSHVID() | Save current video states on internal stack. |
FT_RGNSTACK() | Push or pop a saved screen region on or off the stack |
FT_RSTRGN() | Restore region of the screen saved with FT_SAVRGN() |
FT_SAVRGN() | Save a screen region for later display |
FT_SETMODE() | Set the video mode |
FT_SETVCUR() | Set the cursor position on a specified video page |
FT_SETVPG() | Set the current video page |
FT_GETMODE() -> nVMode
No arguments
The video mode, as a numeric.
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)
function main( cMode ) FT_SETMODE( val( cMode ) ) QOut( "Video mode is: " + str( FT_GETMODE() ) ) return ( nil )
FT_GETVCUR( [ <nPage> ] ) -> <aCurInfo>
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
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).
aCurInfo := getVCur( 1 ) // Get info on cursor pos in page 1 QOut("Row: " + str( aCurInfo[3] ) + " Col: " + str( aCurInfo[4] ) )
FT_GETVPG() -> <nPage>
No arguments
The video page, as a numeric.
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).
nPage := FT_GETVPG()
FT_PopVid() -> <nStackSize>
No arguments
The number of items remaining in the internal stack.
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.
FT_PopVid() // Restore video states
FT_PushVid() -> <nStackSize>
No arguments
The current size of the internal stack (i.e. the number of times FT_PushVid() has been called).
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().
FT_PushVid() // Save the current video states
FT_RGNSTACK( <cAction>, [ <nTop> ], [ <nLeft> ], [ <nBottom> ], [ <nRight> ] ) -> NIL
<cAction> | determines what action FT_RGNSTACK() will take. The |
allowable values for this parameter are "push", "pop", and "pop all". | |
If the function is called with any other string as the first parameter | |
no action is performed. | |
<cAction> | with a value of "push" will push a saved screen region onto |
the stack. A value of "pop" will restore the most recently pushed | |
screen region. "pop all" tells the function to restore all screen | |
images which are currently on the stack. | |
The use of <nTop>, <nLeft>, <nBottom>, and <nRight> depends on the | |
<cAction> | parameter. If <cAction> is "push", the next four parameters |
define the screen region to save. If <cAction> is "pop" or "pop all" | |
the following four parameters are ignored. |
FT_RGNSTACK() returns NIL.
FT_RGNSTACK() allows multiple screens to be saved and restored from a stack. The stack is implemented with Clipper static array that is visible only to FT_RGNSTACK().
The purpose of FT_RGNSTACK() is to allow multiple screen regions to be managed without the need to remember the original coordinates or to create variables for each one.
When called with "push", FT_RGNSTACK() places the saved screen area at the end of the static array. The array size is incremented by one to accommodate the new screen area.
When called with "pop", the function restores the screen image stored in the last element of the array, and the array size is decremented by one. If "pop all" is specified, all the saved screens are restored until the array is empty.
FT_RGNSTACK() calls FT_SAVRGN() and FT_RSTRGN(). Refer to the documentation for these two functions for more information.
The following example uses FT_RGNSTACK() to save and restore various sections of the screen. @ 00, 00, 24, 79 BOX "111111111" // fill the screen with 1's FT_RGNSTACK("push", 10, 05, 15, 15) // push a region @ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2's FT_RGNSTACK("push", 10, 20, 15, 30) // push a region @ 00, 00, 24, 79 BOX "333333333" // fill the screen with 3's FT_RGNSTACK("push", 10, 35, 15, 45) // push a region @ 00, 00, 24, 79 BOX "444444444" // fill the screen with 4's FT_RGNSTACK("push", 10, 50, 15, 60) // push a region @ 00, 00, 24, 79 BOX "555555555" // fill the screen with 5's FT_RGNSTACK("push", 10, 65, 15, 75) // push a region CLEAR FT_RGNSTACK("pop") // restore the 5's region FT_RGNSTACK("pop") // restore the 4's region FT_RGNSTACK("pop all") // restore the 3's, 2's and 1's regions
FT_RSTRGN( <cScreen>, [ <nTop> ], [ <nLeft> ] ) -> NIL
FT_RSTRGN() returns NIL.
FT_RSTRGN() restores a screen region previously saved with FT_SAVRGN(). Calling FT_RSTRGN() with <cScreen> as the only parameter will restore the saved region to its original location. <nTop> and <nLeft> may be used to define a new location for the upper left corner of the saved region.
<nTop> and <nLeft> are dependent upon each other. You may not specify one without the other.
FT_RSTRGN() calls Clipper's RESTSCREEN(). Refer to the Clipper documentation for more information regarding this function.
The following example uses FT_RSTRGN() to restore a saved portion of the screen to different locations. @ 00, 00, 24, 79 BOX "111111111" // fill the screen with 1's cScreen = FT_SAVRGN(10, 10, 20, 30) // save a region @ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2's FT_RSTRGN(cScreen) // restore the 1's region @ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2's FT_RSTRGN(cScreen, 15, 15) // restore to a different location @ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2's FT_RSTRGN(cScreen, 20, 60) // restore to a different location
FT_SAVRGN( <nTop>, <nLeft>, <nBottom>, <nRight> ) -> cScreen
FT_SAVRGN() returns the saved screen region and its coordinates as a character string.
FT_SAVRGN() is similar to Clipper's SAVESCREEN(), but it saves the screen coordinates as well as the display information. The saved area can be restored by passing the returned string to FT_RSTRGN().
Note that the strings returned from FT_SAVRGN() and Clipper's SAVESCREEN() are not interchangeable. A screen region saved with with FT_SAVRGN() must be restored using FT_RSTRGN().
FT_SAVRGN() calls Clipper's SAVESCREEN(). Refer to the Clipper documentation for more information regarding this function.
The following example uses FT_SAVRGN() and FT_RSTRGN() to save and restore a portion of the screen. @ 00, 00, 24, 79 BOX "111111111" // fill the screen with 1's cScreen = FT_SAVRGN(10, 10, 20, 30) // save a region @ 00, 00, 24, 79 BOX "222222222" // fill the screen with 2's FT_RSTRGN(cScreen) // restore the 1's region
FT_SETMODE( <nMode> ) -> NIL
Use this function to put your display adapter into a video mode. Uses DOS interrupt 10h to set 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)
FUNCTION Main( cMode ) FT_SETMODE( VAL( cMode ) ) QOUT( "Video mode is: " + STR( FT_GETMODE() ) ) RETURN ( NIL )
FT_SETVCUR( [ <nPage> ], [ <nRow> ], [ <nCol> ] ) -> NIL
FT_SETVCUR() sets the cursor position on a specific video page. It uses FT_INT86() to invoke interrupt 10h, function 2.
For more information on graphics programming, cursors, and video pages, refer to Richard Wilton's _Programmer's Guide to PC and PS/2 Video Systems_ (Microsoft Press).
// Set the position to row 5, column 10 on video page 1: FT_SETVCUR( 1, 5, 10 )
FT_SETVPG( <nPage> ) -> NIL
Selects the 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).
// The following sets the current video page to 1 FT_SETVPG( 1 )