Files
harbour-core/harbour/tests/boxtst2.prg
Viktor Szakats 70140e5aed 2012-07-22 23:52 UTC+0200 Viktor Szakats (vszakats syenar.net)
* contrib/hbct/tests/ctwtest.prg
  * contrib/hbcups/tests/test.prg
  * contrib/hbfbird/tests/stress.prg
  * contrib/hbnf/aredit.prg
  * contrib/hbnf/doc/en/aredit.txt
  * contrib/hbnf/menu1.prg
  * contrib/hbnf/popadder.prg
  * contrib/hbnf/tbwhile.prg
  * contrib/hbpgsql/tests/async.prg
  * contrib/hbpgsql/tests/cache.prg
  * contrib/hbpgsql/tests/stress.prg
  * contrib/hbpgsql/tests/test.prg
  * contrib/hbtip/tests/tiptest.prg
  * contrib/xhb/tests/compress.prg
  * doc/en/sayget.txt
  * src/rtl/profiler.prg
  * tests/ac_test.prg
  * tests/boxtst2.prg
  * tests/fortest.prg
  * tests/menutest.prg
  * tests/mt/mttest11.prg
  * tests/parseini.prg
  * tests/speedold.prg
  * tests/tstchbx.prg
  * tests/usrrdd/exarr.prg
  * tests/videotst.prg
  * tests/vidtest.prg
    * formatting
    ! deleted SetMode()s
    * CLEAR SCREEN -> CLS
    * other minor cleanups
2012-07-22 21:54:14 +00:00

54 lines
1.9 KiB
Plaintext

/*
* $Id$
*/
// Test program for box and line drawing functions.
/* Harbour Project source code
http://harbour-project.org/
Donated to the public domain on 2001-08-22 by David G. Holm <dholm@jsd-llc.com>
*/
#include "box.ch"
PROCEDURE Main()
LOCAL max_row, max_col, boxColor := "W+/B,N/BG", lineColor := "W+/R, N/BG"
CLS
max_row := MaxRow()
max_col := MaxCol()
// Draw filled boxes centered around the four screen corners.
DispBox( -10, -10, 10, 10, B_SINGLE + "X", boxColor )
DispBox( -10, max_col - 10, 10, max_col + 10, B_SINGLE + "X", boxColor )
DispBox( max_row - 10, - 10, max_row + 10, 10, B_SINGLE + "X", boxColor )
DispBox( max_row - 10, max_col - 10, max_row + 10, max_col + 10, B_SINGLE + "X", boxColor )
// Draw non-filled boxes around the filled boxes.
DispBox( -15, -15, 15, 15, 1, boxColor )
DispBox( -15, max_col - 15, 15, max_col + 15, 1, boxColor )
DispBox( max_row - 15, - 15, max_row + 15, 15, 1, boxColor )
DispBox( max_row - 15, max_col - 15, max_row + 15, max_col + 15, 1, boxColor )
// Draw a box in the center, then two boxes off screen.
DispBox( 20, 20, 25, 60, 2, boxColor )
DispBox( -10, -10, -1, -1, 2, boxColor )
DispBox( max_row + 1, max_col + 1, max_row + 10, max_col + 10, 2, boxColor )
// Draw horizontal lines from off-screen to on-screen,
// off-screen to off-screen, and on-screen to off-screen.
DispBox( 1, -10, 1, 10, B_SINGLE, lineColor )
DispBox( 2, -10, 2, max_col + 10, B_DOUBLE, lineColor )
DispBox( 3, max_col - 10, 3, max_col + 10, B_SINGLE, lineColor )
// Draw vertical lines from off-screen to on-screen,
// off-screen to off-screen, and on-screen to off-screen.
DispBox( -10, 1, 10, 1, B_SINGLE, lineColor )
DispBox( -10, 2, max_row + 10, 2, B_DOUBLE, lineColor )
DispBox( max_row - 10, 3, max_row + 10, 3, B_SINGLE, lineColor )
Inkey( 5 )
RETURN