Files
harbour-core/harbour/tests/videotst.prg
Viktor Szakats 4d4bb8e11c 2008-07-28 20:41 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* tests/ainstest.prg
   * tests/array16.prg
   * tests/arrays.prg
   * tests/atest.prg
   * tests/clasinit.prg
   * tests/classch.prg
   * tests/classes.prg
   * tests/dates.prg
   * tests/db_brows.prg
   * tests/ddate.prg
   * tests/debugtst.prg
   * tests/dynobj.prg
   * tests/files.prg
   * tests/gfx.prg
   * tests/inline.prg
   * tests/keywords.prg
   * tests/objects.prg
   * tests/onidle.prg
   * tests/readhrb.prg
   * tests/rtfclass.prg
   * tests/speed.prg
   * tests/switch.prg
   * tests/test_all.prg
   * tests/testbrw.prg
   * tests/testcgi.prg
   * tests/testcls.prg
   * tests/testget.prg
   * tests/testhtml.prg
   * tests/testidle.prg
   * tests/testinit.prg
   * tests/testntx.prg
   * tests/testpers.prg
   * tests/testrdd2.prg
   * tests/teststr.prg
   * tests/tstblock.prg
   * tests/tstmacro.prg
   * tests/videotst.prg
   * tests/vidtest.prg
   * tests/wcecon.prg
     * Cleanups. SVN header, '=' operator usage.
2008-07-28 18:43:42 +00:00

86 lines
1.9 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* $Id$
*/
* videotst.prg
*
* Copyright 2000 Alejandro de Garate <alex_degarate@hotmail.com>
*
* Test SETMODE() for Harbour Project
*
#define HB_NOT_SUPPORTED "Video mode not supported on this system.."
#define HB_VROW 1
#define HB_VCOL 2
#define HB_PROMPT 3
FUNCTION MAIN()
LOCAL nMode:= 1, nRow, lSuccess
LOCAL aVModes:= {;
{ 12, 40, " 12 x 40 " },;
{ 25, 40, " 25 x 40 " },;
{ 28, 40, " 28 x 40 " },;
{ 50, 40, " 50 x 40 " },;
{ 12, 80, " 12 x 80 " },;
{ 25, 80, " 25 x 80 " },;
{ 28, 80, " 28 x 80 " },;
{ 43, 80, " 43 x 80 " },;
{ 50, 80, " 50 x 80 " },;
{ 60, 80, " 60 x 80 " } }
DO WHILE (nMode != 0)
CLEAR SCREEN
@ 0, 0 SAY "Select the video mode you want to test.."
FOR nRow:= 1 To 5
@ 2 + nRow, 10 PROMPT aVModes [nRow] [HB_PROMPT]
NEXT
FOR nRow:= 6 To 10
@ 2 + nRow - 5, 25 PROMPT aVModes [nRow] [HB_PROMPT]
NEXT
MENU TO nMode
If (nMode > 0)
lSuccess := SETMODE( aVModes [nMode] [HB_VROW], aVModes [nMode] [HB_VCOL])
IF lSuccess == .T.
TESTBOX( aVModes [nMode] [HB_PROMPT] )
ELSE
@ MAXROW(), 0 SAY HB_NOT_SUPPORTED
INKEY(0)
ENDIF
ENDIF
ENDDO
QUIT
RETURN 0
**************************
PROCEDURE TESTBOX( cMode )
****************************************************************************
* Simple testing screen..
****************************************************************************
LOCAL nRow
CLEAR SCREEN
@ 0, 0 TO MAXROW(), MAXCOL() DOUBLE
@ 0, 3 SAY cMode
@ MAXROW(), 3 SAY " Press a key "
@ 8, 0 SAY REPLICATE( " ", 20)
@ 9, 0 SAY REPLICATE( "0123456789", 20)
FOR nRow:= 0 TO MAXROW()
@ nRow, 18 SAY STR( nRow, 2)
NEXT
@ 4, 2 SAY "MaxRow() = " + STR( MAXROW(), 3)
@ 5, 2 SAY "MaxCol() = " + STR( MAXCOL(), 3)
INKEY(0)
RETURN