2012-07-22 19:31 UTC+0200 Viktor Szakats (vszakats syenar.net)
* contrib/hbgt/doc/en/hbgt.txt
* doc/en/gtslang.txt
* extras/gfspell/spell.prg
* tests/mousetst.prg
* tests/testdbf.prg
* tests/testrdd2.prg
* contrib/hbmisc/numtxthu.prg
* contrib/hbqt/tests/wvtqt.prg
* contrib/hbxbp/tests/wvtqt.prg
* include/hbapigt.h
* tests/db_brows.prg
* tests/gtchars.prg
* tests/tb1.prg
* tests/testbrw.prg
* tests/wcecon.prg
! fixing high 8-bit chars (using various methods)
(finished)
; NOTE: Some sources have been converted to UTF-8,
so from now on make sure to use an UTF-8 enabled
editor and use only UTF-8 chars when typing
non-ASCII (7-bit) characters.
This commit is contained in:
@@ -16,6 +16,29 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-07-22 19:31 UTC+0200 Viktor Szakats (vszakats syenar.net)
|
||||
* contrib/hbgt/doc/en/hbgt.txt
|
||||
* doc/en/gtslang.txt
|
||||
* extras/gfspell/spell.prg
|
||||
* tests/mousetst.prg
|
||||
* tests/testdbf.prg
|
||||
* tests/testrdd2.prg
|
||||
* contrib/hbmisc/numtxthu.prg
|
||||
* contrib/hbqt/tests/wvtqt.prg
|
||||
* contrib/hbxbp/tests/wvtqt.prg
|
||||
* include/hbapigt.h
|
||||
* tests/db_brows.prg
|
||||
* tests/gtchars.prg
|
||||
* tests/tb1.prg
|
||||
* tests/testbrw.prg
|
||||
* tests/wcecon.prg
|
||||
! fixing high 8-bit chars (using various methods)
|
||||
(finished)
|
||||
; NOTE: Some sources have been converted to UTF-8,
|
||||
so from now on make sure to use an UTF-8 enabled
|
||||
editor and use only UTF-8 chars when typing
|
||||
non-ASCII (7-bit) characters.
|
||||
|
||||
2012-07-22 18:46 UTC+0200 Viktor Szakats (vszakats syenar.net)
|
||||
* contrib/hbct/ctnet.c
|
||||
* contrib/hbhpdf/annot.c
|
||||
|
||||
@@ -453,7 +453,7 @@
|
||||
* $EXAMPLES$
|
||||
* ? gt_strexpand("abc") // prints "a b c"
|
||||
* ? gt_strexpand("abc", 2) // prints "a b c"
|
||||
* ? gt_strexpand("abc", 2, 'þ') // prints "aþþbþþc"
|
||||
* ? gt_strexpand("abc", 2, '|') // prints "a||b||c"
|
||||
* $TESTS$
|
||||
* $STATUS$
|
||||
* R
|
||||
@@ -713,5 +713,3 @@
|
||||
* GT_NEWFLAG() GT_SETFLAG() GT_CLRFLAG()
|
||||
* $END$
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -50,14 +50,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* UTF-8 */
|
||||
|
||||
FUNCTION NumToTxtHU( nValue )
|
||||
LOCAL aTort := { "tized", "sz zad", "ezred", "t¡zezred", "sz zezred", "milliomod", "milli rdod" }
|
||||
LOCAL aTort := { "tized", "század", "ezred", "tízezred", "százezred", "milliomod", "milliárdod" }
|
||||
LOCAL cRetVal
|
||||
LOCAL tmp, tmp1, tmp2
|
||||
|
||||
IF nValue < 0
|
||||
nValue := -nValue
|
||||
cRetVal := "m¡nusz "
|
||||
cRetVal := "mínusz "
|
||||
ELSE
|
||||
cRetVal := ""
|
||||
ENDIF
|
||||
@@ -76,16 +78,16 @@ FUNCTION NumToTxtHU( nValue )
|
||||
tmp1--
|
||||
ENDDO
|
||||
|
||||
cRetVal += " eg‚sz " + NumToTxtRaw( tmp * ( 10 ^ tmp1 ) ) + iif( tmp1 >= 1 .AND. tmp1 <= Len( aTort ), " " + aTort[ tmp1 ], "" )
|
||||
cRetVal += " egész " + NumToTxtRaw( tmp * ( 10 ^ tmp1 ) ) + iif( tmp1 >= 1 .AND. tmp1 <= Len( aTort ), " " + aTort[ tmp1 ], "" )
|
||||
ENDIF
|
||||
|
||||
RETURN cRetVal
|
||||
RETURN hb_UTF8ToStr( cRetVal )
|
||||
|
||||
STATIC FUNCTION NumToTxtRaw( nValue )
|
||||
LOCAL aEgesz := { "", "ezer" , "milli¢", "milli rd", "billi¢" , "trilli¢", "kvadrilli¢", "kvintilli¢" } // , "szextilli¢", "szeptilli¢", "oktilli¢", "nontilli¢" }
|
||||
LOCAL aEgyes := { "", "egy" , "kett‹" , "h rom" , "n‚gy" , "”t" , "hat" , "h‚t" , "nyolc" , "kilenc" }
|
||||
LOCAL aTizes1 := { "", "t¡z" , "h£sz" , "harminc" , "negyven", "”tven" , "hatvan" , "hetven" , "nyolcvan" , "kilencven" }
|
||||
LOCAL aTizes2 := { "", "tizen", "huszon", "harminc" , "negyven", "”tven" , "hatvan" , "hetven" , "nyolcvan" , "kilencven" }
|
||||
LOCAL aEgesz := { "", "ezer" , "millió", "milliárd", "billió" , "trillió", "kvadrillió", "kvintillió" } // , "szextillió", "szeptillió", "oktillió", "nontillió" }
|
||||
LOCAL aEgyes := { "", "egy" , "kettő" , "három" , "négy" , "öt" , "hat" , "hét" , "nyolc" , "kilenc" }
|
||||
LOCAL aTizes1 := { "", "tíz" , "húsz" , "harminc" , "negyven", "ötven" , "hatvan" , "hetven" , "nyolcvan" , "kilencven" }
|
||||
LOCAL aTizes2 := { "", "tizen", "huszon", "harminc" , "negyven", "ötven" , "hatvan" , "hetven" , "nyolcvan" , "kilencven" }
|
||||
|
||||
LOCAL aDigit
|
||||
LOCAL nLen
|
||||
@@ -108,7 +110,7 @@ STATIC FUNCTION NumToTxtRaw( nValue )
|
||||
aDigit[ tmp + 2 ] != 0
|
||||
|
||||
cValue += iif( Empty( cValue ), "", "-") +;
|
||||
iif( aDigit[ tmp ] != 0, aEgyes[ aDigit[ tmp ] + 1 ] + "sz z", "" ) +;
|
||||
iif( aDigit[ tmp ] != 0, aEgyes[ aDigit[ tmp ] + 1 ] + "száz", "" ) +;
|
||||
iif( aDigit[ tmp + 2 ] == 0, aTizes1[ aDigit[ tmp + 1 ] + 1 ], aTizes2[ aDigit[ tmp + 1 ] + 1 ] ) +;
|
||||
aEgyes[ aDigit[ tmp + 2 ] + 1 ] +;
|
||||
aEgesz[ ( Int( ( nLen - tmp ) / 3 ) ) + 1 ]
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
//----------------------------------------------------------------------//
|
||||
//----------------------------------------------------------------------//
|
||||
|
||||
/* UTF-8 */
|
||||
|
||||
#include "hbgtinfo.ch"
|
||||
#include "inkey.ch"
|
||||
#include "setcurs.ch"
|
||||
@@ -253,8 +255,8 @@ PROCEDURE thFunc()
|
||||
|
||||
oBrowse := TBrowse():New( 1, 0, maxrow(), maxcol() )
|
||||
|
||||
oBrowse:ColSep := " ³ "
|
||||
oBrowse:HeadSep := "ÄÂÄ"
|
||||
oBrowse:ColSep := hb_UTF8ToStr( " │ " )
|
||||
oBrowse:HeadSep := hb_UTF8ToStr( "─┬─" )
|
||||
oBrowse:GoTopBlock := {|| dbGoTop() }
|
||||
oBrowse:GoBottomBlock := {|| dbGoBottom() }
|
||||
oBrowse:SkipBlock := {| nSkip | dbSkipBlock( nSkip, oBrowse ) }
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
//----------------------------------------------------------------------//
|
||||
//----------------------------------------------------------------------//
|
||||
|
||||
/* UTF-8 */
|
||||
|
||||
#include "hbgtinfo.ch"
|
||||
#include "inkey.ch"
|
||||
#include "setcurs.ch"
|
||||
@@ -255,8 +257,8 @@ PROCEDURE thFunc()
|
||||
|
||||
oBrowse := TBrowse():New( 1, 0, maxrow(), maxcol() )
|
||||
|
||||
oBrowse:ColSep := " ³ "
|
||||
oBrowse:HeadSep := "ÄÂÄ"
|
||||
oBrowse:ColSep := hb_UTF8ToStr( " │ " )
|
||||
oBrowse:HeadSep := hb_UTF8ToStr( "─┬─" )
|
||||
oBrowse:GoTopBlock := { || dbGoTop() }
|
||||
oBrowse:GoBottomBlock := { || dbGoBottom() }
|
||||
oBrowse:SkipBlock := { | nSkip | dbSkipBlock( nSkip, oBrowse ) }
|
||||
@@ -376,4 +378,3 @@ STATIC FUNCTION BrwHandleKey( oBrowse, nKey, lEnd )
|
||||
|
||||
RETURN lRet
|
||||
//-------------------------------------------------------------------//
|
||||
|
||||
|
||||
@@ -115,16 +115,16 @@ and this can be done from a script which runs a Harbour program.
|
||||
|
||||
Let's see an example.
|
||||
|
||||
Suppose one national language has three national characters : '¡ÆÊ' which
|
||||
Suppose one national language has three national characters : 'ĄĆĘ' which
|
||||
correspond to 'ACE' in a lower 128 bytes ASCII table. 'Corresponding' means
|
||||
that to get a '¡' nation char one has to press a special keyboard modifier
|
||||
that to get a 'Ą' nation char one has to press a special keyboard modifier
|
||||
(like ALT+R for example) plus an 'A' char.
|
||||
|
||||
HRBNATIONCHARS should be defined as :
|
||||
|
||||
HRBNATIONCHARS=A¡CÆEÊ
|
||||
HRBNATIONCHARS=AĄCĆEĘ
|
||||
|
||||
where A¡ is a first pair, CÆ is a second pair and so on
|
||||
where AĄ is a first pair, CĆ is a second pair and so on
|
||||
|
||||
Suppose also we are working on a terminal which does not allow to enter
|
||||
national characters by pressing ALTR+A, ALTR+C, ALTR+E. Because we like
|
||||
@@ -138,7 +138,7 @@ or in other way :
|
||||
|
||||
HRBNATIONDEADKEY=`echo -ne '\140`'
|
||||
|
||||
Now we can enter ¡ by pressing ` and then A, Æ by pressing ` and then C,
|
||||
Now we can enter Ą by pressing ` and then A, Ć by pressing ` and then C,
|
||||
and so on. To get '`' character we need to double press `.
|
||||
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ if sp_init()
|
||||
z := fat( cTemp, cBuf,z )
|
||||
if z < 6
|
||||
exit
|
||||
elseif substr(cBuf,z-1,1) < "€"
|
||||
elseif substr(cBuf,z-1,1) < Chr( 128 )
|
||||
z++
|
||||
else
|
||||
exit
|
||||
|
||||
@@ -101,28 +101,14 @@ HB_EXTERN_BEGIN
|
||||
#define HB_GT_ATTR_REFRESH 0x80
|
||||
|
||||
/* strings for borders (same as box.ch, but defined for use by C) */
|
||||
|
||||
/* Note. This part will never be used, but is being kept in the source,
|
||||
so that if you use code page 437, you can see what the line
|
||||
draw characters are supposed to look like.
|
||||
01234567
|
||||
#define _B_SINGLE "ÚÄ¿³ÙÄÀ³"
|
||||
#define _B_DOUBLE "ÉÍ»º¼ÍȺ"
|
||||
#define _B_SINGLE_DOUBLE "ÖÄ·º½ÄÓº"
|
||||
#define _B_DOUBLE_SINGLE "Õ͸³¾ÍÔ³"
|
||||
#define HB_B_SINGLE_V '³'
|
||||
#define HB_B_SINGLE_H 'Ä'
|
||||
#define HB_B_DOUBLE_V 'º'
|
||||
#define HB_B_DOUBLE_H 'Í'
|
||||
*/
|
||||
#define _B_SINGLE "\xDA\xC4\xBF\xB3\xD9\xC4\xC0\xB3"
|
||||
#define _B_DOUBLE "\xC9\xCD\xBB\xBA\xBC\xCD\xC8\xBA"
|
||||
#define _B_SINGLE_DOUBLE "\xD6\xC4\xB7\xBA\xBD\xC4\xD3\xBA"
|
||||
#define _B_DOUBLE_SINGLE "\xD5\xCD\xB8\xB3\xBE\xCD\xD4\xB3"
|
||||
#define HB_B_SINGLE_V '\xB3'
|
||||
#define HB_B_SINGLE_H '\xC4'
|
||||
#define HB_B_DOUBLE_V '\xBA'
|
||||
#define HB_B_DOUBLE_H '\xCD'
|
||||
#define _B_SINGLE "\xDA\xC4\xBF\xB3\xD9\xC4\xC0\xB3" /* "ÚÄ¿³ÙÄÀ³" */
|
||||
#define _B_DOUBLE "\xC9\xCD\xBB\xBA\xBC\xCD\xC8\xBA" /* "ÉÍ»º¼ÍȺ" */
|
||||
#define _B_SINGLE_DOUBLE "\xD6\xC4\xB7\xBA\xBD\xC4\xD3\xBA" /* "ÖÄ·º½ÄÓº" */
|
||||
#define _B_DOUBLE_SINGLE "\xD5\xCD\xB8\xB3\xBE\xCD\xD4\xB3" /* "Õ͸³¾ÍÔ³" */
|
||||
#define HB_B_SINGLE_V '\xB3' /* '³' */
|
||||
#define HB_B_SINGLE_H '\xC4' /* 'Ä' */
|
||||
#define HB_B_DOUBLE_V '\xBA' /* 'º' */
|
||||
#define HB_B_DOUBLE_H '\xCD' /* 'Í' */
|
||||
|
||||
#define HB_B_SINGLE_W { 0x250C, 0x2500, 0x2510, 0x2502, 0x2518, 0x2500, 0x2514, 0x2502, 0x0000 }
|
||||
#define HB_B_DOUBLE_W { 0x2554, 0x2550, 0x2557, 0x2551, 0x255D, 0x2550, 0x255A, 0x2551, 0x0000 }
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
//+
|
||||
//+--------------------------------------------------------------------
|
||||
|
||||
/* UTF-8 */
|
||||
|
||||
#include "fileio.ch"
|
||||
|
||||
#define LI_LEN 42
|
||||
@@ -142,7 +144,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
|
||||
mslist := InitList()
|
||||
ENDIF
|
||||
IF !( Type( "str_bar" ) == "C" )
|
||||
PRIVATE str_bar := "-þ"
|
||||
PRIVATE str_bar := hb_UTF8ToStr( "-■" )
|
||||
ENDIF
|
||||
LI_Y1 := y1
|
||||
LI_X1 := x1
|
||||
@@ -193,7 +195,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 "ÚÄ¿³ÙÄÀ³ "
|
||||
@ LI_Y1, LI_X1, LI_Y2, LI_X2 BOX hb_UTF8ToStr( "┌─┐│┘─└│ " )
|
||||
IF title != Nil
|
||||
@ LI_Y1, ( LI_X2 - LI_X1 - 1 - Len( title ) ) / 2 + LI_X1 SAY " " + title + " "
|
||||
ENDIF
|
||||
@@ -231,12 +233,12 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
|
||||
SetColor( LI_CLR )
|
||||
Eval( LI_B1, mslist )
|
||||
// IF predit>1
|
||||
// SETCOLOR(LI_CLRV+"*") // ‚뤥«¨âì áâபã
|
||||
// SETCOLOR(LI_CLRV+"*")
|
||||
// ELSE
|
||||
SetColor( LI_CLRV )
|
||||
// ENDIF
|
||||
VIVSTR( mslist, LI_NSTR + LI_Y1, iif( predit > 1, LI_COLPOS, 0 ) )
|
||||
SetColor( LI_CLR ) // “¡à âì ¢ë¤¥«¥¨¥
|
||||
SetColor( LI_CLR )
|
||||
//
|
||||
#ifdef RDD_AX
|
||||
@ LI_Y1 + 2, LI_X2, LI_Y2 - 2, LI_X2 BOX Left( str_bar, 1 )
|
||||
@@ -298,10 +300,10 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
|
||||
xkey := Inkey( 0 )
|
||||
#endif
|
||||
ENDIF
|
||||
VIVSTR( mslist, LI_NSTR + LI_Y1, 0 ) // áâப¨
|
||||
VIVSTR( mslist, LI_NSTR + LI_Y1, 0 )
|
||||
IF xkey < 500
|
||||
DO CASE
|
||||
CASE xkey == 24 // Šãàá®à ¢¨§
|
||||
CASE xkey == 24
|
||||
IF ( LI_KOLZ > 0 .OR. predit == 3 ) .AND. ( LI_KOLZ == 0 .OR. ! Eval( LI_BEOF, mslist ) )
|
||||
Eval( LI_BSKIP, mslist, 1 )
|
||||
IF Eval( LI_BEOF, mslist ) .AND. ( predit < 3 .OR. LI_PRFLT )
|
||||
@@ -331,7 +333,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
CASE xkey == 5 .AND. LI_KOLZ > 0 // Šãàá®à ¢¢¥àå
|
||||
CASE xkey == 5 .AND. LI_KOLZ > 0
|
||||
Eval( LI_BSKIP, mslist, - 1 )
|
||||
IF Eval( LI_BBOF, mslist )
|
||||
Eval( LI_BGTOP, mslist )
|
||||
@@ -343,7 +345,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
|
||||
VIVSTR( mslist, LI_Y1 + 1, 0 )
|
||||
ENDIF
|
||||
ENDIF
|
||||
CASE xkey == 4 .AND. LI_KOLZ != 0 // Šãàá®à ¢¯à ¢®
|
||||
CASE xkey == 4 .AND. LI_KOLZ != 0
|
||||
IF predit > 1
|
||||
IF LI_COLPOS < LI_NCOLUMNS
|
||||
LI_COLPOS ++
|
||||
@@ -363,7 +365,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
|
||||
Eval( LI_BSKIP, mslist, LI_NSTR - 1 )
|
||||
ENDIF
|
||||
VIVNAMES( mslist, LI_NLEFT )
|
||||
CASE xkey == 19 // Šãàá®à ¢«¥¢®
|
||||
CASE xkey == 19 // èπαß«α ó½Ñó«
|
||||
IF predit > 1
|
||||
IF LI_COLPOS != 1
|
||||
LI_COLPOS --
|
||||
@@ -415,7 +417,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
|
||||
rezproc := xkey
|
||||
CASE ( xkey == 13 .OR. ( xkey > 47 .AND. xkey < 58 ) .OR. ( xkey > 64 .AND. xkey < 91 ) ;
|
||||
.OR. ( xkey > 96 .AND. xkey < 123 ) .OR. ( xkey > 127 .AND. xkey < 176 ) .OR. ( xkey > 223 .AND. xkey < 240 ) ) .AND. predit > 1 // Enter
|
||||
// <EFBFBD>¥¤ ªâ¨à®¢ ¨¥
|
||||
// ÉÑñá¬Γ¿α«óá¡¿Ñ
|
||||
fipos := LI_COLPOS + LI_NLEFT - 1 - LI_FREEZE
|
||||
IF LI_WHEN == Nil .OR. Len( LI_WHEN ) < fipos .OR. LI_WHEN[ fipos ] == Nil .OR. Eval( LI_WHEN[ fipos ] )
|
||||
IF ValType( LI_MSED ) != "N"
|
||||
@@ -779,7 +781,7 @@ FUNCTION InitList
|
||||
LI_CLR := "W+/B"
|
||||
LI_CLRV := "R/W"
|
||||
LI_BSKIP := {| a, x | HB_SYMBOL_UNUSED( a ), dbSkip( x ) }
|
||||
LI_BGTOP := {|| DBGOTOP() }
|
||||
LI_BGTOP := {|| dbGoTop() }
|
||||
LI_BGBOT := {|| dbGoBottom() }
|
||||
LI_BEOF := {|| Eof() }
|
||||
LI_BBOF := {|| Bof() }
|
||||
|
||||
@@ -12,12 +12,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* UTF-8 */
|
||||
|
||||
#include "hbgtinfo.ch"
|
||||
|
||||
#define POL_MAZ "<22>•<EFBFBD>œ¥£˜ ¡†<C2A1>‘’¤¢ž¦§"
|
||||
#define POL_ISO "¡ÆÊ£ÑÓ¦¬¯±æê³ñ󶼿"
|
||||
#define POL_852 "¤<>¨<EFBFBD>ãà—<C3A0>½¥†©ˆä¢˜«¾"
|
||||
#define POL_WIN "¥ÆÊ£ÑÓŒ<C393>¯¹æê³ñ󜟿"
|
||||
#define POL_MAZ hb_Translate( "ĄĆĘŁŃÓŚŹŻąćęłńóśźż", "UTF8", "PLMAZ" )
|
||||
#define POL_ISO hb_Translate( "ĄĆĘŁŃÓŚŹŻąćęłńóśźż", "UTF8", "PLISO" )
|
||||
#define POL_852 hb_Translate( "ĄĆĘŁŃÓŚŹŻąćęłńóśźż", "UTF8", "PL852" )
|
||||
#define POL_WIN hb_Translate( "ĄĆĘŁŃÓŚŹŻąćęłńóśźż", "UTF8", "PLWIN" )
|
||||
|
||||
REQUEST HB_CODEPAGE_UTF8
|
||||
|
||||
REQUEST HB_CODEPAGE_PLMAZ
|
||||
REQUEST HB_CODEPAGE_PLISO
|
||||
@@ -61,11 +65,11 @@ PROCEDURE Main( cTermCP, cHostCP, lBoxChar )
|
||||
?
|
||||
NEXT
|
||||
Inkey( 0 )
|
||||
?; dspboxch( "ÚÄÂÄ¿ ÉÍËÍ» ÕÍÑ͸ ÖÄÒÄ· ÜÜÜ °±²Û ° ± ² Û" )
|
||||
?; dspboxch( "³ ³ ³ º º º ÃÄÅÄ´ ÇÄ×Ķ ÝþÞ" )
|
||||
?; dspboxch( "ÃÄÅÄ´ ÌÍÎ͹ ³ ³ ³ º º º ÝÛÞ ÛþÛ" )
|
||||
?; dspboxch( "³ ³ ³ º º º ÆÍØÍµ ÌÍÎ͹ ÝþÞ" )
|
||||
?; dspboxch( "ÀÄÁÄÙ ÈÍÊͼ ÔÍÏ; ÓÄÐĽ ßßß û ® ¯" )
|
||||
?; dspboxch( hb_UTF8ToStr( "┌─┬─┐ ╔═╦═╗ ╒═╤═╕ ╓─╥─╖ ▄▄▄ ░▒▓█ ░ ▒ ▓ █" ) )
|
||||
?; dspboxch( hb_UTF8ToStr( "│ │ │ ║ ║ ║ ├─┼─┤ ╟─╫─╢ ▌■▐" ) )
|
||||
?; dspboxch( hb_UTF8ToStr( "├─┼─┤ ╠═╬═╣ │ │ │ ║ ║ ║ ▌█▐ █■█" ) )
|
||||
?; dspboxch( hb_UTF8ToStr( "│ │ │ ║ ║ ║ ╞═╪═╡ ╠═╬═╣ ▌■▐" ) )
|
||||
?; dspboxch( hb_UTF8ToStr( "└─┴─┘ ╚═╩═╝ ╘═╧═╛ ╙─╨─╜ ▀▀▀ √ « »" ) )
|
||||
?
|
||||
? "ISO-8859-2: say[ " + POL_ISO + " ]"; dspboxch( ", box[ " + POL_ISO + " ]" )
|
||||
? " Mazovia: say[ " + POL_MAZ + " ]"; dspboxch( ", box[ " + POL_MAZ + " ]" )
|
||||
|
||||
@@ -27,14 +27,8 @@ PROCEDURE Main()
|
||||
@ MaxRow() - 1, 10 SAY "X:"
|
||||
|
||||
@ nR , 2 SAY "Mouse Type : "
|
||||
@ nR + 1, 2 SAY "Buttons number: "
|
||||
@ nR + 1, 18 SAY NUMBUTTONS() PICT "9"
|
||||
|
||||
IF NUMBUTTONS() == 2
|
||||
@ nR, 18 SAY "Micros*ft mouse"
|
||||
ELSE
|
||||
@ nR, 18 SAY "Mouse System"
|
||||
ENDIF
|
||||
@ nR, 18 SAY "Mouse System"
|
||||
|
||||
@ MaxRow() - 2, 68 TO MaxRow(), MaxCol() DOUBLE
|
||||
@ MaxRow() - 1, 70 SAY "Exit"
|
||||
@@ -77,7 +71,7 @@ FUNCTION MINRECT( nTop, nLeft, nBott, nRight )
|
||||
|
||||
// First test: Check the boundaries of the main window
|
||||
|
||||
PROCEDURE TEST1
|
||||
PROCEDURE TEST1()
|
||||
|
||||
LOCAL nKey
|
||||
|
||||
@@ -139,32 +133,23 @@ PROCEDURE TEST1
|
||||
|
||||
// Second test: check the button pressing
|
||||
|
||||
PROCEDURE TEST2 ( nR, nC )
|
||||
PROCEDURE TEST2( nR, nC )
|
||||
|
||||
LOCAL cSkip := "", nKey, nPress := 0
|
||||
|
||||
@ nR , nC SAY "ÚÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄ¿"
|
||||
@ nR + 1, nC SAY "³ ÉÍÍÍ» ÉÍÍÍ» ³"
|
||||
@ nR + 2, nC SAY "³ º º º º ³"
|
||||
@ nR + 3, nC SAY "³ º º º º ³"
|
||||
@ nR + 4, nC SAY "³ ÈÍÍͼ ÈÍÍͼ ³"
|
||||
@ nR + 5, nC SAY "ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´"
|
||||
@ nR + 6, nC SAY "³ Up Up ³"
|
||||
@ nR + 7, nC SAY "³ ³"
|
||||
@ nR + 8, nC SAY "³ ³"
|
||||
@ nR + 9, nC SAY "³ Harbour ³"
|
||||
@ nR + 10, nC SAY "³ mouse ³"
|
||||
@ nR + 11, nC SAY "ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ"
|
||||
@ nR , nC SAY "+---------|---------+"
|
||||
@ nR + 1, nC SAY "| +===+ +===+ +===+ |"
|
||||
@ nR + 2, nC SAY "| | | | | | | |"
|
||||
@ nR + 3, nC SAY "| | | | | | | |"
|
||||
@ nR + 4, nC SAY "| +===+ +===+ +===+ |"
|
||||
@ nR + 6, nC SAY "| Up Up Up |"
|
||||
@ nR + 7, nC SAY "| |"
|
||||
@ nR + 8, nC SAY "| |"
|
||||
@ nR + 9, nC SAY "| Harbour |"
|
||||
@ nR + 10, nC SAY "| mouse |"
|
||||
@ nR + 11, nC SAY "+-------------------+"
|
||||
|
||||
IF NUMBUTTONS() == 3
|
||||
@ nR + 1, nC SAY "³ ÉÍÍÍ» ÉÍÍÍ» ÉÍÍÍ» ³"
|
||||
@ nR + 2, nC SAY "³ º º º º º º ³"
|
||||
@ nR + 3, nC SAY "³ º º º º º º ³"
|
||||
@ nR + 4, nC SAY "³ ÈÍÍͼ ÈÍÍͼ ÈÍÍͼ ³"
|
||||
@ nR + 6, nC SAY "³ Up Up Up ³"
|
||||
ENDIF
|
||||
|
||||
Set( _Set_EVENTMASK, INKEY_ALL )
|
||||
SET( _SET_EVENTMASK, INKEY_ALL )
|
||||
|
||||
IF ! Empty( cSkip )
|
||||
IF Upper( cSkip ) == "BREAK"
|
||||
@@ -191,8 +176,8 @@ PROCEDURE TEST2 ( nR, nC )
|
||||
|
||||
CASE nKey == K_LBUTTONDOWN
|
||||
// Left mouse button was pushed
|
||||
@ nR + 2, nC + 3 SAY "°°°"
|
||||
@ nR + 3, nC + 3 SAY "°°°"
|
||||
@ nR + 2, nC + 3 SAY "XXX"
|
||||
@ nR + 3, nC + 3 SAY "XXX"
|
||||
@ nR + 6, nC + 3 SAY "Down"
|
||||
nPress ++
|
||||
|
||||
@@ -204,8 +189,8 @@ PROCEDURE TEST2 ( nR, nC )
|
||||
|
||||
CASE nKey == K_MBUTTONDOWN
|
||||
// Middle mouse button was pushed
|
||||
@ nR + 2, nC + 10 SAY "°°°"
|
||||
@ nR + 3, nC + 10 SAY "°°°"
|
||||
@ nR + 2, nC + 10 SAY "XXX"
|
||||
@ nR + 3, nC + 10 SAY "XXX"
|
||||
@ nR + 6, nC + 10 SAY "Down"
|
||||
nPress ++
|
||||
|
||||
@@ -215,8 +200,8 @@ PROCEDURE TEST2 ( nR, nC )
|
||||
|
||||
CASE nKey == K_RBUTTONDOWN
|
||||
// Right mouse button was pushed
|
||||
@ nR + 2, nC + 15 SAY "°°°"
|
||||
@ nR + 3, nC + 15 SAY "°°°"
|
||||
@ nR + 2, nC + 15 SAY "XXX"
|
||||
@ nR + 3, nC + 15 SAY "XXX"
|
||||
@ nR + 6, nC + 15 SAY "Down"
|
||||
nPress ++
|
||||
|
||||
@@ -234,11 +219,11 @@ PROCEDURE TEST2 ( nR, nC )
|
||||
// "The right mouse button was double-clicked."
|
||||
@ 14, 22 SAY "Pass"
|
||||
|
||||
OTHERWISE
|
||||
OTHERWISE
|
||||
@ MaxRow(), 20 SAY "A keyboard key was pressed: "
|
||||
@ MaxRow(), 48 SAY nKey
|
||||
@ MaxRow(), 58 SAY iif( nKey >= 32 .AND. nKey <= 255, Chr( nKey ), "" )
|
||||
END CASE
|
||||
ENDCASE
|
||||
|
||||
IF nPress > 6
|
||||
EXIT
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* UTF-8 */
|
||||
|
||||
#include "inkey.ch"
|
||||
#include "button.ch"
|
||||
#include "setcurs.ch"
|
||||
@@ -33,7 +35,8 @@ PROCEDURE Main()
|
||||
nRight := 70
|
||||
cColor := "W+/R,G+/BR,RG+/B,BG+/G,N/GR,GR+/BG,B/GR*"
|
||||
|
||||
SET DATE FORMAT TO "yyyy/mm/dd"
|
||||
SET DATE ANSI
|
||||
SET CENTURY ON
|
||||
|
||||
// enable mouse events in CL53/Harbour
|
||||
#ifdef _SET_EVENTMASK
|
||||
@@ -45,15 +48,15 @@ PROCEDURE Main()
|
||||
CLS
|
||||
DispBox( nTop, nLeft, nBottom, nRight, B_DOUBLE_SINGLE, cColor )
|
||||
oBrw := TBRowseNew( nTop + 1, nLeft + 1, nBottom - 1, nRight - 1 )
|
||||
DispOutAt( nTop + 3, nLeft, "Ã", cColor )
|
||||
DispOutAt( nTop + 3, nRight, "´", cColor )
|
||||
DispOutAt( nBottom - 2, nLeft, "Ã", cColor )
|
||||
DispOutAt( nBottom - 2, nRight, "´", cColor )
|
||||
DispOutAt( nTop + 3, nLeft, hb_UTF8ToStr( "├" ), cColor )
|
||||
DispOutAt( nTop + 3, nRight, hb_UTF8ToStr( "┤" ), cColor )
|
||||
DispOutAt( nBottom - 2, nLeft, hb_UTF8ToStr( "├" ), cColor )
|
||||
DispOutAt( nBottom - 2, nRight, hb_UTF8ToStr( "┤" ), cColor )
|
||||
|
||||
oBrw:colorSpec( cColor )
|
||||
oBrw:headSep := "¿ ÚÄ"
|
||||
oBrw:footSep := "Ù ÀÄ"
|
||||
oBrw:colSep := "³ ³"
|
||||
oBrw:headSep := hb_UTF8ToStr( "┐ ┌─" )
|
||||
oBrw:footSep := hb_UTF8ToStr( "┘ └─" )
|
||||
oBrw:colSep := hb_UTF8ToStr( "│ │" )
|
||||
|
||||
oBrw:SkipBlock := {| n | hb_idleSleep( 0.2 ), ;
|
||||
n := iif( n < 0, Max( n, 1 - s_nPos ), ;
|
||||
@@ -70,15 +73,15 @@ PROCEDURE Main()
|
||||
oCol2 := TBColumnNew( "COL;2", {|| s_nCount ++ } )
|
||||
oCol2:defColor := { 3, 4, 5, 6 }
|
||||
oCol2:footing := "counter"
|
||||
oCol2:headSep := "¿ ÚÄ´HIDEÃÄ"
|
||||
oCol2:headSep := hb_UTF8ToStr( "┐ ┌─┤HIDE├─" )
|
||||
|
||||
oCol3 := TBColumnNew( "COL 3", {|| s_nPos % 3 == 0 } )
|
||||
oCol3:defColor := { 5, 6, 2, 3 }
|
||||
oCol3:footing := "logical"
|
||||
oCol3:picture := "@YR [Y]" // Clipper wrongly calculate the size here
|
||||
oCol3:headSep := "· ÖÄ´HIDEÃÄ"
|
||||
oCol3:footSep := "½ ÓÄ"
|
||||
oCol3:colSep := "º º"
|
||||
oCol3:headSep := hb_UTF8ToStr( "╖ ╓─┤HIDE├─" )
|
||||
oCol3:footSep := hb_UTF8ToStr( "╜ ╙─" )
|
||||
oCol3:colSep := hb_UTF8ToStr( "║ ║" )
|
||||
|
||||
oCol4 := TBColumnNew( " SHOW; ALL", {|| Date() - s_nPos } )
|
||||
oCol4:defColor := { 6, 3, 4, 2 }
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* UTF-8 */
|
||||
|
||||
// Harbour Class TBrowse and TBColumn sample
|
||||
|
||||
#include "inkey.ch"
|
||||
@@ -22,9 +24,9 @@ PROCEDURE Main()
|
||||
LOCAL nTmpRow, nTmpCol
|
||||
|
||||
oBrowse:colorSpec := "W+/B, N/BG"
|
||||
oBrowse:ColSep := "³"
|
||||
oBrowse:HeadSep := "ÑÍ"
|
||||
oBrowse:FootSep := "ÏÍ"
|
||||
oBrowse:ColSep := hb_UTF8ToStr( "│" )
|
||||
oBrowse:HeadSep := hb_UTF8ToStr( "╤═" )
|
||||
oBrowse:FootSep := hb_UTF8ToStr( "╧═" )
|
||||
oBrowse:GoTopBlock := {|| n := 1 }
|
||||
oBrowse:GoBottomBlock := {|| n := Len( aTest0 ) }
|
||||
oBrowse:SkipBlock := {| nSkip, nPos | nPos := n, ;
|
||||
@@ -56,7 +58,7 @@ PROCEDURE Main()
|
||||
cColor := SetColor( "W+/B" )
|
||||
nRow := Row()
|
||||
nCol := Col()
|
||||
@ 4, 4, 17, 31 BOX "ÚÄ¿³ÙÄÀ³ "
|
||||
@ 4, 4, 17, 31 BOX hb_UTF8ToStr( "┌─┐│┘─└│ " )
|
||||
#ifdef HB_COMPAT_C53
|
||||
oBrowse:SetKey( 0, {| ob, nkey | Defproc( ob,nKey ) } )
|
||||
WHILE .T.
|
||||
|
||||
@@ -52,7 +52,7 @@ PROCEDURE Main()
|
||||
"string is limited to 256 characters and this string is " + ;
|
||||
"a lot bigger. Do you get my drift ? If there is somebody " + ;
|
||||
"who has read this line upto the very end: Esto es un " + ;
|
||||
"sombrero grande rid¡culo." + Chr( 13 ) + Chr( 10 ) + ;
|
||||
"sombrero grande ridiculo." + Chr( 13 ) + Chr( 10 ) + ;
|
||||
"/" + Chr( 13 ) + Chr( 10 ) + "[;-)" + Chr( 13 ) + Chr( 10 ) + ;
|
||||
"\"
|
||||
NEXT
|
||||
|
||||
@@ -31,7 +31,7 @@ PROCEDURE Main( cRDDType, cAdsMode )
|
||||
"string is limited to 256 characters and this string is " + ;
|
||||
"a lot bigger. Do you get my drift ? If there is somebody " + ;
|
||||
"who has read this line upto the very end: Esto es un " + ;
|
||||
"sombrero grande ridculo." + hb_eol() + "/" + hb_eol() + "[;-)" + hb_eol() + "\" }
|
||||
"sombrero grande ridiculo." + hb_eol() + "/" + hb_eol() + "[;-)" + hb_eol() + "\" }
|
||||
|
||||
DO CASE
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* UTF-8 */
|
||||
|
||||
#include "hbgtinfo.ch"
|
||||
|
||||
request DBFCDX
|
||||
@@ -87,11 +89,11 @@ proc main()
|
||||
inkey( 0 )
|
||||
|
||||
/* display boxes */
|
||||
?; devout( "ÚÄÂÄ¿ ÉÍËÍ» ÕÍÑ͸ ÖÄÒÄ· ÜÜÜ" )
|
||||
?; devout( "³ ³ ³ º º º ÃÄÅÄ´ ÇÄ×Ķ ÝþÞ" )
|
||||
?; devout( "ÃÄÅÄ´ ÌÍÎ͹ ³ ³ ³ º º º ÝÛÞ" )
|
||||
?; devout( "³ ³ ³ º º º ÆÍØÍµ ÌÍÎ͹ ÝþÞ" )
|
||||
?; devout( "ÀÄÁÄÙ ÈÍÊͼ ÔÍÏ; ÓÄÐĽ ßßß" )
|
||||
?; devout( hb_UTF8ToStr( "┌─┬─┐ ╔═╦═╗ ╒═╤═╕ ╓─╥─╖ ▄▄▄" ) )
|
||||
?; devout( hb_UTF8ToStr( "│ │ │ ║ ║ ║ ├─┼─┤ ╟─╫─╢ ▌■▐" ) )
|
||||
?; devout( hb_UTF8ToStr( "├─┼─┤ ╠═╬═╣ │ │ │ ║ ║ ║ ▌█▐" ) )
|
||||
?; devout( hb_UTF8ToStr( "│ │ │ ║ ║ ║ ╞═╪═╡ ╠═╬═╣ ▌■▐" ) )
|
||||
?; devout( hb_UTF8ToStr( "└─┴─┘ ╚═╩═╝ ╘═╧═╛ ╙─╨─╜ ▀▀▀" ) )
|
||||
inkey( 0 )
|
||||
|
||||
?
|
||||
|
||||
Reference in New Issue
Block a user