diff --git a/harbour/ChangeLog b/harbour/ChangeLog index eb1ec9fad3..98ec925fed 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,7 @@ +19990908-03:05 EDT Paul Tucker + * source/rtl/gt/gtos2.c + + hb_gt_scroll by Chen Kedem + 19990908-08:24 GMT+1 Antonio Linares * makefile.b32 * strfmt.c and strfmt.obj were missing. diff --git a/harbour/source/rtl/gt/gtos2.c b/harbour/source/rtl/gt/gtos2.c index 5531b0df0d..32ac8f3a3b 100644 --- a/harbour/source/rtl/gt/gtos2.c +++ b/harbour/source/rtl/gt/gtos2.c @@ -83,6 +83,30 @@ char hb_gt_Col(void) } +void hb_gt_Scroll( USHORT usTop, USHORT usLeft, USHORT usBottom, USHORT usRight, char attribute, SHORT sVert, SHORT sHoriz ) +{ +/* Chen Kedem */ + + BYTE bCell[ 2 ]; /* character/attribute pair */ + + bCell [ 0 ] = ' '; + bCell [ 1 ] = (BYTE)attribute; + if ( (sVert | sHoriz) == 0 ) /* both zero, clear region */ + VioScrollUp ( usTop, usLeft, usBottom, usRight, 0xFFFF, bCell, 0 ); + else + { + if ( sVert > 0 ) /* scroll up */ + VioScrollUp ( usTop, usLeft, usBottom, usRight, sVert, bCell, 0 ); + else if ( sVert < 0 ) /* scroll down */ + VioScrollDn ( usTop, usLeft, usBottom, usRight, -sVert, bCell, 0 ); + + if ( sHoriz > 0 ) /* scroll left */ + VioScrollLf ( usTop, usLeft, usBottom, usRight, sHoriz, bCell, 0 ); + else if ( sHoriz < 0 ) /* scroll right */ + VioScrollRt ( usTop, usLeft, usBottom, usRight, -sHoriz, bCell, 0 ); + } +} + /* QUESTION: not been used, do we need this function ? */ /* Answer: In the dos version, this gets called by hb_gt_GetCursorStyle() as that function is written below, we don't need this */