Files
harbour-core/harbour/tests/scroll.prg
Viktor Szakats 90ef3520b2 2012-10-02 01:10 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbmisc/hbedit.prg
  * src/debug/dbghelp.prg
  * src/debug/dbgtmenu.prg
  * src/debug/dbgtwin.prg
  * src/debug/dbgwa.prg
  * src/rtl/browse.prg
  * src/rtl/listbox.prg
  * src/rtl/radiogrp.prg
  * src/rtl/tmenuitm.prg
  * src/rtl/tpopup.prg
  * tests/gtwin.prg
  * tests/box.prg
  * tests/boxtst2.prg
  * tests/scroll.prg
  * tests/vidtest.prg
    ! fixed to use new unicode-compatible box.ch/button.ch macros
      For standalone programs (in tests) in only makes any difference
      when running them as scripts, now they will work (after
      adding hbshell_gtInteracive() call at startup), while
      before the drawing chars were scrambled.

  * src/rtl/browse.prg
  * src/rtl/checkbox.prg
  * src/rtl/dbedit.prg
  * src/rtl/dbedit.prg
  * src/rtl/listbox.prg
  * src/rtl/scrollbr.prg
  * src/rtl/tmenuitm.prg
    ! fixed Chr() calls for drawing chars to unicode strings
      to be compatible with both unicode and non-unicode (and
      any BOXCP) mode.

  * src/rtl/browse.prg
    ! fixed to use '!( hb_keyChar( nKey ) == "" )' instead
      of looking for keycode between 32 and 255 (inclusive)
      making it unicode compatible
    * formatting

  * src/rtl/tpersist.prg
  * src/rtl/memoedit.prg
  * src/debug/debugger.prg
  * src/debug/dbgthsh.prg
  * src/debug/dbgtarr.prg
  * src/debug/tbrwtext.prg
    * formatting

  * src/rtl/tmenuitm.prg
  * src/rtl/tpopup.prg
    + added TOFIXes where drawing chars are used as internal
      flags. This may cause problems if switching CPs while
      using these objects.

  * tests/sbartest.prg
    + unicode compatibility while keeping it Cl*pper compatible
    ! fixed RTE due to using wrong SCROLLBAR method

  * tests/tb1.prg
    * changed to use new unicode-compatible box.ch/button.ch macros
      while keeping Cl*pper compatibility

  * tests/vidtest.prg
    ! fixed remaining drawing chars using Chr() (Cl*pper
      compatibility maintained)

  * tests/testsha2.prg
  * tests/utf8at.prg
    ! fixed to use HB_BCHAR() instead of CHR() for unicode compatibility.

  ; NOTE: After above changes scripts and commands run via hbrun 
          will display drawing chars properly. Unicode apps as 
          well, even with BOXCP set to unicode, too.

  ; TODO: Fix above things also on C level, f.e. DISPBOX() with
          numeric box drawing request.
2012-10-01 23:16:18 +00:00

72 lines
1.9 KiB
Plaintext

/*
* $Id$
*/
// Testing Harbour screen scrolling (requires the GT API)
/* Harbour Project source code
http://harbour-project.org/
Donated to the public domain on 2001-03-08 by David G. Holm <dholm@jsd-llc.com>
*/
#include "box.ch"
PROCEDURE Main()
LOCAL ct
DevPos( MaxRow(), 0 )
DispBegin()
? "If you have the GT API linked in, the screen will be blanked, a text block"
? "will be drawn in the upper-left hand corner of the screen, and then the inside"
? "of the text block will be scrolled around. Otherwise, you will see the screen"
? "scroll, the text block will be drawn starting from the bottom right and scroll"
? "up, but there will be no scrolling inside the text block."
?
?
DispEnd()
Pause()
SET COLOR TO "GR+/RB"
CLS
@ 0, 0, 14, 45 BOX HB_B_SINGLE_UNI
@ 0, 0 SAY "01234567890123456789012345678901"
@ 1, 0 SAY "01234567890123456789012345678901"
@ 2, 0 SAY "01234567890123456789012345678901"
@ 3, 0 SAY "01234 78901"
@ 4, 0 SAY "01234 This is a test. 78901"
@ 5, 0 SAY "01234 This is only a test. 78901"
@ 6, 0 SAY "01234 Had this been a real 78901"
@ 7, 0 SAY "01234 emergency, you would 78901"
@ 8, 0 SAY "01234 be dead now. 78901"
@ 9, 0 SAY "01234 78901"
@ 10, 0 SAY "01234567890123456789012345678901"
@ 11, 0 SAY "01234567890123456789012345678901"
@ 12, 0 SAY "01234567890123456789012345678901"
@ 13, 0 SAY "0 1 2 3 "
Pause()
//save/restore test
cT := SaveScreen( 0, 0, 13, 31 )
RestScreen( 10, 40, 23, 71, cT )
pause()
Scroll ( 1, 1, 11, 30, - 2, - 5 )
pause()
Scroll ( 1, 1, 11, 30, 2, 5 )
pause()
Scroll ( 1, 1, 11, 30, - 5, 2 )
pause()
Scroll ( 1, 1, 11, 30, 7, - 12 )
pause()
SET COLOR TO "W+/R"
Scroll ( 1, 1, 11, 30, 0, 0 )
pause()
RETURN
FUNCTION pause()
DevPos ( MaxRow() - 2, 0 )
__Accept ( "pause: " )
RETURN NIL