From 4d0b9c1fb33b36bca66977d04d3255f001f11860 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 12 Oct 2012 14:10:29 +0000 Subject: [PATCH] 2012-10-12 16:05 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbmisc/hbedit.prg * contrib/hbnf/clrsel.prg * contrib/hbnf/menu1.prg * contrib/hbnf/pegs.prg * contrib/hbnf/pending.prg * contrib/hbnf/pickday.prg * contrib/hbnf/popadder.prg * contrib/hbnf/tbwhile.prg * contrib/hbnf/vertmenu.prg * contrib/hbnf/xbox.prg * tests/db_brows.prg * tests/testbrw.prg * @ CLEAR TO -> hb_Scroll() * @ BOX -> hb_DispBox() * tests/testbrw.prg % hb_DispOutAt() instead of @ SAY and saving/restoring position * contrib/gtwvg/class.prg * contrib/gtwvg/tests/cuigdlgs.prg * contrib/gtwvg/tests/demowvg.prg * contrib/gtwvg/tests/demowvg1.prg * contrib/gtwvg/tests/wvtcls.prg * extras/gtwvw/tests/wvwtest9.prg % PAD() -> PADR() --- harbour/ChangeLog | 28 ++++++++++++++++++++++++ harbour/contrib/gtwvg/class.prg | 10 ++++----- harbour/contrib/gtwvg/tests/cuigdlgs.prg | 8 +++---- harbour/contrib/gtwvg/tests/demowvg.prg | 8 +++---- harbour/contrib/gtwvg/tests/demowvg1.prg | 8 +++---- harbour/contrib/gtwvg/tests/wvtcls.prg | 8 +++---- harbour/contrib/hbmisc/hbedit.prg | 2 +- harbour/contrib/hbnf/clrsel.prg | 22 ++++++++----------- harbour/contrib/hbnf/menu1.prg | 4 ++-- harbour/contrib/hbnf/pegs.prg | 9 ++++---- harbour/contrib/hbnf/pending.prg | 2 +- harbour/contrib/hbnf/pickday.prg | 2 +- harbour/contrib/hbnf/popadder.prg | 10 ++++----- harbour/contrib/hbnf/tbwhile.prg | 4 ++-- harbour/contrib/hbnf/vertmenu.prg | 2 +- harbour/contrib/hbnf/xbox.prg | 2 +- harbour/extras/gtwvw/tests/wvwtest9.prg | 8 +++---- harbour/tests/db_brows.prg | 10 ++++----- harbour/tests/testbrw.prg | 16 ++++---------- 19 files changed, 90 insertions(+), 73 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8b6928e208..e9e42ff0b5 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,34 @@ The license applies to all entries newer than 2009-04-28. */ +2012-10-12 16:05 UTC+0200 Viktor Szakats (harbour syenar.net) + * contrib/hbmisc/hbedit.prg + * contrib/hbnf/clrsel.prg + * contrib/hbnf/menu1.prg + * contrib/hbnf/pegs.prg + * contrib/hbnf/pending.prg + * contrib/hbnf/pickday.prg + * contrib/hbnf/popadder.prg + * contrib/hbnf/tbwhile.prg + * contrib/hbnf/vertmenu.prg + * contrib/hbnf/xbox.prg + * tests/db_brows.prg + * tests/testbrw.prg + * @ CLEAR TO -> hb_Scroll() + * @ BOX -> hb_DispBox() + + * tests/testbrw.prg + % hb_DispOutAt() instead of @ SAY and + saving/restoring position + + * contrib/gtwvg/class.prg + * contrib/gtwvg/tests/cuigdlgs.prg + * contrib/gtwvg/tests/demowvg.prg + * contrib/gtwvg/tests/demowvg1.prg + * contrib/gtwvg/tests/wvtcls.prg + * extras/gtwvw/tests/wvwtest9.prg + % PAD() -> PADR() + 2012-10-12 15:34 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/gtwvg/class.prg * contrib/gtwvg/tests/demowvg.prg diff --git a/harbour/contrib/gtwvg/class.prg b/harbour/contrib/gtwvg/class.prg index 37fe99ab8f..ff3c446888 100644 --- a/harbour/contrib/gtwvg/class.prg +++ b/harbour/contrib/gtwvg/class.prg @@ -1223,7 +1223,7 @@ METHOD WvtBrowse:Hilite() LOCAL b := ::oBrw - hb_DispOutAt( b:nTop - 2, b:nLeft - 2, Pad( " " + ::cDesc, b:nRight - b:nLeft + 5 ), ::cColorHilite ) + hb_DispOutAt( b:nTop - 2, b:nLeft - 2, PadR( " " + ::cDesc, b:nRight - b:nLeft + 5 ), ::cColorHilite ) RETURN Self @@ -1233,7 +1233,7 @@ METHOD WvtBrowse:DeHilite() LOCAL b := ::oBrw - hb_DispOutAt( b:nTop - 2, b:nLeft - 2, Pad( " " + ::cDesc, b:nRight - b:nLeft + 5 ), ::cColorDeHilite ) + hb_DispOutAt( b:nTop - 2, b:nLeft - 2, PadR( " " + ::cDesc, b:nRight - b:nLeft + 5 ), ::cColorDeHilite ) RETURN Self @@ -1490,7 +1490,7 @@ CLASS WvtPanel FROM WvtObject DATA cIconFile ACCESS TEXT INLINE ::cTxt - ASSIGN TEXT( cText ) INLINE ::cTxt := Pad( cText, ::nRight - ::nLeft - 2 ) + ASSIGN TEXT( cText ) INLINE ::cTxt := PadR( cText, ::nRight - ::nLeft - 2 ) METHOD New( oParent, nId, nTop, nLeft ) METHOD Refresh() @@ -2391,7 +2391,7 @@ METHOD WvtGets:SetData( /*aData*/ ) METHOD WvtGets:Hilite() - hb_DispOutAt( ::nTop, ::nLeft, Pad( " " + ::cDesc, ::nRight - ::nLeft + 1 ), ::cColorHilite ) + hb_DispOutAt( ::nTop, ::nLeft, PadR( " " + ::cDesc, ::nRight - ::nLeft + 1 ), ::cColorHilite ) RETURN Self @@ -2399,7 +2399,7 @@ METHOD WvtGets:Hilite() METHOD WvtGets:DeHilite() - hb_DispOutAt( ::nTop, ::nLeft, Pad( " " + ::cDesc, ::nRight - ::nLeft + 1 ), ::cColorDeHilite ) + hb_DispOutAt( ::nTop, ::nLeft, PadR( " " + ::cDesc, ::nRight - ::nLeft + 1 ), ::cColorDeHilite ) RETURN Self diff --git a/harbour/contrib/gtwvg/tests/cuigdlgs.prg b/harbour/contrib/gtwvg/tests/cuigdlgs.prg index e28351010a..464e3ace87 100644 --- a/harbour/contrib/gtwvg/tests/cuigdlgs.prg +++ b/harbour/contrib/gtwvg/tests/cuigdlgs.prg @@ -39,10 +39,10 @@ PROCEDURE ExecGCUI() PROCEDURE GCUIConsole( oCrt ) LOCAL dDate := Date() - LOCAL cName := Pad( 'Some Usefule Name' , 35 ) - LOCAL cAdd1 := Pad( 'Linda Goldman Avenue', 35 ) - LOCAL cAdd2 := Pad( 'Excellent Street' , 35 ) - LOCAL cAdd3 := Pad( 'Suit #415' , 35 ) + LOCAL cName := PadR( 'Some Usefule Name' , 35 ) + LOCAL cAdd1 := PadR( 'Linda Goldman Avenue', 35 ) + LOCAL cAdd2 := PadR( 'Excellent Street' , 35 ) + LOCAL cAdd3 := PadR( 'Suit #415' , 35 ) LOCAL nSlry := 9000 LOCAL nColGet := 8 LOCAL GetList := {} diff --git a/harbour/contrib/gtwvg/tests/demowvg.prg b/harbour/contrib/gtwvg/tests/demowvg.prg index 2996aad8f1..9653a86f53 100644 --- a/harbour/contrib/gtwvg/tests/demowvg.prg +++ b/harbour/contrib/gtwvg/tests/demowvg.prg @@ -88,10 +88,10 @@ PROCEDURE Main() LOCAL aLastPaint, clr, scr, pGT LOCAL hPopup LOCAL dDate := SToD() - LOCAL cName := Pad( "Pritpal Bedi", 35 ) - LOCAL cAdd1 := Pad( "60, New Professor Colony", 35 ) - LOCAL cAdd2 := Pad( "Ludhiana, INDIA", 35 ) - LOCAL cAdd3 := Pad( "http://hbide.vouch.info", 35 ) + LOCAL cName := PadR( "Pritpal Bedi", 35 ) + LOCAL cAdd1 := PadR( "60, New Professor Colony", 35 ) + LOCAL cAdd2 := PadR( "Ludhiana, INDIA", 35 ) + LOCAL cAdd3 := PadR( "http://hbide.vouch.info", 35 ) LOCAL nSlry := 20000 LOCAL aBlocks := {} LOCAL nColGet := 8 diff --git a/harbour/contrib/gtwvg/tests/demowvg1.prg b/harbour/contrib/gtwvg/tests/demowvg1.prg index 6050720dbb..404a3214bc 100644 --- a/harbour/contrib/gtwvg/tests/demowvg1.prg +++ b/harbour/contrib/gtwvg/tests/demowvg1.prg @@ -82,10 +82,10 @@ STATIC FUNCTION ExecForm( aPaint ) LOCAL cColor := SetColor() LOCAL aPnt LOCAL dDate := Date() - LOCAL cName := Pad( "Pritpal Bedi", 35 ) - LOCAL cAdd1 := Pad( "60, New Professor Colony", 35 ) - LOCAL cAdd2 := Pad( "Ludhiana, INDIA", 35 ) - LOCAL cAdd3 := Pad( "http://hbide.vouch.info", 35 ) + LOCAL cName := PadR( "Pritpal Bedi", 35 ) + LOCAL cAdd1 := PadR( "60, New Professor Colony", 35 ) + LOCAL cAdd2 := PadR( "Ludhiana, INDIA", 35 ) + LOCAL cAdd3 := PadR( "http://hbide.vouch.info", 35 ) LOCAL nSlry := 20000 LOCAL nColGet := 8 diff --git a/harbour/contrib/gtwvg/tests/wvtcls.prg b/harbour/contrib/gtwvg/tests/wvtcls.prg index 23ce48e3cf..8c15000432 100644 --- a/harbour/contrib/gtwvg/tests/wvtcls.prg +++ b/harbour/contrib/gtwvg/tests/wvtcls.prg @@ -259,10 +259,10 @@ STATIC FUNCTION MyDialogOne( oCrt ) oCon:Say( nGetRow + 20, nSayCol, "Notes", , "B+/W" ) ; } - aGets_ := { Pad( "Pritpal", 20 ), Pad( "Bedi", 20 ), Pad( "60, New Professor Colony", 30 ), ; - Pad( "Ludhiana, INDIA", 30 ), ; - "PB", Pad( "141004", 10 ), SToD( "20040622" ), .T. , 48, 17000, ; - Pad( "Wvtgui is a classical example of Harbour capabilities...", 65 ) } + aGets_ := { PadR( "Pritpal", 20 ), PadR( "Bedi", 20 ), PadR( "60, New Professor Colony", 30 ), ; + PadR( "Ludhiana, INDIA", 30 ), ; + "PB", PadR( "141004", 10 ), SToD( "20040622" ), .T. , 48, 17000, ; + PadR( "Wvtgui is a classical example of Harbour capabilities...", 65 ) } oGet1 := WvtGets():New( oDlg, , 4, 2, 37, 62 ) oGet1:AddGets( nGetRow + 00, nGetCol, aGets_[ 1 ], "@ " , "N/W*,N/GR*" ) diff --git a/harbour/contrib/hbmisc/hbedit.prg b/harbour/contrib/hbmisc/hbedit.prg index 396d90e46b..497c91881e 100644 --- a/harbour/contrib/hbmisc/hbedit.prg +++ b/harbour/contrib/hbmisc/hbedit.prg @@ -541,7 +541,7 @@ FUNCTION SaveBox( top, left, bott, right, kolor, patt ) IF PCount() > 4 cClr := SetColor( kolor ) cBox := SaveScreen( top, left, bott, right ) - @ top, left, bott, right BOX patt + hb_DispBox( top, left, bott, right, patt ) ELSE cClr := SetColor() cBox := SaveScreen( top, left, bott, right ) diff --git a/harbour/contrib/hbnf/clrsel.prg b/harbour/contrib/hbnf/clrsel.prg index 43dc7aed4c..00f5b344ed 100644 --- a/harbour/contrib/hbnf/clrsel.prg +++ b/harbour/contrib/hbnf/clrsel.prg @@ -62,14 +62,10 @@ #define C_CHAR 4 #translate Single( , , , ) =>; - @ , , , BOX hb_UTF8ToStrBox( "┌─┐│┘─└│" ) - + hb_DispBox( , , , , hb_UTF8ToStrBox( "┌─┐│┘─└│" ) ) #translate Double( , , , ) =>; - @ , , , BOX hb_UTF8ToStrBox( "╔═╗║╝═╚║" ) - -#translate ClearS( , , , ) =>; - @ , CLEAR TO , + hb_DispBox( , , , , hb_UTF8ToStrBox( "╔═╗║╝═╚║" ) ) #translate BkGrnd( , , , , ) =>; hb_DispBox( , , , , Replicate( , 9 ) ) @@ -145,7 +141,7 @@ FUNCTION FT_ClrSel( aClrs, lColour, cChr ) //.... set up the window for aChoice SetColor( iif( lColour, "N/W,W+/R", "N/W,W+/N" ) ) - ClearS( nT, nL, nB, nR ) + hb_Scroll( nT, nL, nB, nR ) //.... prompt for colour setting and modify DO WHILE nChoice != 0 @@ -237,7 +233,7 @@ STATIC FUNCTION _ftColours( aOpt, aClrPal, lColour ) //.... set up the window for prompt SetColor( "N/W" ) - ClearS( nT, nL, nB, nR ) + hb_Scroll( nT, nL, nB, nR ) ENDIF DO WHILE .T. @@ -345,7 +341,7 @@ STATIC FUNCTION _ftShowIt( aOpt ) CASE aOpt[ C_TYPE ] == "G" // Get windows SetColor( aClr[ 1 ] ) - ClearS( 19, 41, 24, 66 ) + hb_Scroll( 19, 41, 24, 66 ) Single( 19, 42, 24, 65 ) @ 20, 43 SAY " Invoice Entry " @ 21, 42 SAY hb_UTF8ToStr( "├──────────────────────┤" ) @@ -358,7 +354,7 @@ STATIC FUNCTION _ftShowIt( aOpt ) CASE aOpt[ C_TYPE ] == "W" // Alert windows SetColor( aClr[ 1 ] ) - ClearS( 18, 40, 24, 66 ) + hb_Scroll( 18, 40, 24, 66 ) Single( 18, 41, 24, 65 ) @ 19, 42 SAY " " @ 20, 42 SAY " Test Message " @@ -371,7 +367,7 @@ STATIC FUNCTION _ftShowIt( aOpt ) CASE aOpt[ C_TYPE ] == "B" // browse windows SetColor( aClr[ 1 ] ) - ClearS( 18, 37, 24, 70 ) + hb_Scroll( 18, 37, 24, 70 ) Single( 18, 38, 24, 69 ) @ 19, 39 SAY " Cust Name Amount " @ 20, 38 SAY hb_UTF8ToStr( "╞══════╤══════════════╤════════╡" ) @@ -387,7 +383,7 @@ STATIC FUNCTION _ftShowIt( aOpt ) CASE aOpt[ C_TYPE ] == "A" // achoice type window SetColor( aClr[ 1 ] ) - ClearS( 18, 42, 24, 64 ) + hb_Scroll( 18, 42, 24, 64 ) Single( 18, 43, 24, 63 ) @ 19, 44 SAY " Daily Reports " @ 21, 44 SAY " Quarterly Reports " @@ -544,7 +540,7 @@ STATIC FUNCTION _ftDeskChar( aOpt ) ENDDO SetColor( "W+/N" ) - ClearS( 18, 28, 23, 39 ) + hb_Scroll( 18, 28, 23, 39 ) RETURN aOpt diff --git a/harbour/contrib/hbnf/menu1.prg b/harbour/contrib/hbnf/menu1.prg index d84be878ac..b7e70f9713 100644 --- a/harbour/contrib/hbnf/menu1.prg +++ b/harbour/contrib/hbnf/menu1.prg @@ -163,7 +163,7 @@ FUNCTION FT_MENU1( aBar, aOptions, aColors, nTopRow, lShadow ) hb_Shadow( nTopRow + 1, aBoxLoc[ t_nHPos ], Len( t_aChoices[ t_nHPos, 1 ] ) + nTopRow + 2, aBarWidth[ t_nHPos ] + 3 + aBoxLoc[ t_nHPos ] ) ENDIF SetColor( cBorder ) - @ nTopRow + 1, aBoxLoc[ t_nHPos ], Len( t_aChoices[ t_nHPos, 1 ] ) + nTopRow + 2, aBarWidth[ t_nHPos ] + 3 + aBoxLoc[ t_nHPos ] BOX hb_UTF8ToStrBox( "╔═╗║╝═╚║ " ) + hb_DispBox( nTopRow + 1, aBoxLoc[ t_nHPos ], Len( t_aChoices[ t_nHPos, 1 ] ) + nTopRow + 2, aBarWidth[ t_nHPos ] + 3 + aBoxLoc[ t_nHPos ], hb_UTF8ToStrBox( "╔═╗║╝═╚║ " ) ) SetColor( cBox + "," + cCurrent + ",,," + cUnselec ) t_nVPos := AChoice( nTopRow + 2, aBoxLoc[ t_nHPos ] + 2, Len( t_aChoices[ t_nHPos, 1 ] ) + nTopRow + 2, aBarWidth[ t_nHPos ] + 1 + aBoxLoc[ t_nHPos ], t_aChoices[ t_nHPos, 1 ], t_aChoices[ t_nHPos, 3 ], "__ftAcUdf", aLastSel[ t_nHPos ] ) DO CASE @@ -240,7 +240,7 @@ STATIC FUNCTION _ftBailOut( cBorder, cBox ) sOldScreen := SaveScreen( t_nMaxRow / 2 - 1, 24, t_nMaxRow / 2 + 2, 55 ) cOldColor := SetColor( cBorder ) hb_Shadow( t_nMaxRow / 2 - 1, 24, t_nMaxRow / 2 + 2, 55 ) - @ t_nMaxRow / 2 - 1, 24, t_nMaxRow / 2 + 2, 55 BOX hb_UTF8ToStrBox( "╔═╗║╝═╚║ " ) + hb_DispBox( t_nMaxRow / 2 - 1, 24, t_nMaxRow / 2 + 2, 55, hb_UTF8ToStrBox( "╔═╗║╝═╚║ " ) ) SetColor( cBox ) @ t_nMaxRow / 2, 26 SAY "Press ESCape To Confirm Exit" @ t_nMaxRow / 2 + 1, 27 SAY "Or Any Other Key To Resume" diff --git a/harbour/contrib/hbnf/pegs.prg b/harbour/contrib/hbnf/pegs.prg index 0659d6a1b8..8a6731ea43 100644 --- a/harbour/contrib/hbnf/pegs.prg +++ b/harbour/contrib/hbnf/pegs.prg @@ -32,9 +32,9 @@ #include "setcurs.ch" #translate SINGLEBOX( , , , ) => ; - @ , , , BOX hb_UTF8ToStrBox( "┌─┐│┘─└│ " ) + hb_DispBox( , , , , hb_UTF8ToStrBox( "┌─┐│┘─└│ " ) ) #translate DOUBLEBOX( , , , ) => ; - @ , , , BOX hb_UTF8ToStrBox( "╔═╗║╝═╚║ " ) + hb_DispBox( , , , , hb_UTF8ToStrBox( "╔═╗║╝═╚║ " ) ) MEMVAR GetList /* @@ -163,8 +163,9 @@ FUNCTION FT_PEGS() STATIC FUNCTION DrawBox( nelement ) SetColor( iif( t_board_[ nelement ][ 4 ], "+w/rb", "w/n" ) ) - @ t_board_[ nelement ][ 1, 1 ], t_board_[ nelement ][ 1, 2 ], t_board_[ nelement ][ 1, 3 ], ; - t_board_[ nelement ][ 1, 4 ] BOX hb_UTF8ToStrBox( "┌─┐│┘─└│ " ) + hb_DispBox( t_board_[ nelement ][ 1, 1 ], t_board_[ nelement ][ 1, 2 ], ; + t_board_[ nelement ][ 1, 3 ], t_board_[ nelement ][ 1, 4 ], ; + hb_UTF8ToStrBox( "┌─┐│┘─└│ " ) ) DevPos( t_board_[ nelement ][ 1, 1 ] + 1, t_board_[ nelement ][ 1, 2 ] + 2 ) DevOut( hb_ntos( nelement ) ) diff --git a/harbour/contrib/hbnf/pending.prg b/harbour/contrib/hbnf/pending.prg index f4bc6b19ba..cd78b9d31e 100644 --- a/harbour/contrib/hbnf/pending.prg +++ b/harbour/contrib/hbnf/pending.prg @@ -61,7 +61,7 @@ FUNCTION FT_PENDING( cMsg, nRow, nCol, nWait, cColor ) t_nLast_Time := nThis_Time // set time counter for next message. ENDIF - @ t_nRow1, 0 CLEAR TO t_nRow1, 80 // clear the display line + hb_Scroll( t_nRow1, 0, t_nRow1, 80 ) // clear the display line cSavColor := SetColor( t_cColor1 ) // save current and set display color diff --git a/harbour/contrib/hbnf/pickday.prg b/harbour/contrib/hbnf/pickday.prg index 3be45d5c23..ad6cdf3f6c 100644 --- a/harbour/contrib/hbnf/pickday.prg +++ b/harbour/contrib/hbnf/pickday.prg @@ -30,7 +30,7 @@ FUNCTION FT_PICKDAY() LOCAL sel := 0 LOCAL oldscrn := SaveScreen( 8, 35, 16, 45 ), oldcolor := SetColor( "+w/r" ) - @ 8, 35, 16, 45 BOX hb_UTF8ToStrBox( "┌─┐│┘─└│ " ) + hb_DispBox( 8, 35, 16, 45, hb_UTF8ToStrBox( "┌─┐│┘─└│ " ) ) /* do not allow user to Esc out, which would cause array access error */ DO WHILE sel == 0 sel := AChoice( 9, 36, 15, 44, days ) diff --git a/harbour/contrib/hbnf/popadder.prg b/harbour/contrib/hbnf/popadder.prg index 4e57ebcbc2..fd2aa7cb7d 100644 --- a/harbour/contrib/hbnf/popadder.prg +++ b/harbour/contrib/hbnf/popadder.prg @@ -357,7 +357,7 @@ STATIC FUNCTION _ftAddScreen( aAdder ) @ 18 + nTopOS, nCol SAY "=" @ 19 + nTopOS, nCol SAY Chr( 4 ) /* LOW-ASCII "♦" */ _ftSetWinColor( W_CURR, W_PROMPT ) - @ 3 + nTopOS, 6 + nAddSpace, 5 + nTopOS, 27 + nAddSpace BOX B_DOUBLE + hb_DispBox( 3 + nTopOS, 6 + nAddSpace, 5 + nTopOS, 27 + nAddSpace, B_DOUBLE ) RETURN NIL @@ -957,7 +957,7 @@ STATIC FUNCTION _ftDisplayTape( aAdder, nKey ) cTapeScr := SaveScreen( 4 + nTopOS, 6 + nTapeSpace, 22 + nTopOS, 35 + nTapeSpace ) hb_Shadow( 4 + nTopOS, 6 + nTapeSpace, 21 + nTopOS, 33 + nTapeSpace ) SetColor( "R+/W" ) - @ 4 + nTopOS, 6 + nTapeSpace, 21 + nTopOS, 33 + nTapeSpace BOX B_SINGLE + hb_DispBox( 4 + nTopOS, 6 + nTapeSpace, 21 + nTopOS, 33 + nTapeSpace, B_SINGLE ) SetColor( "GR+/W" ) @ 4 + nTopOS, 17 + nTapeSpace SAY " TAPE " SetColor( "N/W" ) @@ -1315,7 +1315,7 @@ STATIC FUNCTION _ftError( cMessage, xDontReset ) cErrorScr := SaveScreen( nTop, nLeft, nBot + 1, nRight + 2 ) hb_Shadow( nTop, nLeft, nBot, nRight ) - @ nTop, nLeft, nBot, nRight BOX B_SINGLE + hb_DispBox( nTop, nLeft, nBot, nRight, B_SINGLE ) @ nTop, nLeft + Int( nWide / 2 ) - 1 SAY " ERROR " @ nBot - 1, nLeft + Int( nWide - 28 ) / 2 + 3 SAY "Press any key to continue..." DISPMESSAGE cMessage, nTop + 1, nLeft + 3, nBot - 2, nRight - 3 @@ -1461,7 +1461,7 @@ STATIC FUNCTION _ftPushWin( t, l, b, r, cTitle, cBotTitle, nWinColor ) AAdd( t_aWindow, { t, l, b, r, nWinColor, SaveScreen( t, l, b + 1, r + 2 ), lAutoWindow } ) hb_Shadow( t, l, b, r ) _ftSetWinColor( nWinColor, W_BORDER ) - @ t, l, b, r BOX B_SINGLE + hb_DispBox( t, l, b, r, B_SINGLE ) IF cTitle != NIL _ftSetWinColor( nWinColor, W_TITLE ) @@ -1474,7 +1474,7 @@ STATIC FUNCTION _ftPushWin( t, l, b, r, cTitle, cBotTitle, nWinColor ) ENDIF _ftSetWinColor( nWinColor, W_SCREEN, W_VARIAB ) - @ t + 1, l + 1 CLEAR TO b - 1, r - 1 + hb_Scroll( t + 1, l + 1, b - 1, r - 1 ) RETURN NIL diff --git a/harbour/contrib/hbnf/tbwhile.prg b/harbour/contrib/hbnf/tbwhile.prg index 057b8d6ef1..bd65a0e6c7 100644 --- a/harbour/contrib/hbnf/tbwhile.prg +++ b/harbour/contrib/hbnf/tbwhile.prg @@ -149,9 +149,9 @@ FUNCTION FT_BRWSWHL( aFields, bWhileCond, cKey, nFreeze, lSaveScrn, ; /* make a window shadow */ SetColor( cColorShad ) - @ nTop + 1, nLeft + 1 CLEAR TO nBottom + 1, nRight + 1 + hb_Scroll( nTop + 1, nLeft + 1, nBottom + 1, nRight + 1 ) SetColor( cColorBack ) - @ nTop, nLeft CLEAR TO nBottom, nRight + hb_Scroll( nTop, nLeft, nBottom, nRight ) SetColor( cColorSave ) nCursSave := SetCursor( SC_NONE ) diff --git a/harbour/contrib/hbnf/vertmenu.prg b/harbour/contrib/hbnf/vertmenu.prg index 5cec09e641..1a59bbe5fc 100644 --- a/harbour/contrib/hbnf/vertmenu.prg +++ b/harbour/contrib/hbnf/vertmenu.prg @@ -58,7 +58,7 @@ FUNCTION ft_menu2( aMenuInfo, cColors ) cOldscreen := SaveScreen( nTop, nLeft - 1, nTop + nOptions + 1, nLeft + nMaxwidth ) - @ nTop, nLeft - 1, nTop + nOptions + 1, nLeft + nMaxwidth BOX hb_UTF8ToStrBox( "┌─┐│┘─└│ " ) + hb_DispBox( nTop, nLeft - 1, nTop + nOptions + 1, nLeft + nMaxwidth, hb_UTF8ToStrBox( "┌─┐│┘─└│ " ) ) DevPos( nTop, nLeft ) FOR x := 1 TO Len( aMenuInfo ) IF Len( aMenuInfo[ x ] ) > 1 .AND. aMenuInfo[ x, 2 ] != NIL diff --git a/harbour/contrib/hbnf/xbox.prg b/harbour/contrib/hbnf/xbox.prg index b619256d3a..df7baee238 100644 --- a/harbour/contrib/hbnf/xbox.prg +++ b/harbour/contrib/hbnf/xbox.prg @@ -98,7 +98,7 @@ FUNCTION FT_XBOX( cJustType, ; // "L" -> left, otherwise centered // save screen color and set new color // cOldColor := SetColor( cBoxColor ) - @ nTRow, nLCol CLEAR TO nBRow, nRCol + hb_Scroll( nTRow, nLCol, nBRow, nRCol ) // draw border SetColor( cBorColor ) diff --git a/harbour/extras/gtwvw/tests/wvwtest9.prg b/harbour/extras/gtwvw/tests/wvwtest9.prg index 20d3de150c..04c8b04f8f 100644 --- a/harbour/extras/gtwvw/tests/wvwtest9.prg +++ b/harbour/extras/gtwvw/tests/wvwtest9.prg @@ -439,10 +439,10 @@ PROCEDURE Demo_Get() LOCAL nRight := 75 LOCAL nColGet := 8 LOCAL get_1 := SToD() - LOCAL get_2 := Pad( 'Pritpal Bedi', 35 ) - LOCAL get_3 := Pad( '60, New Professor Colony', 35 ) - LOCAL get_4 := Pad( 'Ludhiana, INDIA', 35 ) - LOCAL get_5 := Pad( 'http://www.vouchcac.com', 35 ) + LOCAL get_2 := PadR( 'Pritpal Bedi', 35 ) + LOCAL get_3 := PadR( '60, New Professor Colony', 35 ) + LOCAL get_4 := PadR( 'Ludhiana, INDIA', 35 ) + LOCAL get_5 := PadR( 'http://www.vouchcac.com', 35 ) LOCAL get_6 := 20000 LOCAL nCursor := SetCursor( SC_NORMAL ) MEMVAR x diff --git a/harbour/tests/db_brows.prg b/harbour/tests/db_brows.prg index 174a554619..25a1edffbd 100644 --- a/harbour/tests/db_brows.prg +++ b/harbour/tests/db_brows.prg @@ -189,7 +189,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey ) ENDIF oldcolors := SetColor() SetColor( LI_CLR ) - @ LI_Y1, LI_X1, LI_Y2, LI_X2 BOX hb_UTF8ToStrBox( "┌─┐│┘─└│ " ) + hb_DispBox( LI_Y1, LI_X1, LI_Y2, LI_X2, hb_UTF8ToStrBox( "┌─┐│┘─└│ " ) ) IF title != NIL @ LI_Y1, ( LI_X2 - LI_X1 - 1 - Len( title ) ) / 2 + LI_X1 SAY " " + title + " " ENDIF @@ -246,7 +246,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey ) fbar2 := "Ax_KeyCount()" ENDCASE IF ! Empty( fbar1 ) - @ LI_Y1 + 2, LI_X2, LI_Y2 - 2, LI_X2 BOX str_barbox + hb_DispBox( LI_Y1 + 2, LI_X2, LI_Y2 - 2, LI_X2, str_barbox ) @ LI_Y1 + 1, LI_X2 SAY SubStr( str_bar, 2, 1 ) @ LI_Y2 - 1, LI_X2 SAY SubStr( str_bar, 1, 1 ) @ LI_Y1 + 2 + Int( iif( LI_PRFLT, LI_TEKZP, &fbar1 ) * ( LI_Y2 - LI_Y1 - 4 ) / iif( LI_PRFLT, LI_KOLZ, &fbar2 ) ), LI_X2 SAY Right( str_bar, 1 ) @@ -421,7 +421,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey ) ENDIF IF ( LastKey() == K_ESC .OR. ! Updated() ) .AND. Eval( LI_BEOF, mslist ) SetColor( LI_CLR ) - @ LI_NSTR + LI_Y1, LI_X1 + 1 CLEAR TO LI_NSTR + LI_Y1, LI_X2 - 1 + hb_Scroll( LI_NSTR + LI_Y1, LI_X1 + 1, LI_NSTR + LI_Y1, LI_X2 - 1 ) LI_NSTR-- Eval( LI_BSKIP, mslist, -1 ) ELSE @@ -508,7 +508,7 @@ FUNCTION VIVNAMES( mslist ) IF LI_NMCLR != NIL oldc := SetColor( LI_NMCLR ) ENDIF - @ LI_Y1, x - 1 CLEAR TO LI_Y1, LI_X2 - 1 + hb_Scroll( LI_Y1, x - 1, LI_Y1, LI_X2 - 1 ) fif := iif( LI_FREEZE > 0, 1, LI_NLEFT ) // DO MSFNEXT WITH mslist, fif DO WHILE i <= LI_NCOLUMNS .AND. fif <= Len( LI_NAMES ) @@ -545,7 +545,7 @@ FUNCTION WNDVIVOD( mslist ) ENDIF firstrec := Eval( LI_RECNO, mslist ) SetColor( LI_CLR ) - @ LI_Y1 + 1, LI_X1 + 1 CLEAR TO LI_Y2 - 1, LI_X2 - 1 + hb_Scroll( LI_Y1 + 1, LI_X1 + 1, LI_Y2 - 1, LI_X2 - 1 ) DO WHILE .T. VIVSTR( mslist, nstr + LI_Y1, 0 ) nstr++ diff --git a/harbour/tests/testbrw.prg b/harbour/tests/testbrw.prg index 8c402945e7..ca29e8ac9d 100644 --- a/harbour/tests/testbrw.prg +++ b/harbour/tests/testbrw.prg @@ -41,7 +41,7 @@ PROCEDURE Main() oBrowse:AddColumn( TBColumnNew( "Forth", {|| aTest2[ n ] } ) ) oBrowse:AddColumn( TBColumnNew( "Fifth", {|| aTest3[ n ] } ) ) oBrowse:GetColumn( 1 ):Footing := "Number" - oBrowse:GetColumn( 2 ):Footing := "Strins" + oBrowse:GetColumn( 2 ):Footing := "String" oBrowse:GetColumn( 2 ):Picture := "@!" @@ -60,7 +60,7 @@ PROCEDURE Main() cColor := SetColor( "W+/B" ) nRow := Row() nCol := Col() - @ 4, 4, 17, 31 BOX hb_UTF8ToStrBox( "┌─┐│┘─└│ " ) + hb_DispBox( 4, 4, 17, 31, hb_UTF8ToStrBox( "┌─┐│┘─└│ " ) ) #ifdef HB_COMPAT_C53 oBrowse:SetKey( 0, {| ob, nkey | Defproc( ob, nKey ) } ) WHILE .T. @@ -123,10 +123,7 @@ PROCEDURE Main() oBrowse:panEnd() CASE nKey == K_TAB - nTmpRow := Row() - nTmpCol := Col() - @ 0, 0 SAY Time() - DevPos( nTmpRow, nTmpCol ) + hb_DispOutAt( 0, 0, Time() ) ENDCASE @@ -142,13 +139,8 @@ PROCEDURE Main() FUNCTION defproc( ob, nkey ) - LOCAL nTmpRow, nTmpCol - IF nKey == K_TAB - nTmpRow := Row() - nTmpCol := Col() - @ 0, 0 SAY Time() - DevPos( nTmpRow, nTmpCol ) + hb_DispOutAt( 0, 0, Time() ) ob:Refreshall() ENDIF