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.
This commit is contained in:
@@ -16,6 +16,82 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
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:48 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* harbour/src/pp/ppcore.c
|
||||
! fixed possible GPF when some broken expressions are used as
|
||||
@@ -84,11 +160,11 @@
|
||||
! some related minor fixes
|
||||
|
||||
* tests/tb1.prg
|
||||
! fixed to compile and build using Clipper after recent
|
||||
! fixed to compile and build using Cl*pper after recent
|
||||
UTF8 compatibility updates (not tested though)
|
||||
|
||||
; TOFIX: Pad*() function handle 3rd parameter as binary string,
|
||||
so it doesn't work properly in UTF8 mode.
|
||||
so it doesn't work properly in UTF8 mode. [DONE]
|
||||
|
||||
2012-10-01 11:33 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
! ChangeLog
|
||||
@@ -1356,7 +1432,7 @@
|
||||
+ website
|
||||
+ Added Harbour website (except art, docs and stat subdirs)
|
||||
; TODO: configure automatic mechanism to extract site from
|
||||
here and regularly updload to sf.net web area
|
||||
here and regularly updload to sf.net web area [DONE]
|
||||
; TODO: Clean HTML code, remove unused picture/files, avoid JS
|
||||
Any takers?
|
||||
; NOTE: Please make modifications to website code only in
|
||||
|
||||
@@ -73,7 +73,7 @@ FUNCTION EditorNew( nTop, nLeft, nBottom, nRight, nLength, ;
|
||||
oEdit[ E_BOTTOM ] := nBottom
|
||||
oEdit[ E_RIGHT ] := nRight
|
||||
oEdit[ E_LINELEN ] := nLength
|
||||
oEdit[ E_FRAME ] := IIFNIL( B_DOUBLE, cFrame )
|
||||
oEdit[ E_FRAME ] := IIFNIL( HB_B_DOUBLE_UNI, cFrame )
|
||||
oEdit[ E_TITLE ] := cTitle
|
||||
oEdit[ E_COLOR ] := IIFNIL( "W/N,W+/N,W+/R,GR+/N,G+/N", cColor )
|
||||
oEdit[ E_MODE ] := EDIT_VIEW
|
||||
|
||||
@@ -98,7 +98,7 @@ PROCEDURE __dbgHelp( nTopic )
|
||||
|
||||
STATIC PROCEDURE PaintWindow( oDlg, oBrw, aTopics )
|
||||
|
||||
hb_dispBox( oDlg:nTop + 1, oDlg:nLeft + 13, oDlg:nBottom - 1, oDlg:nLeft + 13, B_SINGLE, oDlg:cColor )
|
||||
hb_dispBox( oDlg:nTop + 1, oDlg:nLeft + 13, oDlg:nBottom - 1, oDlg:nLeft + 13, HB_B_SINGLE_UNI, oDlg:cColor )
|
||||
hb_dispOutAt( oDlg:nTop , oDlg:nLeft + 13 , Chr( 194 ), oDlg:cColor )
|
||||
hb_dispOutAt( oDlg:nBottom , oDlg:nLeft + 13 , Chr( 193 ), oDlg:cColor )
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ METHOD SetsKeyPressed( nKey, oBrwSets, oWnd, cName, aArray ) CLASS HBDbArray
|
||||
::AddWindows( aArray[ nSet ], oBrwSets:RowPos + oBrwSets:nTop )
|
||||
::arrayname := cOldName
|
||||
|
||||
hb_ADel( ::aWindows, ::nCurWindow, .t. )
|
||||
hb_ADel( ::aWindows, ::nCurWindow, .T. )
|
||||
IF ::nCurWindow == 0
|
||||
::nCurWindow := 1
|
||||
ELSE
|
||||
|
||||
@@ -220,7 +220,7 @@ METHOD SetsKeyPressed( nKey, oBrwSets, oWnd, cName, hHash ) CLASS HBDbHash
|
||||
::AddWindows( HB_HValueAt( hHash, nSet ), oBrwSets:RowPos + oBrwSets:nTop )
|
||||
::hashName := cOldName
|
||||
|
||||
hb_ADel( ::aWindows, ::nCurWindow, .t. )
|
||||
hb_ADel( ::aWindows, ::nCurWindow, .T. )
|
||||
IF ::nCurwindow == 0
|
||||
::nCurwindow := 1
|
||||
ELSE
|
||||
|
||||
@@ -231,7 +231,7 @@ METHOD Display() CLASS HBDbMenu
|
||||
SetPos( 0, 0 )
|
||||
ELSE
|
||||
::cBackImage := SaveScreen( ::nTop, ::nLeft, ::nBottom + 1, ::nRight + 2 )
|
||||
hb_dispBox( ::nTop, ::nLeft, ::nBottom, ::nRight, B_SINGLE )
|
||||
hb_dispBox( ::nTop, ::nLeft, ::nBottom, ::nRight, HB_B_SINGLE_UNI )
|
||||
hb_Shadow( ::nTop, ::nLeft, ::nBottom, ::nRight )
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ METHOD Refresh() CLASS HBDbWindow
|
||||
|
||||
DispBegin()
|
||||
|
||||
hb_dispBox( ::nTop, ::nLeft, ::nBottom, ::nRight, iif( ::lFocused, B_DOUBLE, B_SINGLE ), ::cColor )
|
||||
hb_dispBox( ::nTop, ::nLeft, ::nBottom, ::nRight, iif( ::lFocused, HB_B_DOUBLE_UNI, HB_B_SINGLE_UNI ), ::cColor )
|
||||
hb_dispOutAt( ::nTop, ::nLeft + 1, "[" + Chr( 254 ) + "]", ::cColor )
|
||||
|
||||
::ShowCaption( ::cCaption )
|
||||
|
||||
@@ -176,15 +176,15 @@ STATIC PROCEDURE DlgWorkAreaPaint( oDlg, aBrw )
|
||||
|
||||
/* Display separator lines */
|
||||
|
||||
hb_dispBox( oDlg:nTop + 1, oDlg:nLeft + 12, oDlg:nBottom - 1, oDlg:nLeft + 12, B_SINGLE, oDlg:cColor )
|
||||
hb_dispBox( oDlg:nTop + 1, oDlg:nLeft + 12, oDlg:nBottom - 1, oDlg:nLeft + 12, HB_B_SINGLE_UNI, oDlg:cColor )
|
||||
hb_dispOutAt( oDlg:nTop, oDlg:nLeft + 12, Chr( 194 ), oDlg:cColor )
|
||||
hb_dispOutAt( oDlg:nBottom, oDlg:nLeft + 12, Chr( 193 ), oDlg:cColor )
|
||||
|
||||
hb_dispBox( oDlg:nTop + 1, oDlg:nLeft + 51, oDlg:nBottom - 1, oDlg:nLeft + 51, B_SINGLE, oDlg:cColor )
|
||||
hb_dispBox( oDlg:nTop + 1, oDlg:nLeft + 51, oDlg:nBottom - 1, oDlg:nLeft + 51, HB_B_SINGLE_UNI, oDlg:cColor )
|
||||
hb_dispOutAt( oDlg:nTop, oDlg:nLeft + 51, Chr( 194 ), oDlg:cColor )
|
||||
hb_dispOutAt( oDlg:nBottom, oDlg:nLeft + 51, Chr( 193 ), oDlg:cColor )
|
||||
|
||||
hb_dispBox( oDlg:nTop + 6, oDlg:nLeft + 13, oDlg:nTop + 6, oDlg:nLeft + 50, B_SINGLE, oDlg:cColor )
|
||||
hb_dispBox( oDlg:nTop + 6, oDlg:nLeft + 13, oDlg:nTop + 6, oDlg:nLeft + 50, HB_B_SINGLE_UNI, oDlg:cColor )
|
||||
hb_dispOutAt( oDlg:nTop + 6, oDlg:nLeft + 12, Chr( 195 ), oDlg:cColor )
|
||||
hb_dispOutAt( oDlg:nTop + 6, oDlg:nLeft + 51, Chr( 180 ), oDlg:cColor )
|
||||
|
||||
|
||||
@@ -2105,7 +2105,7 @@ METHOD RemoveWindow( oWnd ) CLASS HBDebugger
|
||||
LOCAL n := AScan( ::aWindows, {| o | o == oWnd } )
|
||||
|
||||
IF n != 0
|
||||
::aWindows := hb_ADel( ::aWindows, n, .t. )
|
||||
::aWindows := hb_ADel( ::aWindows, n, .T. )
|
||||
ENDIF
|
||||
|
||||
::nCurrentWindow := 1
|
||||
@@ -2751,7 +2751,7 @@ METHOD ToggleBreakPoint( nLine, cFileName ) CLASS HBDebugger
|
||||
::oBrwText:ToggleBreakPoint( nLine, .T. )
|
||||
ENDIF
|
||||
ELSE
|
||||
hb_ADel( ::aBreakPoints, nAt, .t. )
|
||||
hb_ADel( ::aBreakPoints, nAt, .T. )
|
||||
__dbgDelBreak( ::pInfo, nAt - 1 )
|
||||
IF hb_FileMatch( cFileName, strip_path( ::cPrgName ) )
|
||||
::oBrwText:ToggleBreakPoint( nLine, .F. )
|
||||
@@ -2962,7 +2962,7 @@ METHOD WatchpointDel( nPos ) CLASS HBDebugger
|
||||
IF nPos >=0 .AND. nPos < Len( ::aWatch )
|
||||
::oBrwPnt:gotop()
|
||||
__dbgDelWatch( ::pInfo, nPos )
|
||||
hb_ADel( ::aWatch, nPos + 1, .t. )
|
||||
hb_ADel( ::aWatch, nPos + 1, .T. )
|
||||
IF Len( ::aWatch ) == 0
|
||||
::WatchpointsHide()
|
||||
ELSE
|
||||
|
||||
@@ -171,7 +171,7 @@ METHOD SetActiveLine( n ) CLASS HBBrwText
|
||||
METHOD GetLine() CLASS HBBrwText
|
||||
|
||||
RETURN PadR( hb_NToS( ::nRow ) + ": " + SubStr( ;
|
||||
MemoLine( ::aRows[ ::nRow ], ::nWidth + ::nLineOffset, 1, ::nTabWidth, .f. ),;
|
||||
MemoLine( ::aRows[ ::nRow ], ::nWidth + ::nLineOffset, 1, ::nTabWidth, .F. ),;
|
||||
::nLineOffset ), ::nWidth )
|
||||
|
||||
METHOD ToggleBreakPoint( nRow, lSet ) CLASS HBBrwText
|
||||
@@ -202,7 +202,7 @@ METHOD LoadFile( cFileName ) CLASS HBBrwText
|
||||
|
||||
FOR EACH cLine in ::aRows
|
||||
nMaxLineLen := Max( nMaxLineLen, ;
|
||||
Len( RTrim( MemoLine( cLine, Len( cLine ) + 256, 1, ::nTabWidth, .f. ) ) ) )
|
||||
Len( RTrim( MemoLine( cLine, Len( cLine ) + 256, 1, ::nTabWidth, .F. ) ) ) )
|
||||
NEXT
|
||||
::nMaxLineLen := nMaxLineLen
|
||||
::nLineOffset := 1
|
||||
|
||||
@@ -80,13 +80,13 @@ FUNCTION Browse( nTop, nLeft, nBottom, nRight )
|
||||
nOldCursor := SetCursor( SC_NONE )
|
||||
cOldScreen := SaveScreen( nTop, nLeft, nBottom, nRight )
|
||||
|
||||
hb_dispBox( nTop, nLeft, nBottom, nRight, B_DOUBLE_SINGLE )
|
||||
hb_dispBox( nTop + 3, nLeft, nTop + 3, nLeft, Chr( 198 ) ) /* "╞" */
|
||||
hb_dispBox( nTop + 3, nRight, nTop + 3, nRight, Chr( 181 ) ) /* "╡" */
|
||||
hb_dispBox( nTop, nLeft, nBottom, nRight, HB_B_DOUBLE_SINGLE_UNI )
|
||||
hb_dispBox( nTop + 3, nLeft, nTop + 3, nLeft, hb_UTF8ToStrBox( "╞" ) )
|
||||
hb_dispBox( nTop + 3, nRight, nTop + 3, nRight, hb_UTF8ToStrBox( "╡" ) )
|
||||
hb_dispOutAt( nTop + 1, nLeft + 1, Space( nRight - nLeft - 1 ) )
|
||||
|
||||
oBrw := TBrowseDB( nTop + 2, nLeft + 1, nBottom - 1, nRight - 1 )
|
||||
oBrw:HeadSep := " " + Chr( 205 ) /* "═" */
|
||||
oBrw:HeadSep := " " + hb_UTF8ToStrBox( "═" )
|
||||
oBrw:SkipBlock := {| nRecs | Skipped( nRecs, lAppend ) }
|
||||
|
||||
FOR n := 1 to FCount()
|
||||
@@ -145,134 +145,134 @@ FUNCTION Browse( nTop, nLeft, nBottom, nRight )
|
||||
SWITCH nKey
|
||||
|
||||
#ifdef HB_COMPAT_C53
|
||||
CASE K_LBUTTONDOWN
|
||||
CASE K_LDBLCLK
|
||||
TBMOUSE( oBrw, MRow(), MCol() )
|
||||
EXIT
|
||||
CASE K_LBUTTONDOWN
|
||||
CASE K_LDBLCLK
|
||||
TBMOUSE( oBrw, MRow(), MCol() )
|
||||
EXIT
|
||||
#endif
|
||||
#ifndef HB_CLP_STRICT
|
||||
CASE K_MWFORWARD
|
||||
CASE K_MWFORWARD
|
||||
#endif
|
||||
CASE K_UP
|
||||
IF lAppend
|
||||
lRefresh := .T.
|
||||
ELSE
|
||||
oBrw:Up()
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE K_UP
|
||||
IF lAppend
|
||||
lRefresh := .T.
|
||||
ELSE
|
||||
oBrw:Up()
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
#ifndef HB_CLP_STRICT
|
||||
CASE K_MWBACKWARD
|
||||
CASE K_MWBACKWARD
|
||||
#endif
|
||||
CASE K_DOWN
|
||||
IF lAppend
|
||||
oBrw:HitBottom( .T. )
|
||||
CASE K_DOWN
|
||||
IF lAppend
|
||||
oBrw:HitBottom( .T. )
|
||||
ELSE
|
||||
oBrw:Down()
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE K_PGUP
|
||||
IF lAppend
|
||||
lRefresh := .T.
|
||||
ELSE
|
||||
oBrw:PageUp()
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE K_PGDN
|
||||
IF lAppend
|
||||
oBrw:HitBottom( .T. )
|
||||
ELSE
|
||||
oBrw:PageDown()
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE K_CTRL_PGUP
|
||||
IF lAppend
|
||||
lRefresh := .T.
|
||||
ELSE
|
||||
oBrw:GoTop()
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE K_CTRL_PGDN
|
||||
IF lAppend
|
||||
lRefresh := .T.
|
||||
ELSE
|
||||
oBrw:GoBottom()
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE K_LEFT
|
||||
oBrw:Left()
|
||||
EXIT
|
||||
|
||||
CASE K_RIGHT
|
||||
oBrw:Right()
|
||||
EXIT
|
||||
|
||||
CASE K_HOME
|
||||
oBrw:Home()
|
||||
EXIT
|
||||
|
||||
CASE K_END
|
||||
oBrw:End()
|
||||
EXIT
|
||||
|
||||
CASE K_CTRL_LEFT
|
||||
oBrw:panLeft()
|
||||
EXIT
|
||||
|
||||
CASE K_CTRL_RIGHT
|
||||
oBrw:panRight()
|
||||
EXIT
|
||||
|
||||
CASE K_CTRL_HOME
|
||||
oBrw:panHome()
|
||||
EXIT
|
||||
|
||||
CASE K_CTRL_END
|
||||
oBrw:panEnd()
|
||||
EXIT
|
||||
|
||||
CASE K_INS
|
||||
IF lAppend
|
||||
SetCursor( iif( ReadInsert( ! ReadInsert() ), ;
|
||||
SC_NORMAL, SC_INSERT ) )
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE K_DEL
|
||||
IF RecNo() != LastRec() + 1
|
||||
IF Deleted()
|
||||
DbRecall()
|
||||
ELSE
|
||||
oBrw:Down()
|
||||
DbDelete()
|
||||
ENDIF
|
||||
EXIT
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE K_PGUP
|
||||
IF lAppend
|
||||
lRefresh := .T.
|
||||
ELSE
|
||||
oBrw:PageUp()
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE K_ENTER
|
||||
IF lAppend .OR. RecNo() != LastRec() + 1
|
||||
lKeyPressed := ( nKey := DoGet( oBrw, lAppend ) ) != 0
|
||||
ELSE
|
||||
nKey := K_DOWN
|
||||
lKeyPressed := .T.
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE K_PGDN
|
||||
IF lAppend
|
||||
oBrw:HitBottom( .T. )
|
||||
ELSE
|
||||
oBrw:PageDown()
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE K_ESC
|
||||
lExit := .T.
|
||||
EXIT
|
||||
|
||||
CASE K_CTRL_PGUP
|
||||
IF lAppend
|
||||
lRefresh := .T.
|
||||
ELSE
|
||||
oBrw:GoTop()
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE K_CTRL_PGDN
|
||||
IF lAppend
|
||||
lRefresh := .T.
|
||||
ELSE
|
||||
oBrw:GoBottom()
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE K_LEFT
|
||||
oBrw:Left()
|
||||
EXIT
|
||||
|
||||
CASE K_RIGHT
|
||||
oBrw:Right()
|
||||
EXIT
|
||||
|
||||
CASE K_HOME
|
||||
oBrw:Home()
|
||||
EXIT
|
||||
|
||||
CASE K_END
|
||||
oBrw:End()
|
||||
EXIT
|
||||
|
||||
CASE K_CTRL_LEFT
|
||||
oBrw:panLeft()
|
||||
EXIT
|
||||
|
||||
CASE K_CTRL_RIGHT
|
||||
oBrw:panRight()
|
||||
EXIT
|
||||
|
||||
CASE K_CTRL_HOME
|
||||
oBrw:panHome()
|
||||
EXIT
|
||||
|
||||
CASE K_CTRL_END
|
||||
oBrw:panEnd()
|
||||
EXIT
|
||||
|
||||
CASE K_INS
|
||||
IF lAppend
|
||||
SetCursor( iif( ReadInsert( ! ReadInsert() ), ;
|
||||
SC_NORMAL, SC_INSERT ) )
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE K_DEL
|
||||
IF RecNo() != LastRec() + 1
|
||||
IF Deleted()
|
||||
DbRecall()
|
||||
ELSE
|
||||
DbDelete()
|
||||
ENDIF
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE K_ENTER
|
||||
IF lAppend .OR. RecNo() != LastRec() + 1
|
||||
lKeyPressed := ( nKey := DoGet( oBrw, lAppend ) ) != 0
|
||||
ELSE
|
||||
nKey := K_DOWN
|
||||
lKeyPressed := .T.
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE K_ESC
|
||||
lExit := .t.
|
||||
EXIT
|
||||
|
||||
OTHERWISE
|
||||
IF ! hb_keyChar( nKey ) == ""
|
||||
hb_keyIns( nKey )
|
||||
nKey := K_ENTER
|
||||
lKeyPressed := .T.
|
||||
ENDIF
|
||||
EXIT
|
||||
OTHERWISE
|
||||
IF ! hb_keyChar( nKey ) == ""
|
||||
hb_keyIns( nKey )
|
||||
nKey := K_ENTER
|
||||
lKeyPressed := .T.
|
||||
ENDIF
|
||||
EXIT
|
||||
ENDSWITCH
|
||||
|
||||
IF lRefresh
|
||||
@@ -379,21 +379,21 @@ STATIC FUNCTION ExitKey( lAppend )
|
||||
LOCAL nKey := LastKey()
|
||||
|
||||
SWITCH nKey
|
||||
CASE K_PGDN
|
||||
nKey := iif( lAppend, 0, K_DOWN )
|
||||
EXIT
|
||||
CASE K_PGDN
|
||||
nKey := iif( lAppend, 0, K_DOWN )
|
||||
EXIT
|
||||
|
||||
CASE K_PGUP
|
||||
nKey := iif( lAppend, 0, K_UP )
|
||||
CASE K_PGUP
|
||||
nKey := iif( lAppend, 0, K_UP )
|
||||
|
||||
CASE K_DOWN
|
||||
CASE K_UP
|
||||
EXIT
|
||||
CASE K_DOWN
|
||||
CASE K_UP
|
||||
EXIT
|
||||
|
||||
OTHERWISE
|
||||
nKey := iif( nKey == 13 .OR. ;
|
||||
( nKey >= 32 .AND. nKey <= 255 ), K_RIGHT, 0 )
|
||||
EXIT
|
||||
OTHERWISE
|
||||
nKey := iif( nKey == 13 .OR. ;
|
||||
!( hb_keyChar( nKey ) == "" ), K_RIGHT, 0 )
|
||||
EXIT
|
||||
ENDSWITCH
|
||||
|
||||
RETURN nKey
|
||||
|
||||
@@ -108,7 +108,7 @@ CREATE CLASS CHECKBOX FUNCTION HBCheckBox
|
||||
VAR cMessage INIT ""
|
||||
VAR nRow
|
||||
VAR bSBlock
|
||||
VAR cStyle INIT "[" + Chr( 251 ) + " ]" /* "[√]" */
|
||||
VAR cStyle INIT hb_UTF8ToStr( "[√]" )
|
||||
|
||||
VAR nCursor
|
||||
|
||||
|
||||
@@ -97,8 +97,8 @@ FUNCTION DBEDIT( nTop, nLeft, nBottom, nRight, ;
|
||||
ENDIF
|
||||
|
||||
oBrowse := TBrowseDb( nTop, nLeft, nBottom, nRight )
|
||||
oBrowse:headSep := iif( HB_ISSTRING( xHeadingSeparators ), xHeadingSeparators, Chr( 205 ) + Chr( 209 ) + Chr( 205 ) ) /* "═╤═" */
|
||||
oBrowse:colSep := iif( HB_ISSTRING( xColumnSeparators ), xColumnSeparators, " " + Chr( 179 ) + " " ) /* " │ " */
|
||||
oBrowse:headSep := iif( HB_ISSTRING( xHeadingSeparators ), xHeadingSeparators, hb_UTF8ToStrBox( "═╤═" ) )
|
||||
oBrowse:colSep := iif( HB_ISSTRING( xColumnSeparators ), xColumnSeparators, hb_UTF8ToStrBox( " │ " ) )
|
||||
oBrowse:footSep := iif( HB_ISSTRING( xFootingSeparators ), xFootingSeparators, "" )
|
||||
oBrowse:skipBlock := {| nRecs | Skipped( nRecs, lAppend ) }
|
||||
oBrowse:autoLite := .F. /* Set to .F. just like in CA-Cl*pper. [vszakats] */
|
||||
|
||||
@@ -136,19 +136,19 @@ CREATE CLASS LISTBOX FUNCTION HBListBox
|
||||
VAR nCapCol
|
||||
VAR nCapRow
|
||||
VAR cCaption INIT ""
|
||||
VAR cColdBox INIT B_SINGLE
|
||||
VAR cColdBox INIT HB_B_SINGLE_UNI
|
||||
VAR cColorSpec
|
||||
VAR lDropDown
|
||||
VAR bFBlock
|
||||
VAR lHasFocus INIT .F.
|
||||
VAR cHotBox INIT B_DOUBLE
|
||||
VAR cHotBox INIT HB_B_DOUBLE_UNI
|
||||
VAR lIsOpen
|
||||
VAR nItemCount INIT 0
|
||||
VAR nLeft
|
||||
VAR cMessage INIT ""
|
||||
VAR nRight
|
||||
VAR bSBlock
|
||||
VAR cStyle INIT Chr( 31 ) /* "▼" */
|
||||
VAR cStyle INIT hb_UTF8ToStr( "▼" )
|
||||
VAR cTextValue INIT ""
|
||||
VAR nTop
|
||||
VAR nTopItem INIT 0
|
||||
|
||||
@@ -269,7 +269,7 @@ METHOD MoveCursor( nKey ) CLASS HBMemoEditor
|
||||
RETURN ::Super:MoveCursor( nKey )
|
||||
ENDIF
|
||||
|
||||
RETURN .f.
|
||||
RETURN .F.
|
||||
|
||||
/*----------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -115,11 +115,11 @@ CREATE CLASS RADIOGROUP FUNCTION HBRadioGroup
|
||||
VAR nCapCol
|
||||
VAR nCapRow
|
||||
VAR cCaption INIT ""
|
||||
VAR cColdBox INIT B_SINGLE
|
||||
VAR cColdBox INIT HB_B_SINGLE_UNI
|
||||
VAR cColorSpec
|
||||
VAR bFBlock
|
||||
VAR lHasFocus INIT .F.
|
||||
VAR cHotBox INIT B_DOUBLE
|
||||
VAR cHotBox INIT HB_B_DOUBLE_UNI
|
||||
VAR nItemCount INIT 0
|
||||
VAR nLeft
|
||||
VAR cMessage INIT ""
|
||||
|
||||
@@ -391,13 +391,13 @@ METHOD CalcThumbPos() CLASS SCROLLBAR
|
||||
|
||||
/* New definitions for better coding. These are screen codepage dependent,
|
||||
but can be changed with the setStyle method. */
|
||||
#define SB_UPARROW Chr( 24 ) /* "↑" */
|
||||
#define SB_DNARROW Chr( 25 ) /* "↓" */
|
||||
#define SB_RIGHTARROW Chr( 26 ) /* "→" */
|
||||
#define SB_LEFTARROW Chr( 27 ) /* "←" */
|
||||
#define SB_UPARROW hb_UTF8ToStr( "↑" )
|
||||
#define SB_DNARROW hb_UTF8ToStr( "↓" )
|
||||
#define SB_RIGHTARROW hb_UTF8ToStr( "→" )
|
||||
#define SB_LEFTARROW hb_UTF8ToStr( "←" )
|
||||
|
||||
#define SB_THUMB Chr( 176 ) /* "░" */
|
||||
#define SB_TRACK Chr( 178 ) /* "▓" */
|
||||
#define SB_THUMB hb_UTF8ToStr( "░" )
|
||||
#define SB_TRACK hb_UTF8ToStr( "▓" )
|
||||
|
||||
METHOD New( nStart, nEnd, nOffset, bSBlock, nOrient ) CLASS SCROLLBAR
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ CREATE CLASS MENUITEM FUNCTION HBMenuItem
|
||||
VAR nID
|
||||
VAR cMessage
|
||||
VAR nShortcut
|
||||
VAR cStyle INIT Chr( 251 ) + Chr( 16 ) /* "√►" */
|
||||
VAR cStyle INIT hb_UTF8ToStr( "√►" )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
@@ -100,7 +100,9 @@ METHOD caption( cCaption ) CLASS MENUITEM
|
||||
|
||||
::cCaption := __eInstVar53( Self, "CAPTION", cCaption, "C", 1001 )
|
||||
|
||||
IF ::cCaption == MENU_SEPARATOR
|
||||
// ; TOFIX: HB_MENU_SEPARATOR_UNI is dynamic value, so it's not good
|
||||
// to use it for flag purposes.
|
||||
IF ::cCaption == HB_MENU_SEPARATOR_UNI
|
||||
::boData := NIL
|
||||
::lChecked := .F.
|
||||
::lEnabled := .F.
|
||||
@@ -111,7 +113,9 @@ METHOD caption( cCaption ) CLASS MENUITEM
|
||||
|
||||
METHOD checked( lChecked ) CLASS MENUITEM
|
||||
|
||||
IF lChecked != NIL .AND. !( ::cCaption == MENU_SEPARATOR )
|
||||
// ; TOFIX: HB_MENU_SEPARATOR_UNI is dynamic value, so it's not good
|
||||
// to use it for flag purposes.
|
||||
IF lChecked != NIL .AND. !( ::cCaption == HB_MENU_SEPARATOR_UNI )
|
||||
::lChecked := __eInstVar53( Self, "CHECKED", lChecked, "L", 1001 )
|
||||
ENDIF
|
||||
|
||||
@@ -131,7 +135,9 @@ METHOD data( boData ) CLASS MENUITEM
|
||||
|
||||
METHOD enabled( lEnabled ) CLASS MENUITEM
|
||||
|
||||
IF lEnabled != NIL .AND. !( ::cCaption == MENU_SEPARATOR )
|
||||
// ; TOFIX: HB_MENU_SEPARATOR_UNI is dynamic value, so it's not good
|
||||
// to use it for flag purposes.
|
||||
IF lEnabled != NIL .AND. !( ::cCaption == HB_MENU_SEPARATOR_UNI )
|
||||
::lEnabled := __eInstVar53( Self, "ENABLED", lEnabled, "L", 1001 )
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ METHOD LoadFromText( cObjectText, lIgnoreErrors ) CLASS HBPersistent
|
||||
|
||||
LOCAL nPos
|
||||
LOCAL cLine
|
||||
LOCAL lStart := .t.
|
||||
LOCAL lStart := .T.
|
||||
LOCAL aObjects := { Self }
|
||||
LOCAL bError
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ CREATE CLASS POPUPMENU FUNCTION HBPopUpMenu
|
||||
|
||||
PROTECTED:
|
||||
|
||||
VAR cBorder INIT B_SINGLE + SEPARATOR_SINGLE
|
||||
VAR cBorder INIT HB_B_SINGLE_UNI + HB_SEPARATOR_SINGLE_UNI
|
||||
VAR nBottom
|
||||
VAR cColorSpec
|
||||
VAR nCurrent INIT 0
|
||||
@@ -223,7 +223,9 @@ METHOD display() CLASS POPUPMENU
|
||||
|
||||
nTop++
|
||||
|
||||
IF aItems[ nPos ]:caption == MENU_SEPARATOR
|
||||
// ; TOFIX: HB_MENU_SEPARATOR_UNI is dynamic value, so it's not good
|
||||
// to use it for flag purposes.
|
||||
IF aItems[ nPos ]:caption == HB_MENU_SEPARATOR_UNI
|
||||
|
||||
hb_dispOutAtBox( nTop, nLeft - 1, SubStr( ::cBorder, 9, 1 ) + Replicate( SubStr( ::cBorder, 10, 1 ), nWidth ) + SubStr( ::cBorder, 11, 1 ), hb_ColorIndex( ::cColorSpec, 5 ) )
|
||||
|
||||
@@ -417,7 +419,9 @@ METHOD hitTest( nMRow, nMCol ) CLASS POPUPMENU
|
||||
|
||||
nPos := nMRow - ::nTop
|
||||
DO CASE
|
||||
CASE ::aItems[ nPos ]:caption == MENU_SEPARATOR
|
||||
// ; TOFIX: HB_MENU_SEPARATOR_UNI is dynamic value, so it's not good
|
||||
// to use it for flag purposes.
|
||||
CASE ::aItems[ nPos ]:caption == HB_MENU_SEPARATOR_UNI
|
||||
RETURN HTSEPARATOR
|
||||
OTHERWISE
|
||||
RETURN nPos
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
DispBox( 1, 1, 5, 5, B_SINGLE + "X", "color not supported" )
|
||||
DispBox( 7, 7, 13, 72, B_DOUBLE + "." )
|
||||
DispBox( 14, 14, 22, 22, B_SINGLE_DOUBLE )
|
||||
DispBox( 1, 1, 5, 5, HB_B_SINGLE_UNI + "X", "color not supported" )
|
||||
DispBox( 7, 7, 13, 72, HB_B_DOUBLE_UNI + "." )
|
||||
DispBox( 14, 14, 22, 22, HB_B_SINGLE_DOUBLE_UNI )
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -19,10 +19,10 @@ PROCEDURE Main()
|
||||
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 )
|
||||
DispBox( -10, -10, 10, 10, HB_B_SINGLE_UNI + "X", boxColor )
|
||||
DispBox( -10, max_col - 10, 10, max_col + 10, HB_B_SINGLE_UNI + "X", boxColor )
|
||||
DispBox( max_row - 10, - 10, max_row + 10, 10, HB_B_SINGLE_UNI + "X", boxColor )
|
||||
DispBox( max_row - 10, max_col - 10, max_row + 10, max_col + 10, HB_B_SINGLE_UNI + "X", boxColor )
|
||||
|
||||
// Draw non-filled boxes around the filled boxes.
|
||||
DispBox( -15, -15, 15, 15, 1, boxColor )
|
||||
@@ -38,15 +38,15 @@ PROCEDURE Main()
|
||||
|
||||
// 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 )
|
||||
DispBox( 1, -10, 1, 10, HB_B_SINGLE_UNI, lineColor )
|
||||
DispBox( 2, -10, 2, max_col + 10, HB_B_DOUBLE_UNI, lineColor )
|
||||
DispBox( 3, max_col - 10, 3, max_col + 10, HB_B_SINGLE_UNI, 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 )
|
||||
DispBox( -10, 1, 10, 1, HB_B_SINGLE_UNI, lineColor )
|
||||
DispBox( -10, 2, max_row + 10, 2, HB_B_DOUBLE_UNI, lineColor )
|
||||
DispBox( max_row - 10, 3, max_row + 10, 3, HB_B_SINGLE_UNI, lineColor )
|
||||
|
||||
Inkey( 5 )
|
||||
|
||||
|
||||
@@ -39,12 +39,12 @@ proc main()
|
||||
|
||||
pGT := hb_gtSelect( pGT1 )
|
||||
SetColor( "W+/R" )
|
||||
dispBox( 10, 10, 20, 50, B_DOUBLE + " " )
|
||||
dispBox( 10, 10, 20, 50, HB_B_DOUBLE_UNI + " " )
|
||||
?? "This test is shown in 1-st GT window"
|
||||
|
||||
hb_gtSelect( pGT2 )
|
||||
SetColor( "W+/B" )
|
||||
dispBox( 15, 30, 20, 70, B_DOUBLE + " " )
|
||||
dispBox( 15, 30, 20, 70, HB_B_DOUBLE_UNI + " " )
|
||||
?? "This test is shown in 2-nd GT window"
|
||||
|
||||
hb_gtSelect( pGT )
|
||||
|
||||
@@ -12,12 +12,18 @@
|
||||
* modified by Alejandro de Garate
|
||||
*/
|
||||
|
||||
/* UTF-8 */
|
||||
|
||||
#include "directry.ch"
|
||||
#include "achoice.ch"
|
||||
#include "inkey.ch"
|
||||
|
||||
#define B_THIN ( Chr( 219 ) + Chr( 223 ) + Chr( 219 ) + Chr( 219 ) + ;
|
||||
Chr( 219 ) + Chr( 220 ) + Chr( 219 ) + Chr( 219 ) )
|
||||
#ifdef __HARBOUR__
|
||||
#define B_THIN hb_UTF8ToStrBox( "█▀███▄██" )
|
||||
#else
|
||||
#define B_THIN ( Chr( 219 ) + Chr( 223 ) + Chr( 219 ) + Chr( 219 ) + ;
|
||||
Chr( 219 ) + Chr( 220 ) + Chr( 219 ) + Chr( 219 ) )
|
||||
#endif
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
@@ -33,7 +39,11 @@ FUNCTION InitScrlBar()
|
||||
|
||||
CLS
|
||||
SetBlink( .F. )
|
||||
@ 0, 0, 24, 79 BOX REPLIC( Chr( 178 ), 9 ) COLOR "GR+/W*"
|
||||
#ifdef __HARBOUR__
|
||||
@ 0, 0, 24, 79 BOX Replicate( hb_UTF8ToStrBox( "▓" ), 9 ) COLOR "GR+/W*"
|
||||
#else
|
||||
@ 0, 0, 24, 79 BOX Replicate( Chr( 178 ), 9 ) COLOR "GR+/W*"
|
||||
#endif
|
||||
@ 4, 28 SAY " Directory " COLOR "W+/B"
|
||||
@ 5, 28, 15, 60 BOX B_THIN + " " COLOR "W/W*"
|
||||
|
||||
@@ -48,7 +58,7 @@ FUNCTION InitScrlBar()
|
||||
|
||||
filesScroll:total := Len( aFileList )
|
||||
|
||||
filesScroll:SetColor( "W+/W, W+/W" ) // New method!
|
||||
filesScroll:colorSpec( "W+/W, W+/W" ) // New method!
|
||||
SET COLOR TO "N/W*, W+/B,,,W/N"
|
||||
|
||||
filesScroll:display()
|
||||
|
||||
@@ -27,7 +27,7 @@ PROCEDURE Main()
|
||||
|
||||
SET COLOR TO "GR+/RB"
|
||||
CLS
|
||||
@ 0, 0, 14, 45 BOX B_SINGLE
|
||||
@ 0, 0, 14, 45 BOX HB_B_SINGLE_UNI
|
||||
@ 0, 0 SAY "01234567890123456789012345678901"
|
||||
@ 1, 0 SAY "01234567890123456789012345678901"
|
||||
@ 2, 0 SAY "01234567890123456789012345678901"
|
||||
|
||||
@@ -68,7 +68,11 @@ PROCEDURE Main()
|
||||
|
||||
|
||||
CLS
|
||||
#ifdef HB_B_DOUBLE_SINGLE_UNI
|
||||
DispBox( nTop, nLeft, nBottom, nRight, HB_B_DOUBLE_SINGLE_UNI, cColor )
|
||||
#else
|
||||
DispBox( nTop, nLeft, nBottom, nRight, B_DOUBLE_SINGLE, cColor )
|
||||
#endif
|
||||
oBrw := TBRowseNew( nTop + 1, nLeft + 1, nBottom - 1, nRight - 1 )
|
||||
DispOutAt( nTop + 3, nLeft, _DRAW_1, cColor )
|
||||
DispOutAt( nTop + 3, nRight, _DRAW_2, cColor )
|
||||
|
||||
@@ -66,8 +66,8 @@ STATIC PROCEDURE Test_SHA2_HMAC()
|
||||
LOCAL aMsg := {;
|
||||
"Hi There",;
|
||||
"what do ya want for nothing?",;
|
||||
Replicate( Chr( 0xdd ), 50 ),;
|
||||
Replicate( Chr( 0xcd ), 50 ),;
|
||||
Replicate( hb_BChar( 0xdd ), 50 ),;
|
||||
Replicate( hb_BChar( 0xcd ), 50 ),;
|
||||
"Test With Truncation",;
|
||||
"Test Using Larger Than Block-Size Key - Hash Key First",;
|
||||
"This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm." }
|
||||
@@ -103,18 +103,18 @@ STATIC PROCEDURE Test_SHA2_HMAC()
|
||||
"e37b6a775dc87dbaa4dfa9f96e5e3ffddebd71f8867289865df5a32d20cdc944b6022cac3c4982b10d5eeb55c3e4de15134676fb6de0446065c97440fa8c6a58"}
|
||||
|
||||
LOCAL keys := {;
|
||||
Replicate( Chr( 0x0b ), 20 ),;
|
||||
Replicate( hb_BChar( 0x0b ), 20 ),;
|
||||
"Jefe",;
|
||||
Replicate( Chr( 0xaa ), 20 ),;
|
||||
Replicate( hb_BChar( 0xaa ), 20 ),;
|
||||
"",;
|
||||
Replicate( Chr( 0x0c ), 20 ),;
|
||||
Replicate( Chr( 0xaa ), 131 ),;
|
||||
Replicate( Chr( 0xaa ), 131 ) }
|
||||
Replicate( hb_BChar( 0x0c ), 20 ),;
|
||||
Replicate( hb_BChar( 0xaa ), 131 ),;
|
||||
Replicate( hb_BChar( 0xaa ), 131 ) }
|
||||
|
||||
LOCAL tmp
|
||||
|
||||
FOR tmp := 1 TO 25
|
||||
keys[ 4 ] += Chr( tmp )
|
||||
keys[ 4 ] += hb_BChar( tmp )
|
||||
NEXT
|
||||
|
||||
FOR tmp := 1 TO 7
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* hb_utf8at / hb_utf8rat test
|
||||
UTF8 Aware hb_at()/hb_rat() */
|
||||
/* hb_utf8at() / hb_utf8rat() test
|
||||
UTF8-aware hb_at()/hb_rat() */
|
||||
|
||||
#include "simpleio.ch"
|
||||
|
||||
@@ -12,8 +12,8 @@ REQUEST HB_CODEPAGE_FRISO
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
#define _UTF8_E_ACUTE Chr( 0xC3 ) + Chr( 0xA9 )
|
||||
#define _UTF8_E_CIRCUMFLEX Chr( 0xC3 ) + Chr( 0xAA )
|
||||
#define _UTF8_E_ACUTE hb_BChar( 0xC3 ) + hb_BChar( 0xA9 )
|
||||
#define _UTF8_E_CIRCUMFLEX hb_BChar( 0xC3 ) + hb_BChar( 0xAA )
|
||||
|
||||
LOCAL u := "Une r" + _UTF8_E_CIRCUMFLEX + "ve est la moiti" + _UTF8_E_ACUTE + " d'une r" + _UTF8_E_ACUTE + "alit" + _UTF8_E_ACUTE + "."
|
||||
LOCAL i := hb_translate( u, "UTF8", "FRISO" )
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* UTF-8 */
|
||||
|
||||
#include "box.ch"
|
||||
|
||||
#ifndef __CLIP__
|
||||
@@ -62,7 +64,11 @@ PROCEDURE Main()
|
||||
STATIC FUNCTION Initialise()
|
||||
|
||||
SET COLOUR TO "W+/BG"
|
||||
DispBox( 0, 0, MaxRow(), MaxCol(), Replicate( Chr(176 ),9 ), "BG/B" )
|
||||
#ifdef __HARBOUR__
|
||||
DispBox( 0, 0, MaxRow(), MaxCol(), Replicate( hb_UTF8ToStrBox( "░" ), 9 ), "BG/B" )
|
||||
#else
|
||||
DispBox( 0, 0, MaxRow(), MaxCol(), Replicate( Chr( 176 ), 9 ), "BG/B" )
|
||||
#endif
|
||||
|
||||
RETURN NIL
|
||||
|
||||
@@ -130,7 +136,11 @@ STATIC FUNCTION WindowBounce()
|
||||
|
||||
FOR i := 1 TO nBoxes
|
||||
scr[ i ] := SaveScreen( x[ i ], y[ i ], x[ i ] + 6, y[ i ] + 12 )
|
||||
#ifdef HB_B_SINGLE_UNI
|
||||
@ x[ i ], y[ i ], x[ i ] + 6, y[ i ] + 12 BOX HB_B_SINGLE_UNI + " " COLOR clr[ i ]
|
||||
#else
|
||||
@ x[ i ], y[ i ], x[ i ] + 6, y[ i ] + 12 BOX B_SINGLE + " " COLOR clr[ i ]
|
||||
#endif
|
||||
NEXT
|
||||
|
||||
DispEnd()
|
||||
|
||||
Reference in New Issue
Block a user