See ChangeLog entry 19990602-11:35 EDT David G. Holm <dholm@jsd-llc.com>
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
19990602-11:35 EDT David G. Holm <dholm@jsd-llc.com>
|
||||
* source/rtl/console.c
|
||||
- Added HARBOUR SCROLL()
|
||||
* source/rtl/gtapi.c
|
||||
- Added HARBOUR MAXROW() and MAXCOL()
|
||||
+ tests/working/scroll.prg
|
||||
- New test module to demonstrate scrolling
|
||||
|
||||
19990602-12:00 WIB Andi Jahja <andij@aonlippo.co.id>
|
||||
+ gt.b32 - make file for gt functions
|
||||
+ bldgt32.bat - batch file for hbgt.lib
|
||||
@@ -36,6 +44,7 @@
|
||||
Added:
|
||||
* source/hbpp/buildgcc.bat
|
||||
* source/hbpp/table.c
|
||||
|
||||
19990601-23:50 EDT David G. Holm <dholm@jsd-llc.com>
|
||||
* makefile.b31
|
||||
- Made progress on GT API, so put USE_GTAPI back in as default.
|
||||
|
||||
@@ -317,3 +317,25 @@ HARBOUR SETPRC( void ) /* Sets the current printer row and column positions */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HARBOUR SCROLL( void ) /* Scrolls a screen region (requires the GT API) */
|
||||
{
|
||||
#ifdef USE_GTAPI
|
||||
int top = 0, left = 0, bottom = _gtMaxRow(), right = _gtMaxCol(),
|
||||
v_scroll = 0, h_scroll = 0;
|
||||
|
||||
if( _pcount() > 0 && _param( 1, IT_NUMERIC ) )
|
||||
top = _parni( 1 );
|
||||
if( _pcount() > 1 && _param( 2, IT_NUMERIC ) )
|
||||
left = _parni( 2 );
|
||||
if( _pcount() > 2 && _param( 3, IT_NUMERIC ) )
|
||||
bottom = _parni( 3 );
|
||||
if( _pcount() > 3 && _param( 4, IT_NUMERIC ) )
|
||||
right = _parni( 4 );
|
||||
if( _pcount() > 4 && _param( 5, IT_NUMERIC ) )
|
||||
v_scroll = _parni( 5 );
|
||||
if( _pcount() > 5 && _param( 6, IT_NUMERIC ) )
|
||||
h_scroll = _parni( 6 );
|
||||
_gtScroll( top, left, bottom, right, v_scroll, h_scroll );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -492,6 +492,16 @@ int _gtScroll(USHORT uiTop, USHORT uiLeft, USHORT uiBottom, USHORT uiRight, SHOR
|
||||
return(0);
|
||||
}
|
||||
|
||||
HARBOUR MaxRow( void ) /* Return the maximum screen row number (zero origin) */
|
||||
{
|
||||
_retni( _gtMaxRow () );
|
||||
}
|
||||
|
||||
HARBOUR MaxCol( void ) /* Return the maximum screen column number (zero origin) */
|
||||
{
|
||||
_retni( _gtMaxCol () );
|
||||
}
|
||||
|
||||
#ifdef TEST
|
||||
void main(void)
|
||||
{
|
||||
|
||||
53
harbour/tests/working/scroll.prg
Normal file
53
harbour/tests/working/scroll.prg
Normal file
@@ -0,0 +1,53 @@
|
||||
function main()
|
||||
|
||||
Scroll()
|
||||
DevPos (MAXROW(), 0)
|
||||
Qout( "If the GT API was linked in, the rest of the screen should be blank now." )
|
||||
Pause()
|
||||
Scroll()
|
||||
DevPos (0, 0)
|
||||
QQOUT("01234567890123456789012345678901")
|
||||
QOUT ("01234567890123456789012345678901")
|
||||
QOUT ("01234567890123456789012345678901")
|
||||
QOUT ("01234567890123456789012345678901")
|
||||
QOUT ("01234567890123456789012345678901")
|
||||
QOUT ("01234567890123456789012345678901")
|
||||
QOUT ("01234567890123456789012345678901")
|
||||
QOUT ("01234567890123456789012345678901")
|
||||
QOUT ("01234567890123456789012345678901")
|
||||
QOUT ("01234567890123456789012345678901")
|
||||
QOUT ("01234567890123456789012345678901")
|
||||
QOUT ("01234567890123456789012345678901")
|
||||
QOUT ("01234567890123456789012345678901")
|
||||
DevPos (3, 5)
|
||||
Qqout (" ")
|
||||
DevPos (4, 5)
|
||||
Qqout (" This is a test. ")
|
||||
DevPos (5, 5)
|
||||
Qqout (" This is only a test. ")
|
||||
DevPos (6, 5)
|
||||
Qqout (" Had this been a real ")
|
||||
DevPos (7, 5)
|
||||
Qqout (" emergency, you would ")
|
||||
DevPos (8, 5)
|
||||
Qqout (" be dead now. ")
|
||||
DevPos (9, 5)
|
||||
Qqout (" ")
|
||||
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()
|
||||
Scroll (1, 1, 11, 30)
|
||||
pause()
|
||||
|
||||
return nil
|
||||
|
||||
function pause()
|
||||
DevPos (MAXROW() - 2, 0)
|
||||
__ACCEPT ("pause: ")
|
||||
return nil
|
||||
Reference in New Issue
Block a user