2012-10-31 13:25 UTC+0200 Viktor Szakats (harbour syenar.net)

* include/harbour.hbx
    * fixes/changes to some function names

  * config/hb_c.cfg
    + updated to do better vertical aligment in
      structs, var declarations and assignments
    ; TODO: move this to /bin folder and add to 'install'-ed
            file list, rename to 'harbour.ucf'

  * src/debug/*.prg
  * src/rdd/*.prg
  * src/rdd/hbsix/*.prg
  * src/rdd/usrrdd/rdds/*.prg
  * src/rtl/*.prg
  * src/vm/*.prg
  * utils/hbi18n/hbi18n.prg
  * utils/hbmk2/hbmk2.prg
  * utils/hbmk2/examples/*.hb
  * contrib/hbblat/blatcls.prg
  * contrib/gtwvg/*.prg
  * contrib/gtwvg/tests/*.prg
  * contrib/hbblink/*.prg
  * contrib/hbcairo/tests/*.prg
  * contrib/hbcomm/*.prg
  * contrib/hbcomm/tests/*.prg
  * contrib/hbcups/tests/*.prg
  * contrib/hbcurl/tests/*.prg
  * contrib/hbexpat/*.prg
  * contrib/hbexpat/tests/*.prg
  * contrib/hbfbird/*.prg
  * contrib/hbfbird/tests/*.prg
  * contrib/hbfoxpro/*.prg
  * contrib/hbfship/*.prg
  * contrib/hbgd/*.prg
  * contrib/hbgd/tests/*.prg
  * contrib/hbgs/tests/*.prg
  * contrib/hbhpdf/*.prg
  * contrib/hbhpdf/tests/*.prg
  * contrib/hbhttpd/*.prg
  * contrib/hbhttpd/tests/*.prg
  * contrib/hblzf/tests/*.prg
  * contrib/hbmagic/tests/*.prg
  * contrib/hbmisc/*.prg
  * contrib/hbmisc/tests/*.prg
  * contrib/hbct/*.prg
  * contrib/hbct/tests/*.prg
  * contrib/hbmlzo/tests/*.prg
  * contrib/hbmxml/*.prg
  * contrib/hbmxml/tests/*.prg
  * contrib/hbmysql/*.prg
  * contrib/hbmysql/tests/*.prg
  * contrib/hboslib/*.prg
  * contrib/hbsms/*.prg
  * contrib/hbtinymt/tests/*.prg
  * contrib/hbtpathy/*.prg
  * contrib/hbtpathy/tests/*.prg
  * contrib/hbunix/tests/*.prg
  * contrib/hbxdiff/tests/*.prg
  * contrib/hbzebra/tests/*.prg
  * contrib/hbziparc/*.prg
  * contrib/hbziparc/tests/*.prg
  * contrib/rddads/*.prg
  * contrib/rddads/tests/*.prg
  * contrib/hbodbc/*.prg
  * contrib/hbodbc/tests/*.prg
  * contrib/hbpgsql/*.prg
  * contrib/hbpgsql/tests/*.prg
  * contrib/hbsqlit3/*.prg
  * contrib/hbsqlit3/tests/*.prg
  * contrib/hbwin/*.prg
  * contrib/hbwin/tests/*.prg
  * contrib/hbxpp/*.prg
  * contrib/hbxpp/tests/*.prg
  * contrib/hbxhb/*.prg
  * contrib/hbxhb/tests/*.prg
  * contrib/hbnetio/*.prg
  * contrib/hbnetio/utils/hbnetio/*.hb
  * contrib/hbnetio/utils/hbnetio/*.prg
  * contrib/hbtip/*.prg
  * contrib/hbtip/tests/*.prg
  * tests/usrrdd/*.prg
  * tests/funcarr.prg
  * extras/gfspell/spell.prg
  * extras/gtwvw/tests/*.prg
  * extras/guestbk/*.prg
  * extras/hbdoc/*.prg
  * extras/rddado/*.prg
  * extras/rddado/tests/*.prg
  * extras/hbxlsxml/*.prg
  * extras/httpsrv/*.prg
  * extras/httpsrv/modules/*.prg
  * extras/hbsuper/*.prg
  * extras/hbvpdf/*.prg
  * extras/hbvpdf/tests/*.prg
  * tests/*.prg (except some which are well formatted but in different/fast-typing style)
  * tests/*.hb
  * bin/*.hb
  * contrib/*.hb
  * config/*.hb
    * some manual formatting to better be able to verify
      changes made by hbformat and be friendlier with hbformat.
    * most files reformatted with hbformat using Maurizio's
      patch, with mostly minor manual corrections and verification.
      All hbformat changes for revised one-by-one.
    ! __DIR(): fixed to be unicode compatible
    ! __hbdoc_ToSource(): make sure to not generate line ending
      spaces in output.
    + hbmk2/hbrun: HBMK_WITH_GTXWC built-time option to include
      GTXWC. Useful for hbrun.
    * hbct tests: change to not use [] as string delimiter
    + added full prototypes to Array class declaration

  ; NOTE: Only these were not or not fully formatted:
          contrib/hbnetio/tests/*.prg
          tests/hbpptest/*.prg
          tests/mt/*.prg
          tests/multifnc/*.prg
          tests/rddtest/*.prg
          utils/hbmk2/hbmk2.prg (for the most part)
          src/rtl/tbrowse.prg (for the most part)
          utils/hbtest/*.prg
          *.ch, *.c, *.h

  * src/rtl/cdpapihb.c
  * src/rtl/hbadler.c
  * src/rtl/hbsocket.c
  * src/rtl/sha1.c
  * src/vm/classes.c
  * src/vm/dynsym.c
  * src/vm/garbage.c
  * src/debug/dbgentry.c
    * do not end macros with ';' to avoid uncrustify warning
      and wrong formatting as a consequence

  * src/compiler/cmdcheck.c
    * minor changes for uncrustify-friendliness

  * contrib/hbformat/utils/hbfmtcls.prg
  * contrib/hbformat/utils/hbformat.prg
    % optimizations in hbformat.prg
    ! fixed mask/filename handling to be
      multiplatform in hbformat.prg
    + added 'HBXList=' hbformat.ini parameter allowing
      to add any .hbx file for proper function name
      casing.
    ! fixed progress bar to display correctly

  * tests/speedstr.prg
    ! fixed to run as intended in unicode code
    * hbformatted

  - contrib/hbwin/tests/dlg.xml
  * contrib/hbwin/tests/dlg.rc
  - extras/gtwvw/tests/wvwtest9.xml
  + extras/gtwvw/tests/wvwtest9.mft
  * extras/gtwvw/tests/wvwtest9.rc
    * renamed manifest to have .mft extension
    % deleted unnecessary manifest
    * "Win32 API" -> "Windows API"
    ! deleted CPU arch from manifest

  * package/harb_win.mft
    * formatting

  * src/common/hbver.c
    + added version detection for win 8 and win server 2012
    * minor formatting/code cleanup

  * tests/gfx.prg
    * updated to run in script mode.
    ; TOFIX: it doesn't draw anything with GTWVT

  * tests/gfx.prg
  * tests/gtwin.prg
  * tests/gtxfnt.prg
  * tests/wvt_fs.prg
  * tests/wvtext.prg
    + support for GTXWC when run as script

  * doc/en/*.txt
  * contrib/hbct/doc/en/*.txt
  * contrib/hbgd/doc/en/*.txt
  * contrib/hbgt/doc/en/*.txt
  * contrib/hbmisc/doc/en/*.txt
  * contrib/hbnf/doc/en/*.txt
  * contrib/hbziparc/doc/en/*.txt
  * contrib/rddads/doc/en/*.txt
    ! fixed few broken tags reported by Carlos
    % deleted line ending spaces
    * some minor formatting

  * contrib/hbnf/*.c
  * contrib/hbnf/*.h
  * extras/gfspell/spellc.c
    * uncrustified with updated hb_c.cfg

  * contrib/hbnf/*.prg
  * contrib/hbnf/tests/*.prg
    * hbformatted with Mauriozo's patch.
    * a few manual corrections (avoiding #translates, using hb_ColorIndex())
      in general and to make hbformat happy.

  + contrib/hbnf/tests/menuto.prg
    + added sample code for MENU TO (adatped from docs)

  - src/rdd/dbfntx/dbfntx0.prg
    - deleted unused file with no enabled code in it

  * contrib/hbtip/tests/dbtohtml.prg
  * contrib/hbtip/tests/loadhtml.prg
  * contrib/hbtip/tests/tipmmail.prg
    * minor cleanups

  * contrib/hbtip/thtml.prg
    ! fixed typo due to s&r
    % use hb_memowrit()

  * src/rtl/tbrowse.prg
    * conditional code sorted to be hbformat friendly
    * some formatting

  * INSTALL
  * package/harbour.rb
  * package/mpkg_src_nightly.sh
  * package/mpkg_win_nightly.bat
  * package/updt_web_nightly.sh
  * website/changelog.html
  * website/faq/harbour17.html
  * website/faq/harbour27.html
  * website/index.html
  * website/menu/harbour-menu.js
    * updated repository URL to new sf.net one

  * tests/function.cfm
  * contrib/hbhttpd/tests/tpl/_main.tpl
  * contrib/hbtip/tests/tipmmail.prg
  * website/faq/*.html
  * website/samples/*.html
    * use utf-8 in html and email

  * contrib/hbrun/hbrun.hbp
    + support for HBMK_WITH_GTXWC

  * tests/rto_get.prg
  * tests/onidle.prg
  * tests/mousetst.prg
  * tests/wcecon.prg
  * tests/vmasort.prg
  - contrib/hbnf/tests/metaph.prg
    * minor cleanups

  * contrib/hbmysql/tests/test.prg
  * contrib/hbmysql/tests/dbf2mysq.prg
    % minor optimization, deleted outdated comment/line

  * src/compiler/harbour.yyc
  * src/compiler/harbour.y
    * minor formatting
This commit is contained in:
Viktor Szakats
2012-10-31 13:04:01 +00:00
parent 5e196aadf2
commit df2b7a9ebd
858 changed files with 19680 additions and 17448 deletions

View File

@@ -16,6 +16,266 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-10-31 13:25 UTC+0200 Viktor Szakats (harbour syenar.net)
* include/harbour.hbx
* fixes/changes to some function names
* config/hb_c.cfg
+ updated to do better vertical aligment in
structs, var declarations and assignments
; TODO: move this to /bin folder and add to 'install'-ed
file list, rename to 'harbour.ucf'
* src/debug/*.prg
* src/rdd/*.prg
* src/rdd/hbsix/*.prg
* src/rdd/usrrdd/rdds/*.prg
* src/rtl/*.prg
* src/vm/*.prg
* utils/hbi18n/hbi18n.prg
* utils/hbmk2/hbmk2.prg
* utils/hbmk2/examples/*.hb
* contrib/hbblat/blatcls.prg
* contrib/gtwvg/*.prg
* contrib/gtwvg/tests/*.prg
* contrib/hbblink/*.prg
* contrib/hbcairo/tests/*.prg
* contrib/hbcomm/*.prg
* contrib/hbcomm/tests/*.prg
* contrib/hbcups/tests/*.prg
* contrib/hbcurl/tests/*.prg
* contrib/hbexpat/*.prg
* contrib/hbexpat/tests/*.prg
* contrib/hbfbird/*.prg
* contrib/hbfbird/tests/*.prg
* contrib/hbfoxpro/*.prg
* contrib/hbfship/*.prg
* contrib/hbgd/*.prg
* contrib/hbgd/tests/*.prg
* contrib/hbgs/tests/*.prg
* contrib/hbhpdf/*.prg
* contrib/hbhpdf/tests/*.prg
* contrib/hbhttpd/*.prg
* contrib/hbhttpd/tests/*.prg
* contrib/hblzf/tests/*.prg
* contrib/hbmagic/tests/*.prg
* contrib/hbmisc/*.prg
* contrib/hbmisc/tests/*.prg
* contrib/hbct/*.prg
* contrib/hbct/tests/*.prg
* contrib/hbmlzo/tests/*.prg
* contrib/hbmxml/*.prg
* contrib/hbmxml/tests/*.prg
* contrib/hbmysql/*.prg
* contrib/hbmysql/tests/*.prg
* contrib/hboslib/*.prg
* contrib/hbsms/*.prg
* contrib/hbtinymt/tests/*.prg
* contrib/hbtpathy/*.prg
* contrib/hbtpathy/tests/*.prg
* contrib/hbunix/tests/*.prg
* contrib/hbxdiff/tests/*.prg
* contrib/hbzebra/tests/*.prg
* contrib/hbziparc/*.prg
* contrib/hbziparc/tests/*.prg
* contrib/rddads/*.prg
* contrib/rddads/tests/*.prg
* contrib/hbodbc/*.prg
* contrib/hbodbc/tests/*.prg
* contrib/hbpgsql/*.prg
* contrib/hbpgsql/tests/*.prg
* contrib/hbsqlit3/*.prg
* contrib/hbsqlit3/tests/*.prg
* contrib/hbwin/*.prg
* contrib/hbwin/tests/*.prg
* contrib/hbxpp/*.prg
* contrib/hbxpp/tests/*.prg
* contrib/hbxhb/*.prg
* contrib/hbxhb/tests/*.prg
* contrib/hbnetio/*.prg
* contrib/hbnetio/utils/hbnetio/*.hb
* contrib/hbnetio/utils/hbnetio/*.prg
* contrib/hbtip/*.prg
* contrib/hbtip/tests/*.prg
* tests/usrrdd/*.prg
* tests/funcarr.prg
* extras/gfspell/spell.prg
* extras/gtwvw/tests/*.prg
* extras/guestbk/*.prg
* extras/hbdoc/*.prg
* extras/rddado/*.prg
* extras/rddado/tests/*.prg
* extras/hbxlsxml/*.prg
* extras/httpsrv/*.prg
* extras/httpsrv/modules/*.prg
* extras/hbsuper/*.prg
* extras/hbvpdf/*.prg
* extras/hbvpdf/tests/*.prg
* tests/*.prg (except some which are well formatted but in different/fast-typing style)
* tests/*.hb
* bin/*.hb
* contrib/*.hb
* config/*.hb
* some manual formatting to better be able to verify
changes made by hbformat and be friendlier with hbformat.
* most files reformatted with hbformat using Maurizio's
patch, with mostly minor manual corrections and verification.
All hbformat changes for revised one-by-one.
! __DIR(): fixed to be unicode compatible
! __hbdoc_ToSource(): make sure to not generate line ending
spaces in output.
+ hbmk2/hbrun: HBMK_WITH_GTXWC built-time option to include
GTXWC. Useful for hbrun.
* hbct tests: change to not use [] as string delimiter
+ added full prototypes to Array class declaration
; NOTE: Only these were not or not fully formatted:
contrib/hbnetio/tests/*.prg
tests/hbpptest/*.prg
tests/mt/*.prg
tests/multifnc/*.prg
tests/rddtest/*.prg
utils/hbmk2/hbmk2.prg (for the most part)
src/rtl/tbrowse.prg (for the most part)
utils/hbtest/*.prg
*.ch, *.c, *.h
* src/rtl/cdpapihb.c
* src/rtl/hbadler.c
* src/rtl/hbsocket.c
* src/rtl/sha1.c
* src/vm/classes.c
* src/vm/dynsym.c
* src/vm/garbage.c
* src/debug/dbgentry.c
* do not end macros with ';' to avoid uncrustify warning
and wrong formatting as a consequence
* src/compiler/cmdcheck.c
* minor changes for uncrustify-friendliness
* contrib/hbformat/utils/hbfmtcls.prg
* contrib/hbformat/utils/hbformat.prg
% optimizations in hbformat.prg
! fixed mask/filename handling to be
multiplatform in hbformat.prg
+ added 'HBXList=' hbformat.ini parameter allowing
to add any .hbx file for proper function name
casing.
! fixed progress bar to display correctly
* tests/speedstr.prg
! fixed to run as intended in unicode code
* hbformatted
- contrib/hbwin/tests/dlg.xml
* contrib/hbwin/tests/dlg.rc
- extras/gtwvw/tests/wvwtest9.xml
+ extras/gtwvw/tests/wvwtest9.mft
* extras/gtwvw/tests/wvwtest9.rc
* renamed manifest to have .mft extension
% deleted unnecessary manifest
* "Win32 API" -> "Windows API"
! deleted CPU arch from manifest
* package/harb_win.mft
* formatting
* src/common/hbver.c
+ added version detection for win 8 and win server 2012
* minor formatting/code cleanup
* tests/gfx.prg
* updated to run in script mode.
; TOFIX: it doesn't draw anything with GTWVT
* tests/gfx.prg
* tests/gtwin.prg
* tests/gtxfnt.prg
* tests/wvt_fs.prg
* tests/wvtext.prg
+ support for GTXWC when run as script
* doc/en/*.txt
* contrib/hbct/doc/en/*.txt
* contrib/hbgd/doc/en/*.txt
* contrib/hbgt/doc/en/*.txt
* contrib/hbmisc/doc/en/*.txt
* contrib/hbnf/doc/en/*.txt
* contrib/hbziparc/doc/en/*.txt
* contrib/rddads/doc/en/*.txt
! fixed few broken tags reported by Carlos
% deleted line ending spaces
* some minor formatting
* contrib/hbnf/*.c
* contrib/hbnf/*.h
* extras/gfspell/spellc.c
* uncrustified with updated hb_c.cfg
* contrib/hbnf/*.prg
* contrib/hbnf/tests/*.prg
* hbformatted with Mauriozo's patch.
* a few manual corrections (avoiding #translates, using hb_ColorIndex())
in general and to make hbformat happy.
+ contrib/hbnf/tests/menuto.prg
+ added sample code for MENU TO (adatped from docs)
- src/rdd/dbfntx/dbfntx0.prg
- deleted unused file with no enabled code in it
* contrib/hbtip/tests/dbtohtml.prg
* contrib/hbtip/tests/loadhtml.prg
* contrib/hbtip/tests/tipmmail.prg
* minor cleanups
* contrib/hbtip/thtml.prg
! fixed typo due to s&r
% use hb_memowrit()
* src/rtl/tbrowse.prg
* conditional code sorted to be hbformat friendly
* some formatting
* INSTALL
* package/harbour.rb
* package/mpkg_src_nightly.sh
* package/mpkg_win_nightly.bat
* package/updt_web_nightly.sh
* website/changelog.html
* website/faq/harbour17.html
* website/faq/harbour27.html
* website/index.html
* website/menu/harbour-menu.js
* updated repository URL to new sf.net one
* tests/function.cfm
* contrib/hbhttpd/tests/tpl/_main.tpl
* contrib/hbtip/tests/tipmmail.prg
* website/faq/*.html
* website/samples/*.html
* use utf-8 in html and email
* contrib/hbrun/hbrun.hbp
+ support for HBMK_WITH_GTXWC
* tests/rto_get.prg
* tests/onidle.prg
* tests/mousetst.prg
* tests/wcecon.prg
* tests/vmasort.prg
- contrib/hbnf/tests/metaph.prg
* minor cleanups
* contrib/hbmysql/tests/test.prg
* contrib/hbmysql/tests/dbf2mysq.prg
% minor optimization, deleted outdated comment/line
* src/compiler/harbour.yyc
* src/compiler/harbour.y
* minor formatting
2012-10-30 08:59 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/contrib/xhb/filestat.c
! fixed resource leak in FILESTATS() function caused by wrong close

View File

@@ -1266,7 +1266,7 @@ HARBOUR
You'll need Subversion (SVN) version control software installed
on your system, and issue this command:
svn co https://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk/harbour
svn co https://svn.code.sf.net/p/harbour-project/code/trunk/harbour harbour
You can get subsequent updates using this command:
svn update
@@ -1808,16 +1808,13 @@ HARBOUR
http://groups.google.com/group/harbour-devel/
Development Timeline:
http://sourceforge.net/apps/trac/harbour-project/timeline/
https://github.com/svn2github/harbour/commits/master
Bug Tracker:
http://sourceforge.net/tracker/?group_id=681
http://sourceforge.net/p/harbour-project/bugs/
Source Repository Browser:
http://harbour-project.svn.sourceforge.net/viewvc/harbour-project/
Source Repository Checkout (anonymous) [needs Subversion]:
svn co https://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk/harbour
http://sourceforge.net/p/harbour-project/code/
CA-Cl*pper 5.3 online documentation:
http://x-hacker.org/ng/53guide/
@@ -1827,9 +1824,9 @@ HARBOUR
Particularly:
Comparing Harbour to xHarbour:
http://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk/harbour/doc/xhb-diff.txt
http://svn.code.sf.net/p/harbour-project/code/trunk/harbour/doc/xhb-diff.txt
ChangeLog:
http://harbour-project.svn.sourceforge.net/svnroot/harbour-project/trunk/harbour/ChangeLog
http://svn.code.sf.net/p/harbour-project/code/trunk/harbour/ChangeLog
[ Copyright (c) 2009-2012 Viktor Szakats (harbour syenar.net)

View File

@@ -220,9 +220,9 @@
#include "directry.ch"
#if defined( _TRACE )
#define TRACE( str ) OutStd( "T: " + str + hb_eol() )
# define TRACE( str ) OutStd( "T: " + str + hb_eol() )
#else
#define TRACE( str )
# define TRACE( str )
#endif
#define ONEARG_KW 2 /* one-arg line keyword */
@@ -280,19 +280,19 @@ PROCEDURE Main( ... )
FOR EACH cArg IN hb_AParams()
SWITCH cArg
CASE "-rediff"
lRediff := .T.
EXIT
CASE "-validate"
lValidateOnly := .T.
EXIT
CASE "-h"
CASE "-help"
CASE "--help"
CASE "/?"
Usage( 0 )
OTHERWISE
Usage( 1 )
CASE "-rediff"
lRediff := .T.
EXIT
CASE "-validate"
lValidateOnly := .T.
EXIT
CASE "-h"
CASE "-help"
CASE "--help"
CASE "/?"
Usage( 0 )
OTHERWISE
Usage( 1 )
ENDSWITCH
NEXT
@@ -323,7 +323,7 @@ PROCEDURE Main( ... )
/* Process one-arg keywords */
IF aRegexMatch[ ONEARG_KW ] == "DIFF"
cDiffFile := iif( Empty( AllTrim( aRegexMatch[ ONEARG_ARG ] ) ), NIL, ;
AllTrim( aRegexMatch[ ONEARG_ARG ] ) )
AllTrim( aRegexMatch[ ONEARG_ARG ] ) )
ELSEIF aRegexMatch[ ONEARG_KW ] == "URL"
cArchiveURL := AllTrim( aRegexMatch[ ONEARG_ARG ] )
ENDIF
@@ -334,7 +334,7 @@ PROCEDURE Main( ... )
/* Do not allow implicit destination with non-flat source spec */
IF Empty( aRegexMatch[ TWOARG_ARG1 ] ) .AND. "/" $ aRegexMatch[ TWOARG_ARG2 ]
OutStd( hb_StrFormat( "E: Non-flat source spec with implicit " + ;
"destination, offending line %d:%s:", nMemoLine, hb_eol() ) )
"destination, offending line %d:%s:", nMemoLine, hb_eol() ) )
OutStd( aRegexMatch[ 1 ] + hb_eol() )
ErrorLevel( 2 )
QUIT
@@ -342,7 +342,7 @@ PROCEDURE Main( ... )
/* Do not allow tree spec in the destination ever */
IF "/" $ aRegexMatch[ TWOARG_ARG2 ]
OutStd( hb_StrFormat( "E: Non-flat destination, offending line %d:%s", ;
nMemoLine, hb_eol() ) )
nMemoLine, hb_eol() ) )
OutStd( aRegexMatch[ 1 ] + hb_eol() )
ErrorLevel( 2 )
QUIT
@@ -355,8 +355,8 @@ PROCEDURE Main( ... )
/* The destination argument must fit in the 8+3 scheme */
IF Len( hb_FNameName( aRegexMatch[ TWOARG_ARG2 ] ) ) > 8 .OR. ;
Len( hb_FNameExt( aRegexMatch[ TWOARG_ARG2 ] ) ) > 4
OutStd( hb_StrFormat( "E: Destination does not fit 8+3, offending "+ ;
"line %d:%s", nMemoLine, hb_eol() ) )
OutStd( hb_StrFormat( "E: Destination does not fit 8+3, offending " + ;
"line %d:%s", nMemoLine, hb_eol() ) )
OutStd( aRegexMatch[ 1 ] + hb_eol() )
ErrorLevel( 2 )
QUIT
@@ -368,16 +368,16 @@ PROCEDURE Main( ... )
*/
AAdd( s_aChangeMap, { ;
iif( Empty( aRegexMatch[ TWOARG_ARG1 ] ), ;
aRegexMatch[ TWOARG_ARG2 ], ;
aRegexMatch[ TWOARG_ARG1 ] ), aRegexMatch[ TWOARG_ARG2 ] ;
} )
aRegexMatch[ TWOARG_ARG2 ], ;
aRegexMatch[ TWOARG_ARG1 ] ), aRegexMatch[ TWOARG_ARG2 ] ;
} )
/* If this is the first MAP entry, treat the original part as the
* source tree root indicator */
IF Len( s_aChangeMap ) == 1
cTopIndicator := s_aChangeMap[ 1 ][ FN_ORIG ]
IF "/" $ cTopIndicator
OutStd( hb_StrFormat( "E: First `MAP' entry is not flat, offending " + ;
"line %d:%s", nMemoLine, hb_eol() ) )
"line %d:%s", nMemoLine, hb_eol() ) )
OutStd( aRegexMatch[ 1 ] + hb_eol() )
ErrorLevel( 2 )
QUIT
@@ -405,9 +405,9 @@ PROCEDURE Main( ... )
cCWD := hb_CurDrive() + hb_osDriveSeparator() + hb_ps() + CurDir()
#if defined( _CURDIR )
cRoot := cCWD + hb_ps()
#endif
#if defined( _CURDIR )
cRoot := cCWD + hb_ps()
#endif
FClose( hb_FTempCreateEx( @s_cTempDir, cRoot, hb_FNameName( hb_ProgName() ) + "_" ) )
FErase( s_cTempDir )
@@ -452,7 +452,7 @@ PROCEDURE Main( ... )
ELSE
/* Create the `pristine tree' */
hb_FCopy( CombinePath( s_cSourceRoot, aOneMap[ FN_ORIG ] ), ;
CombinePath( s_cTempDir, cThisComponent + ".orig", aOneMap[ FN_HB ] ) )
CombinePath( s_cTempDir, cThisComponent + ".orig", aOneMap[ FN_HB ] ) )
/* Munch the file, applying the appropriate xforms */
hb_FileTran( CombinePath( s_cTempDir, cThisComponent + ".orig", aOneMap[ FN_HB ] ) )
@@ -462,12 +462,12 @@ PROCEDURE Main( ... )
IF lRediff
hb_FCopy( aOneMap[ FN_HB ], ;
CombinePath( s_cTempDir, cThisComponent, aOneMap[ FN_HB ] ) )
CombinePath( s_cTempDir, cThisComponent, aOneMap[ FN_HB ] ) )
ELSE
/* Copy it to `our tree' */
hb_FCopy( CombinePath( s_cTempDir, cThisComponent + ".orig", aOneMap[ FN_HB ] ),;
CombinePath( s_cTempDir, cThisComponent, aOneMap[ FN_HB ] ) )
hb_FCopy( CombinePath( s_cTempDir, cThisComponent + ".orig", aOneMap[ FN_HB ] ), ;
CombinePath( s_cTempDir, cThisComponent, aOneMap[ FN_HB ] ) )
ENDIF
ENDIF
@@ -477,9 +477,9 @@ PROCEDURE Main( ... )
IF ! lRediff /* If we have a local diff, and are not to re-create it, apply */
cCommand := hb_StrFormat( "%s --no-backup-if-mismatch -d %s -p 1 -i %s", ;
s_aTools[ "patch" ], ;
CombinePath( s_cTempDir, cThisComponent ), ;
CombinePath( cCWD, cDiffFile ) )
s_aTools[ "patch" ], ;
CombinePath( s_cTempDir, cThisComponent ), ;
CombinePath( cCWD, cDiffFile ) )
TRACE( "Running " + cCommand )
nRunResult := hb_processRun( cCommand, , @cStdOut, @cStdErr, .F. )
SaveLog( "patch", cStdOut, cStdErr )
@@ -491,7 +491,7 @@ PROCEDURE Main( ... )
/* Re-create the diff */
cCommand := hb_StrFormat( "%s -urN %s %s", ;
s_aTools[ "diff" ], cThisComponent + ".orig", cThisComponent )
s_aTools[ "diff" ], cThisComponent + ".orig", cThisComponent )
DirChange( s_cTempDir )
TRACE( "Running " + cCommand )
@@ -556,6 +556,7 @@ STATIC PROCEDURE SetupTools()
/* Look for g$tool first, only attempt raw name if it isn't found
* Helps non-GNU userland systems with GNU tools installed.
* Only several of the tools are known to have GNU variants. */
FOR EACH cPathComp IN hb_ATokens( hb_GetEnv( "PATH" ), hb_osPathListSeparator() )
FOR EACH cTool IN hb_HKeys( s_aTools )
IF cTool $ "patch|diff|tar" .AND. hb_FileExists( CombinePath( cPathComp, "g" + cTool ) + cExeExt )
@@ -641,33 +642,33 @@ STATIC FUNCTION FetchAndExtract( cArchiveURL )
* pick one of these, refrain from the more exotic ones. */
LOCAL aActionMap := { ;
'.tar.gz|.tgz' => { ;
'Extractor' => 'gzip', ;
'ExtractorArgs' => '-d', ;
'ExtractedFile' => '.tar', ;
'Archiver' => 'tar', ;
'ArchiverArgs' => '--force-local -xvf' ;
".tar.gz|.tgz" => { ;
"Extractor" => "gzip", ;
"ExtractorArgs" => "-d", ;
"ExtractedFile" => ".tar", ;
"Archiver" => "tar", ;
"ArchiverArgs" => "--force-local -xvf" ;
}, ;
'.tar.bz2|.tbz|.tbz2' => { ;
'Extractor' => 'bzip2', ;
'ExtractorArgs' => '-d', ;
'ExtractedFile' => '.tar', ;
'Archiver' => 'tar', ;
'ArchiverArgs' => '--force-local -xvf' ;
".tar.bz2|.tbz|.tbz2" => { ;
"Extractor" => "bzip2", ;
"ExtractorArgs" => "-d", ;
"ExtractedFile" => ".tar", ;
"Archiver" => "tar", ;
"ArchiverArgs" => "--force-local -xvf" ;
}, ;
'.tar.xz|.txz' => { ;
'Extractor' => 'xz', ;
'ExtractorArgs' => '-d', ;
'ExtractedFile' => '.tar', ;
'Archiver' => 'tar', ;
'ArchiverArgs' => '--force-local -xvf' ;
".tar.xz|.txz" => { ;
"Extractor" => "xz", ;
"ExtractorArgs" => "-d", ;
"ExtractedFile" => ".tar", ;
"Archiver" => "tar", ;
"ArchiverArgs" => "--force-local -xvf" ;
}, ;
'.zip' => { ;
'Extractor' => NIL, ;
'ExtractorArgs' => NIL, ;
'ExtractedFile' => NIL, ;
'Archiver' => 'unzip', ;
'ArchiverArgs' => '' ;
".zip" => { ;
"Extractor" => NIL, ;
"ExtractorArgs" => NIL, ;
"ExtractedFile" => NIL, ;
"Archiver" => "unzip", ;
"ArchiverArgs" => "" ;
} ;
}
@@ -682,16 +683,16 @@ STATIC FUNCTION FetchAndExtract( cArchiveURL )
FOR EACH cFrag IN hb_ATokens( cPattern, "|" )
IF At( cFrag, cFileName ) != 0
cMatchedPattern := cFrag
cExtractor := aActionMap[ cPattern ][ 'Extractor' ]
cExtractorArgs := aActionMap[ cPattern ][ 'ExtractorArgs' ]
cExtractedFileName := iif( aActionMap[ cPattern ][ 'ExtractedFile' ] == NIL, ;
cExtractor := aActionMap[ cPattern ][ "Extractor" ]
cExtractorArgs := aActionMap[ cPattern ][ "ExtractorArgs" ]
cExtractedFileName := iif( aActionMap[ cPattern ][ "ExtractedFile" ] == NIL, ;
NIL, ;
Left( cFileName, Len( cFileName ) - ;
Len( cMatchedPattern ) ) + ;
aActionMap[ cPattern ][ 'ExtractedFile' ] ;
aActionMap[ cPattern ][ "ExtractedFile" ] ;
)
cArchiver := aActionMap[ cPattern ][ 'Archiver' ]
cArchiverArgs := aActionMap[ cPattern ][ 'ArchiverArgs' ]
cArchiver := aActionMap[ cPattern ][ "Archiver" ]
cArchiverArgs := aActionMap[ cPattern ][ "ArchiverArgs" ]
EXIT
ENDIF
NEXT
@@ -699,7 +700,7 @@ STATIC FUNCTION FetchAndExtract( cArchiveURL )
IF cArchiver == NIL
OutStd( "E: Can not find archiver for `" + ;
hb_FNameNameExt( cArchiveURL ) + "'" + hb_eol() )
hb_FNameNameExt( cArchiveURL ) + "'" + hb_eol() )
RETURN .F.
ENDIF
@@ -709,7 +710,7 @@ STATIC FUNCTION FetchAndExtract( cArchiveURL )
RETURN .F.
ENDIF
cCommand := hb_StrFormat( "%s -L -# -o %s %s", s_aTools[ "curl" ], ;
CombinePath( s_cTempDir, cFileName ), FNameEscape( cArchiveURL ) )
CombinePath( s_cTempDir, cFileName ), FNameEscape( cArchiveURL ) )
TRACE( "Running " + cCommand )
nResult := hb_processRun( cCommand, , , @cStdErr, .F. )
SaveLog( "fetch", cStdOut, cStdErr )
@@ -725,7 +726,7 @@ STATIC FUNCTION FetchAndExtract( cArchiveURL )
RETURN .F.
ENDIF
cCommand := hb_StrFormat( "%s " + cExtractorArgs + " %s", ;
cExtractor, CombinePath( s_cTempDir, cFileName ) )
cExtractor, CombinePath( s_cTempDir, cFileName ) )
TRACE( "Running " + cCommand )
nResult := hb_processRun( cCommand, , @cStdOut, @cStdErr, .F. )
SaveLog( "extract", cStdOut, cStdErr )
@@ -743,7 +744,7 @@ STATIC FUNCTION FetchAndExtract( cArchiveURL )
RETURN .F.
ENDIF
cCommand := hb_StrFormat( "%s " + cArchiverArgs + " %s", ;
cArchiver, CombinePath( s_cTempDir, cExtractedFileName ) )
cArchiver, CombinePath( s_cTempDir, cExtractedFileName ) )
TRACE( "Running " + cCommand )
cCWD := hb_CurDrive() + hb_osDriveSeparator() + hb_ps() + CurDir()
DirChange( CombinePath( s_cTempDir, "root" ) )
@@ -834,19 +835,20 @@ STATIC FUNCTION hb_FileTran( cFileName )
/* Local-style includes */
cTransformedContent := StrTran( cTransformedContent, ;
Chr( 34 ) + cChangeFrom + Chr( 34 ), ;
Chr( 34 ) + cChangeTo + Chr( 34 ) )
Chr( 34 ) + cChangeFrom + Chr( 34 ), ;
Chr( 34 ) + cChangeTo + Chr( 34 ) )
/* System-style include */
cTransformedContent := StrTran( cTransformedContent, ;
"<" + cChangeFrom + ">", ;
"<" + cChangeTo + ">" )
"<" + cChangeFrom + ">", ;
"<" + cChangeTo + ">" )
NEXT
RETURN hb_MemoWrit( cFileName, cTransformedContent )
STATIC FUNCTION FNameEscape( cFileName )
#if defined( __PLATFORM__UNIX )
RETURN cFileName
#else

View File

@@ -48,7 +48,7 @@ PROCEDURE Main()
LOCAL cOldLang
IF Empty( aChanges )
OutStd( hb_progname() + ": no changes" + hb_eol() )
OutStd( hb_ProgName() + ": no changes" + hb_eol() )
RETURN
ENDIF
@@ -62,12 +62,12 @@ PROCEDURE Main()
nOffset := hb_UTCOffset()
cLogNew := hb_StrFormat( "%1$s UTC%2$s%3$02d%4$02d %5$s",;
hb_TToC( hb_DateTime(), "YYYY-MM-DD", "HH:MM" ),;
iif( nOffset < 0, "-", "+" ),;
Int( nOffset / 3600 ),;
Int( ( ( nOffset / 3600 ) - Int( nOffset / 3600 ) ) * 60 ),;
cMyName ) + hb_eol()
cLogNew := hb_StrFormat( "%1$s UTC%2$s%3$02d%4$02d %5$s", ;
hb_TToC( hb_DateTime(), "YYYY-MM-DD", "HH:MM" ), ;
iif( nOffset < 0, "-", "+" ), ;
Int( nOffset / 3600 ), ;
Int( ( ( nOffset / 3600 ) - Int( nOffset / 3600 ) ) * 60 ), ;
cMyName ) + hb_eol()
FOR EACH cLine IN aChanges
cLogNew += cLine + hb_eol()
@@ -108,6 +108,7 @@ STATIC FUNCTION VCSDetect()
RETURN ""
STATIC FUNCTION DoctorChanges( cVCS, aChanges )
LOCAL cLine
LOCAL cStart
LOCAL aNew := {}
@@ -180,23 +181,25 @@ STATIC FUNCTION DoctorChanges( cVCS, aChanges )
STATIC FUNCTION Shell()
LOCAL cShell
#if defined( __PLATFORM__UNIX )
cShell := hb_GetEnv( "SHELL" )
#else
cShell := hb_GetEnv( "COMSPEC" )
#endif
#if defined( __PLATFORM__UNIX )
cShell := hb_GetEnv( "SHELL" )
#else
cShell := hb_GetEnv( "COMSPEC" )
#endif
IF ! Empty( cShell )
#if ! defined( __PLATFORM__UNIX )
cShell := cShell + " /c"
#endif
#if ! defined( __PLATFORM__UNIX )
cShell := cShell + " /c"
#endif
ENDIF
RETURN cShell
STATIC FUNCTION Changes( cVCS )
LOCAL cStdOut := ""
DO CASE

View File

@@ -35,6 +35,7 @@ PROCEDURE Main( cContains )
RETURN
STATIC PROCEDURE WalkDir( cDir, cContains )
LOCAL aFile
FOR EACH aFile IN Directory( cDir + hb_osFileMask(), "D" )
@@ -49,6 +50,7 @@ STATIC PROCEDURE WalkDir( cDir, cContains )
RETURN
STATIC PROCEDURE ProcessFile( cFileName, cContains )
LOCAL cDynamic
LOCAL lFirst := .T.
@@ -65,6 +67,7 @@ STATIC PROCEDURE ProcessFile( cFileName, cContains )
RETURN
STATIC FUNCTION __hb_extern_get_exception_list( cInputName )
LOCAL cFile
LOCAL pRegex
LOCAL tmp

View File

@@ -11,13 +11,13 @@
indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs
align_with_tabs = false # use tabs to align
align_on_tabstop = TRUE # align on tabstops
align_on_tabstop = false # align on tabstops
input_tab_size = 8 # original tab size
output_tab_size = 3 # new tab size
indent_columns = output_tab_size
indent_switch_case = indent_columns
indent_label = 2 # pos: absolute col, neg: relative column
utf8_bom = remove # ignore/add/remove/force
#
# inter-symbol newlines
@@ -37,7 +37,7 @@ nl_brace_else = force # "} else" vs "} \n else" - cuddle else
nl_func_var_def_blk = 1
nl_fcall_brace = force # "list_for_each() {" vs "list_for_each()\n{"
nl_fdef_brace = force # "int foo() {" vs "int foo()\n{"
# nl_after_return = TRUE;
# nl_after_return = true;
# nl_before_case = 1
@@ -553,18 +553,24 @@ sp_endif_cmt = ignore # ignore/add/remove/force
#
align_enum_equ_span = 4 # '=' in enum definition
# align_nl_cont = TRUE
align_var_def_span = 3
# align_var_def_inline = TRUE
# align_var_def_star = FALSE
# align_var_def_colon = TRUE
align_assign_span = 3
# align_nl_cont = true
# align_var_def_inline = true
# align_var_def_star = false
# align_var_def_colon = true
align_var_struct_thresh = 8
align_var_struct_span = 1
align_var_struct_gap = 1
align_var_def_thresh = 8
align_var_def_span = 1
align_var_def_gap = 1
align_assign_thresh = 8
align_assign_span = 1
align_struct_init_span = 3 # align stuff in a structure init '= { }'
align_right_cmt_span = 3
align_pp_define_span = 8;
# align_pp_define_gap = 4;
align_pp_define_span = 8
align_pp_define_gap = 2
# cmt_star_cont = FALSE
# cmt_star_cont = false
# indent_brace = 0

View File

@@ -19,6 +19,7 @@
#include "fileio.ch"
PROCEDURE Main( ... )
LOCAL nErrorLevel := 0
LOCAL aFile
@@ -121,11 +122,12 @@ PROCEDURE Main( ... )
OutStd( "! Copying *nix man files..." + hb_eol() )
IF hb_DirBuild( PathSepToSelf( GetEnvC( "HB_INSTALL_MAN" ) ) + hb_ps() + "man1" )
FOR EACH tmp IN { "src/main/harbour.1" ,;
"src/pp/hbpp.1" ,;
"utils/hbmk2/hbmk2.1" ,;
"utils/hbtest/hbtest.1" ,;
"contrib/hbrun/hbrun.1" }
FOR EACH tmp IN { ;
"src/main/harbour.1", ;
"src/pp/hbpp.1", ;
"utils/hbmk2/hbmk2.1", ;
"utils/hbtest/hbtest.1", ;
"contrib/hbrun/hbrun.1" }
mk_hb_FCopy( tmp, GetEnvC( "HB_INSTALL_MAN" ) + hb_ps() + "man1" + hb_ps(), .T. )
NEXT
ELSE
@@ -157,8 +159,7 @@ PROCEDURE Main( ... )
mk_hb_FLinkSym( "harbour" + hb_ps() + cDynVersionFull, PathSepToSelf( GetEnvC( "HB_INSTALL_DYN" ) ) + hb_ps() + ".." + hb_ps() + cDynVersionFull )
CASE GetEnvC( "HB_INSTALL_DYN" ) == "/usr/local/harbour/lib"
/* TOFIX: Rewrite this in .prg */
#if 0
/* TOFIX: Rewrite this in .prg:
ld="/usr/lib"
if [ -n "${HB_INST_PKGPREF}" ] || [ -w $ld ]
then
@@ -166,7 +167,7 @@ PROCEDURE Main( ... )
ln -sf ../local/harbour/lib/$l ${HB_INST_PKGPREF}$ld/$ll
ln -sf ../local/harbour/lib/$l ${HB_INST_PKGPREF}$ld/$l
fi
#endif
*/
ENDCASE
ENDIF
@@ -180,8 +181,8 @@ PROCEDURE Main( ... )
FOR EACH tmp IN Directory( "utils" + hb_ps() + hb_osFileMask(), "D" )
IF "D" $ tmp[ F_ATTR ] .AND. !( tmp[ F_NAME ] == "." ) .AND. !( tmp[ F_NAME ] == ".." )
FOR EACH aFile IN Directory( "utils" + hb_ps() + tmp[ F_NAME ] + hb_ps() + "*.po" )
mk_hbl( "utils" + hb_ps() + tmp[ F_NAME ] + hb_ps() + aFile[ F_NAME ],;
PathSepToSelf( GetEnvC( "HB_INSTALL_BIN" ) ) + hb_ps() + hb_FNameExtSet( aFile[ F_NAME ], ".hbl" ) )
mk_hbl( "utils" + hb_ps() + tmp[ F_NAME ] + hb_ps() + aFile[ F_NAME ], ;
PathSepToSelf( GetEnvC( "HB_INSTALL_BIN" ) ) + hb_ps() + hb_FNameExtSet( aFile[ F_NAME ], ".hbl" ) )
NEXT
ENDIF
NEXT
@@ -217,11 +218,11 @@ PROCEDURE Main( ... )
cOldDir := hb_cwd( GetEnvC( "HB_INSTALL_PKG_ROOT" ) )
mk_hb_processRun( PathSepToSelf( GetEnvC( "HB_DIR_ZIP" ) ) + "zip" +;
" -q -9 -X -r -o" +;
" " + FNameEscape( tmp ) +;
" . -i " + FNameEscape( GetEnvC( "HB_PKGNAME" ) + hb_ps() + "*" ) +;
" -x *.tds -x *.exp" )
mk_hb_processRun( PathSepToSelf( GetEnvC( "HB_DIR_ZIP" ) ) + "zip" + ;
" -q -9 -X -r -o" + ;
" " + FNameEscape( tmp ) + ;
" . -i " + FNameEscape( GetEnvC( "HB_PKGNAME" ) + hb_ps() + "*" ) + ;
" -x *.tds -x *.exp" )
hb_cwd( cOldDir )
@@ -231,9 +232,9 @@ PROCEDURE Main( ... )
OutStd( "! Making Harbour .exe install package: '" + tmp + "'" + hb_eol() )
mk_hb_processRun( PathSepToSelf( GetEnvC( "HB_DIR_NSIS" ) ) + "makensis.exe" +;
" -V2" +;
" " + FNameEscape( StrTran( "package/mpkg_win.nsi", "/", hb_ps() ) ) )
mk_hb_processRun( PathSepToSelf( GetEnvC( "HB_DIR_NSIS" ) ) + "makensis.exe" + ;
" -V2" + ;
" " + FNameEscape( StrTran( "package/mpkg_win.nsi", "/", hb_ps() ) ) )
ENDIF
ELSE
cBin_Tar := "tar"
@@ -261,18 +262,19 @@ PROCEDURE Main( ... )
FErase( cTar_Path )
cOwner := "root"
cGroup := iif( GetEnvC( "HB_PLATFORM" ) == "darwin" .OR. ;
GetEnvC( "HB_PLATFORM" ) == "bsd", "wheel", "root" )
cGroup := iif( ;
GetEnvC( "HB_PLATFORM" ) == "darwin" .OR. ;
GetEnvC( "HB_PLATFORM" ) == "bsd", "wheel", "root" )
cOldDir := hb_cwd( GetEnvC( "HB_INSTALL_PKG_ROOT" ) )
/* TODO: Add support for non-GNU non-BSD tar (which gets the data from stdio) */
mk_hb_processRun( cBin_Tar +;
" czvf" +;
" " + FNameEscape( cTar_Path ) +;
iif( lGNU_Tar, " --owner=" + cOwner + " --group=" + cGroup, "" ) +;
" ." )
mk_hb_processRun( cBin_Tar + ;
" czvf" + ;
" " + FNameEscape( cTar_Path ) + ;
iif( lGNU_Tar, " --owner=" + cOwner + " --group=" + cGroup, "" ) + ;
" ." )
hb_cwd( cOldDir )
@@ -334,6 +336,7 @@ PROCEDURE Main( ... )
RETURN
STATIC FUNCTION mk_hbl( cIn, cOut )
LOCAL cErrorMsg
LOCAL aTrans
@@ -352,6 +355,7 @@ STATIC FUNCTION mk_hbl( cIn, cOut )
RETURN .F.
STATIC FUNCTION mk_hbd_core( cDirSource, cDirDest )
LOCAL cName := "harbour"
LOCAL tmp
@@ -388,9 +392,10 @@ STATIC FUNCTION PathSepToSelf( cFileName )
/* Like hb_FCopy(), but accepts dir as target and can set attributes */
STATIC PROCEDURE mk_hb_FCopy( cSrc, cDst, l644 )
LOCAL cDir, cName, cExt
IF ! hb_isLogical( l644 )
IF ! HB_ISLOGICAL( l644 )
l644 := .F.
ENDIF
@@ -434,6 +439,7 @@ STATIC FUNCTION EndsWith( cString, cEnd )
RETURN Right( cString, Len( cEnd ) ) == cEnd
STATIC FUNCTION query_stdout( cName )
LOCAL cStdOut
LOCAL cStdErr
LOCAL nRetVal
@@ -443,6 +449,7 @@ STATIC FUNCTION query_stdout( cName )
RETURN iif( nRetVal == 0, AllTrim( StrTran( cStdOut, Chr( 10 ), " " ) ), "" )
STATIC FUNCTION query_rpm( cName, cID )
LOCAL cResult := query_stdout( "rpm -q --queryformat='.%{VERSION}' " + cName )
RETURN iif( Empty( cResult ), "", cID + AllTrim( StrTran( StrTran( cResult, Chr( 10 ), " " ), "." ) ) )
@@ -450,6 +457,7 @@ STATIC FUNCTION query_rpm( cName, cID )
/* Please add your distro suffix if it not belong to the one recognized below
and remember that order checking can be important */
STATIC FUNCTION unix_name()
LOCAL tmp
DO CASE
@@ -469,6 +477,7 @@ STATIC FUNCTION unix_name()
RETURN StrTran( Lower( query_stdout( "uname -s" ) ), " ", "_" )
STATIC FUNCTION mk_extern_core()
LOCAL aExtern
IF GetEnvC( "HB_REBUILD_EXTERN" ) == "yes" .AND. ;
@@ -492,6 +501,7 @@ STATIC FUNCTION mk_extern_core()
RETURN .F.
STATIC FUNCTION GetEnvC( cEnvVar )
STATIC s_hEnvCache := { => }
IF cEnvVar $ s_hEnvCache
@@ -507,6 +517,7 @@ STATIC FUNCTION GetEnvC( cEnvVar )
#define _HB_SELF_SUFFIX "__"
STATIC FUNCTION __hb_extern_get_list( cInputName )
LOCAL aExtern := NIL
LOCAL hExtern
@@ -573,6 +584,7 @@ STATIC FUNCTION __hb_extern_get_list( cInputName )
RETURN aExtern
STATIC PROCEDURE __hb_extern_get_exception_list( cInputName, /* @ */ aInclude, /* @ */ aExclude, /* @ */ hDynamic )
LOCAL cFile
LOCAL pRegex
LOCAL tmp
@@ -602,6 +614,7 @@ STATIC PROCEDURE __hb_extern_get_exception_list( cInputName, /* @ */ aInclude, /
RETURN
STATIC FUNCTION __hb_extern_gen( aFuncList, cOutputName )
LOCAL aExtern
LOCAL cExtern
LOCAL tmp
@@ -613,9 +626,10 @@ STATIC FUNCTION __hb_extern_gen( aFuncList, cOutputName )
LOCAL cSelfName := _HB_SELF_PREFIX + Upper( hb_FNameName( cOutputName ) ) + _HB_SELF_SUFFIX
LOCAL cLine := "/* " + Replicate( "-", 68 ) + hb_eol()
LOCAL cHelp := " * Syntax: // HB_FUNC_INCLUDE <func>" + hb_eol() +;
" * // HB_FUNC_EXCLUDE <func>" + hb_eol() +;
" */" + hb_eol()
LOCAL cHelp := ;
" * Syntax: // HB_FUNC_INCLUDE <func>" + hb_eol() + ;
" * // HB_FUNC_EXCLUDE <func>" + hb_eol() + ;
" */" + hb_eol()
__hb_extern_get_exception_list( cOutputName, @aInclude, @aExclude, @hDynamic )

View File

@@ -298,7 +298,7 @@ METHOD wvtDialog:Create()
IF !Empty( ::aObjects[ i ]:aPaint )
FOR j := 1 TO Len( ::aObjects[ i ]:aPaint )
wvg_SetPaint( ::cPaintBlockID, ::nPaintID++, ;
::aObjects[ i ]:aPaint[ j,1 ], ::aObjects[ i ]:aPaint[ j,2 ] )
::aObjects[ i ]:aPaint[ j, 1 ], ::aObjects[ i ]:aPaint[ j, 2 ] )
NEXT
ENDIF
NEXT
@@ -345,17 +345,17 @@ METHOD wvtDialog:Destroy()
SetColor( ::cOldColor )
SetCursor( ::nOldCursor )
IF ::oldMenuHandle != nil .AND. ::oldMenuHandle != 0
IF ::oldMenuHandle != NIL .AND. ::oldMenuHandle != 0
Wvt_SetMenu( ::oldMenuHandle )
ENDIF
SetKey( Wvt_SetMenuKeyEvent(), ::oldMenuBlock )
RestScreen( 0, 0, MaxRow(), MaxCol(), ::cScreen )
Wvt_RestScreen( 0, 0 , MaxRow(), MaxCol(), ::aWvtScreen )
Wvt_RestScreen( 0, 0, MaxRow(), MaxCol(), ::aWvtScreen )
wvg_PurgePaint( ::cPaintBlockID )
WvtSetPaint( ::aOldPnt )
Wvt_SetGui( ::lGui )
RETURN nil
RETURN NIL
//
@@ -441,7 +441,7 @@ METHOD wvtDialog:Inkey()
::MouseOver()
IF ::nObjOver == 0
Wvt_SetPointer( WVT_IDC_ARROW )
ELSEIF ::oObjOver:nPointer != nil .AND. ::oObjOver:lActive
ELSEIF ::oObjOver:nPointer != NIL .AND. ::oObjOver:lActive
Wvt_SetPointer( ::oObjOver:nPointer )
ELSE
Wvt_SetPointer( WVT_IDC_ARROW )
@@ -771,7 +771,7 @@ CREATE CLASS WvtObject
VAR hFont
VAR aPopup INIT {}
VAR hPopup INIT nil
VAR hPopup INIT NIL
VAR nPopupItemID INIT 700000
VAR nMRow INIT 0
@@ -958,7 +958,7 @@ METHOD WvtObject:Destroy()
::hPopup := nil
ENDIF
RETURN Nil
RETURN NIL
//
@@ -973,9 +973,9 @@ METHOD WvtObject:CreatePopup()
ASize( ::aPopup[ i ], 3 )
nID := ::nPopupItemID++
::aPopup[ i,3 ] := nID
::aPopup[ i, 3 ] := nID
Wvt_AppendMenu( ::hPopup, MF_ENABLED + MF_STRING, nID, ::aPopup[ i,1 ] )
Wvt_AppendMenu( ::hPopup, MF_ENABLED + MF_STRING, nID, ::aPopup[ i, 1 ] )
NEXT
ENDIF
@@ -996,8 +996,8 @@ METHOD WvtObject:ShowPopup()
IF ( n := AScan( ::aPopup, {| e_ | e_[ 3 ] == nRet } ) ) > 0
lRet := .T.
IF HB_ISBLOCK( ::aPopup[ n,2 ] )
Eval( ::aPopup[ n,2 ] )
IF HB_ISBLOCK( ::aPopup[ n, 2 ] )
Eval( ::aPopup[ n, 2 ] )
ENDIF
ENDIF
ENDIF
@@ -1064,7 +1064,7 @@ METHOD WvtBrowse:Create()
::nTop := ::oBrw:nTop - 2
::nLeft := ::oBrw:nLeft - 2
::nBottom := iif( ::lHSBar, ::oBrw:nBottom, ::oBrw:nBottom + 1 )
::nRight := iif( ::lVSBar, ::oBrw:nRight , ::oBrw:nRight + 2 )
::nRight := iif( ::lVSBar, ::oBrw:nRight , ::oBrw:nRight + 2 )
#else
::nTop := ::oBrw:nTop
::nLeft := ::oBrw:nLeft
@@ -1278,7 +1278,7 @@ METHOD WvtBrowse:SaveSettings()
METHOD WvtBrowse:RestSettings()
IF ::xSettings != nil .AND. HB_ISBLOCK( ::bRestSettings )
IF ::xSettings != NIL .AND. HB_ISBLOCK( ::bRestSettings )
Eval( ::bRestSettings, self )
ENDIF
@@ -1294,12 +1294,12 @@ METHOD WvtBrowse:PaintBlock( nPaintObj )
CASE 1
bBlock := {|| Wvt_DrawBoxRaised( b:nTop - 2, b:nLeft - 2, b:nBottom + 1, b:nRight + 2 ) }
AAdd( ::aPaint, { bBlock, { WVT_BLOCK_BOX, b:nTop - 3,b:nLeft - 3,b:nBottom + 2,b:nRight + 3 } } )
AAdd( ::aPaint, { bBlock, { WVT_BLOCK_BOX, b:nTop - 3, b:nLeft - 3, b:nBottom + 2, b:nRight + 3 } } )
EXIT
CASE 2
bBlock := {|| Wvt_DrawBoxRecessed( b:nTop, b:nLeft, b:nBottom, b:nRight ) }
AAdd( ::aPaint, { bBlock, { WVT_BLOCK_BOX, b:nTop - 1,b:nLeft - 1,b:nBottom + 1,b:nRight + 1 } } )
AAdd( ::aPaint, { bBlock, { WVT_BLOCK_BOX, b:nTop - 1, b:nLeft - 1, b:nBottom + 1, b:nRight + 1 } } )
EXIT
CASE 3
@@ -1374,10 +1374,10 @@ METHOD WvtStatusBar:PaintBlock()
LOCAL a_ := {}, nPanels
AEval( ::aPanels, {| o | AAdd( a_,o:nTop ) , AAdd( a_,o:nLeft ), ;
AEval( ::aPanels, {| o | AAdd( a_, o:nTop ), AAdd( a_, o:nLeft ), ;
AAdd( a_, o:nBottom ), AAdd( a_, o:nRight ) } )
a_[ len( a_ ) ]++
a_[ Len( a_ ) ]++
nPanels := Len( ::aPanels )
::bPaint := {|| Wvt_DrawStatusBar( nPanels, a_ ) }
@@ -1414,7 +1414,7 @@ METHOD WvtStatusBar:SetPanels( aPanels )
FOR i := Len( ::aPanels ) - 1 TO 1 STEP - 1
oPanel := ::aPanels[ i ]
oPanel:nRight := ::aPanels[ i+1 ]:nLeft
oPanel:nRight := ::aPanels[ i + 1 ]:nLeft
oPanel:cColor := ::cColor
NEXT
@@ -1471,7 +1471,7 @@ METHOD WvtStatusBar:Refresh()
::aPanels[ i ]:Refresh()
NEXT
RETURN nil
RETURN NIL
//
//
@@ -2232,7 +2232,7 @@ METHOD WvtPushButton:PaintButton()
METHOD WvtPushButton:LeftDown()
Wvt_DrawToolButtonState( ::nTop, ::nLeft, ::nBottom, ::nRight, { 0, 0, 0, 0 } , 2 )
Wvt_DrawToolButtonState( ::nTop, ::nLeft, ::nBottom, ::nRight, { 0, 0, 0, 0 }, 2 )
RETURN .T.
@@ -2296,16 +2296,16 @@ METHOD WvtGets:Create()
FOR i := 1 TO Len( ::aGetList )
__defaultNIL( @::aGetList[ i,7 ], "N/W*,N/W*,,,N/GR*" )
__defaultNIL( @::aGetList[ i,5 ], {|| .T. } )
__defaultNIL( @::aGetList[ i,6 ], {|| .T. } )
__defaultNIL( @::aGetList[ i, 7 ], "N/W*,N/W*,,,N/GR*" )
__defaultNIL( @::aGetList[ i, 5 ], {|| .T. } )
__defaultNIL( @::aGetList[ i, 6 ], {|| .T. } )
AAdd( ::GetList, Get():New( ::aGetList[ i,1 ], ::aGetList[ i,2 ], {| v | iif( PCount() == 0, ::aGetList[ i,3 ], ::aGetList[ i,3 ] := v ) }, "::aGetList[ i, 3 ]", ::aGetList[ i,7 ] ) )
AAdd( ::GetList, Get():New( ::aGetList[ i, 1 ], ::aGetList[ i, 2 ], {| v | iif( PCount() == 0, ::aGetList[ i, 3 ], ::aGetList[ i, 3 ] := v ) }, "::aGetList[ i, 3 ]", ::aGetList[ i, 7 ] ) )
::GetList[ i ]:Display()
::PaintBlock( i )
NEXT
setPos( nCurRow, nCurCol )
SetPos( nCurRow, nCurCol )
::Super:Create()
::Dehilite()
@@ -2318,13 +2318,13 @@ METHOD WvtGets:PaintBlock( nIndex )
LOCAL nLen, bPaint
nLen := Len( Transform( ::aGetList[ nIndex,3 ], ::aGetList[ nIndex,4 ] ) )
nLen := Len( Transform( ::aGetList[ nIndex, 3 ], ::aGetList[ nIndex, 4 ] ) )
bPaint := {|| Wvt_DrawBoxGet( ::aGetList[ nIndex,1 ], ::aGetList[ nIndex,2 ], nLen ) }
bPaint := {|| Wvt_DrawBoxGet( ::aGetList[ nIndex, 1 ], ::aGetList[ nIndex, 2 ], nLen ) }
AAdd( ::aPaint, { bPaint, ;
{ WVT_BLOCK_GETS, ::aGetList[ nIndex,1 ] - 1, ::aGetList[ nIndex,2 ] - 1, ;
::aGetList[ nIndex,1 ] - 1, ::aGetList[ nIndex,2 ] + nLen } } )
{ WVT_BLOCK_GETS, ::aGetList[ nIndex, 1 ] - 1, ::aGetList[ nIndex, 2 ] - 1, ;
::aGetList[ nIndex, 1 ] - 1, ::aGetList[ nIndex, 2 ] + nLen } } )
RETURN Self
@@ -2479,13 +2479,13 @@ METHOD wvtScrollbar:New( oParent, nID, nTop, nLeft, nBottom, nRight )
METHOD wvtScrollbar:Create()
IF ::nTop == nil .OR. ::nLeft == nil
RETURN nil
IF ::nTop == NIL .OR. ::nLeft == nil
RETURN NIL
ENDIF
IF ::nBarType == WVT_SCROLLBAR_VERT
__defaultNIL( @::nBottom, ::nTop + 5 )
__defaultNIL( @::nRight , ::nLeft + 1 )
__defaultNIL( @::nRight, ::nLeft + 1 )
::nRight := ::nLeft + 1
::nBottom := Max( 7, ::nBottom )
@@ -2516,7 +2516,7 @@ METHOD wvtScrollbar:Create()
::bBtnRightBottom := ;
{|| Wvt_DrawScrollButton( ::nBtn2Top, ::nBtn2Left, ::nBtn2Bottom, ::nBtn2Right, ::aPxlBtnBtm, 3 ) }
::bBtnScroll := ;
{|| Wvt_DrawScrollThumbVert( ::nSTop , ::nSLeft , ::nSBottom, ::nSRight, ::aPxlScroll, ;
{|| Wvt_DrawScrollThumbVert( ::nSTop, ::nSLeft, ::nSBottom, ::nSRight, ::aPxlScroll, ;
::nThumbPos ) }
::bBtnLeftTopDep := ;
{|| Wvt_DrawScrollButton( ::nBtn1Top, ::nBtn1Left, ::nBtn1Bottom, ::nBtn1Right, ::aPxlBtnTop, 1, .T. ) }
@@ -2525,7 +2525,7 @@ METHOD wvtScrollbar:Create()
ELSE
__defaultNIL( @::nBottom, ::nTop )
__defaultNIL( @::nRight , ::nLeft + 11 )
__defaultNIL( @::nRight, ::nLeft + 11 )
::nBottom := ::nTop
::nRight := Max( 11, ::nRight )
@@ -3029,7 +3029,7 @@ METHOD WvtBanner:Destroy()
WVG_DeleteObject( ::oLabel:hFont )
RETURN nil
RETURN NIL
//
@@ -3380,7 +3380,7 @@ METHOD wvtMenu:Destroy()
IF !Wvt_DestroyMenu( ::hMenu )
#if 0
Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:Destroy()", "Destroy menu FAILED", {},__FILE__ ) )
Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:Destroy()", "Destroy menu FAILED", {}, __FILE__ ) )
#endif
ENDIF
::hMenu := 0
@@ -3404,13 +3404,13 @@ METHOD wvtMenu:AddItem( cCaption, bAction )
aItem := { MF_SEPARATOR, 0, 0, NIL }
ELSE
#if 0
Throw( ErrorNew( "wvtMenu", 3101, "wvtMenu:AddItem()", "Argument Error", { cCaption, bAction },__FILE__ ) )
Throw( ErrorNew( "wvtMenu", 3101, "wvtMenu:AddItem()", "Argument Error", { cCaption, bAction }, __FILE__ ) )
#endif
ENDIF
IF !Wvt_AppendMenu( ::hMenu, aItem[WVT_MENU_TYPE], aItem[WVT_MENU_IDENTIFIER], aItem[WVT_MENU_CAPTION] )
IF !Wvt_AppendMenu( ::hMenu, aItem[ WVT_MENU_TYPE ], aItem[ WVT_MENU_IDENTIFIER ], aItem[ WVT_MENU_CAPTION ] )
#if 0
Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:AddItem()", "Add menu item", { cCaption, bAction },__FILE__ ) )
Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:AddItem()", "Add menu item", { cCaption, bAction }, __FILE__ ) )
#endif
ENDIF
@@ -3441,15 +3441,15 @@ METHOD wvtMenu:DelItem( nItemNum )
LOCAL lResult := .F.
IF nItemNum > 0 .AND. nItemNum <= ::NumItems()
IF ::aItems[ nItemNum,WVT_MENU_TYPE ] == MF_POPUP
::aItems[ nItemNum,WVT_MENU_MENUOBJ ]:Destroy()
IF ::aItems[ nItemNum, WVT_MENU_TYPE ] == MF_POPUP
::aItems[ nItemNum, WVT_MENU_MENUOBJ ]:Destroy()
ENDIF
IF ( lResult := Wvt_DeleteMenu( ::hMenu, nItemNum - 1,MF_BYPOSITION ) ) /* Remember ZERO base */
IF ( lResult := Wvt_DeleteMenu( ::hMenu, nItemNum - 1, MF_BYPOSITION ) ) /* Remember ZERO base */
hb_ADel( ::aItems, nItemNum, .T. )
ELSE
#if 0
Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:DelItem()", "Delete menu item FAILED", { nItemNum },__FILE__ ) )
Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:DelItem()", "Delete menu item FAILED", { nItemNum }, __FILE__ ) )
#endif
ENDIF
ENDIF
@@ -3507,9 +3507,9 @@ METHOD wvtMenu:FindMenuItemById( nId )
IF !Empty( nId )
x := ::NumItems()
DO WHILE x > 0 .AND. Empty( aResult )
IF ::aItems[ x,WVT_MENU_TYPE ] == MF_POPUP
aResult := ::aItems[ x,WVT_MENU_MENUOBJ ]:FindMenuItemById( nId )
ELSEIF ::aItems[ x,WVT_MENU_IDENTIFIER ] == nId
IF ::aItems[ x, WVT_MENU_TYPE ] == MF_POPUP
aResult := ::aItems[ x, WVT_MENU_MENUOBJ ]:FindMenuItemById( nId )
ELSEIF ::aItems[ x, WVT_MENU_IDENTIFIER ] == nId
aResult := ::aItems[ x ]
ENDIF
x--
@@ -3641,7 +3641,7 @@ METHOD TBrowseWVG:SetVisible()
nColPos := aCol[ _TBCI_COLPOS ]
IF aCol[ _TBCI_SEPWIDTH ] > 0
nColPos += Int( aCol[ _TBCI_SEPWIDTH ]/2 )
nColPos += Int( aCol[ _TBCI_SEPWIDTH ] / 2 )
ENDIF
AAdd( ::aColumnsSep, nColPos )

View File

@@ -397,7 +397,7 @@ METHOD WvgCrt:destroy()
IF ! ::isGT
IF ::lModal
hb_gtInfo( HB_GTI_ENABLE , ::pGTp )
hb_gtInfo( HB_GTI_ENABLE, ::pGTp )
hb_gtSelect( ::pGTp )
hb_gtInfo( HB_GTI_SETFOCUS, ::pGTp )
ENDIF

View File

@@ -140,7 +140,7 @@ METHOD WvgDrawingArea:handleEvent( nMessage, aNM )
ENDIF
IF HB_ISNUMERIC( ::hBrushBG )
WVG_SetBkMode( aNM[ 1 ], 1 )
WVG_FillRect( aNM[ 1 ], { 0, 0, ::currentSize()[1], ::currentSize()[2] }, ::hBrushBG )
WVG_FillRect( aNM[ 1 ], { 0, 0, ::currentSize()[ 1 ], ::currentSize()[ 2 ] }, ::hBrushBG )
RETURN EVENT_HANDELLED
ENDIF

View File

@@ -185,7 +185,7 @@ METHOD WvgHTMLViewer:xBeforeNavigate( cURL, Flags, TFName, PData, Headers )
IF PCount() >= 1 .AND. HB_ISBLOCK( ::sl_beforeNavigate )
Eval( ::sl_beforeNavigate, cURL, NIL, Self )
RETURN nil
RETURN NIL
ENDIF
RETURN Self

View File

@@ -146,7 +146,7 @@ METHOD WvgListBox:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::wvgWindow:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::style := WS_CHILD + WS_OVERLAPPED + WS_TABSTOP + WS_CLIPSIBLINGS + LBS_NOINTEGRALHEIGHT + LBS_WANTKEYBOARDINPUT
::exStyle := WS_EX_CLIENTEDGE //+ WS_EX_LEFT + WS_EX_LTRREADING + WS_EX_RIGHTSCROLLBAR
::exStyle := WS_EX_CLIENTEDGE // + WS_EX_LEFT + WS_EX_LTRREADING + WS_EX_RIGHTSCROLLBAR
::className := "LISTBOX"
::objType := objTypeListBox

View File

@@ -217,7 +217,7 @@ METHOD WvgMenuBar:destroy()
IF !WVG_DestroyMenu( ::hMenu )
#if 0
Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:Destroy()", "Destroy menu FAILED", {},__FILE__ ) )
Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:Destroy()", "Destroy menu FAILED", {}, __FILE__ ) )
#endif
ENDIF
@@ -255,7 +255,7 @@ METHOD WvgMenuBar:delItem( nItemNum )
hb_ADel( ::aMenuItems, nItemNum, .T. )
ELSE
#if 0
Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:DelItem()", "Delete menu item FAILED", { nItemNum },__FILE__ ) )
Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:DelItem()", "Delete menu item FAILED", { nItemNum }, __FILE__ ) )
#endif
ENDIF
ENDIF
@@ -319,7 +319,7 @@ METHOD WvgMenuBar:putItem( aItem, nPos, lInsert )
CASE "O"
cCaption := iif( bAction == NIL, xCaption:title, bAction )
aItem := { MF_POPUP , xCaption:hMenu , cCaption, xCaption, nStyle, nAttrib }
aItem := { MF_POPUP, xCaption:hMenu, cCaption, xCaption, nStyle, nAttrib }
EXIT
CASE "N" /* Resource ID */
@@ -379,7 +379,7 @@ METHOD WvgMenuBar:findMenuItemById( nId )
DO WHILE x > 0 .AND. Empty( aResult )
IF ::aMenuItems[ x, WVT_MENU_TYPE ] == MF_POPUP
aResult := ::aMenuItems[ x,WVT_MENU_MENUOBJ ]:findMenuItemById( nId )
aResult := ::aMenuItems[ x, WVT_MENU_MENUOBJ ]:findMenuItemById( nId )
ELSEIF ::aMenuItems[ x, WVT_MENU_IDENTIFIER ] == nId
aResult := { x, ::aMenuItems[ x, WVT_MENU_ACTION ], ::sl_itemSelected, Self }
@@ -401,10 +401,10 @@ METHOD WvgMenuBar:findMenuPosById( nId )
x := ::numItems()
DO WHILE x > 0 .AND. Empty( nPos )
IF ::aMenuItems[ x,WVT_MENU_TYPE ] == MF_POPUP
nPos := ::aMenuItems[ x,WVT_MENU_MENUOBJ ]:findMenuPosById( nId )
IF ::aMenuItems[ x, WVT_MENU_TYPE ] == MF_POPUP
nPos := ::aMenuItems[ x, WVT_MENU_MENUOBJ ]:findMenuPosById( nId )
ELSEIF ::aMenuItems[ x,WVT_MENU_IDENTIFIER ] == nId
ELSEIF ::aMenuItems[ x, WVT_MENU_IDENTIFIER ] == nId
nPos := x
ENDIF

View File

@@ -75,7 +75,7 @@ FUNCTION Wvt_Paint()
/* Call this function from this funtion */
WvtPaintObjects()
RETURN nil
RETURN NIL
#endif
@@ -93,31 +93,31 @@ FUNCTION WvtPaintObjects()
FOR i := 1 TO nBlocks
lExe := .T.
IF aBlocks[ i,3 ] != nil .AND. !Empty( aBlocks[ i,3 ] )
IF aBlocks[ i, 3 ] != NIL .AND. !Empty( aBlocks[ i, 3 ] )
/* Check parameters against tlbr_ depending upon the
* type of object and attributes contained in aAttr
*/
DO CASE
CASE aBlocks[ i,3,1 ] == WVT_BLOCK_GRID_V
b := aBlocks[ i,3,6 ]
CASE aBlocks[ i, 3, 1 ] == WVT_BLOCK_GRID_V
b := aBlocks[ i, 3, 6 ]
IF Len( b:aColumnsSep ) == 0
lExe := .F.
ELSE
nLeft := b:aColumnsSep[ 1 ]
nRight := b:aColumnsSep[ len( b:aColumnsSep ) ]
IF !( tlbr_[ 1 ] <= aBlocks[ i,3,4 ] .AND. ; /* top < bottom */
tlbr_[ 3 ] >= aBlocks[ i,3,2 ] .AND. ; /* bootm > top */
nRight := b:aColumnsSep[ Len( b:aColumnsSep ) ]
IF !( tlbr_[ 1 ] <= aBlocks[ i, 3, 4 ] .AND. ; /* top < bottom */
tlbr_[ 3 ] >= aBlocks[ i, 3, 2 ] .AND. ; /* bootm > top */
tlbr_[ 2 ] <= nRight + 1 .AND. ; /* left < right */
tlbr_[ 4 ] >= nLeft - 2 ) /* right > left */
lExe := .F.
ENDIF
ENDIF
CASE aBlocks[ i,3,1 ] == WVT_BLOCK_GETS
IF !( tlbr_[ 1 ] <= aBlocks[ i,3,4 ] .AND. ; /* top < bott */
tlbr_[ 3 ] >= aBlocks[ i,3,2 ] .AND. ; /* bootm > top */
tlbr_[ 2 ] <= aBlocks[ i,3,5 ] .AND. ; /* left < righ */
tlbr_[ 4 ] >= aBlocks[ i,3,3 ] ) /* right > left */
CASE aBlocks[ i, 3, 1 ] == WVT_BLOCK_GETS
IF !( tlbr_[ 1 ] <= aBlocks[ i, 3, 4 ] .AND. ; /* top < bott */
tlbr_[ 3 ] >= aBlocks[ i, 3, 2 ] .AND. ; /* bootm > top */
tlbr_[ 2 ] <= aBlocks[ i, 3, 5 ] .AND. ; /* left < righ */
tlbr_[ 4 ] >= aBlocks[ i, 3, 3 ] ) /* right > left */
lExe := .F.
ENDIF
@@ -125,17 +125,17 @@ FUNCTION WvtPaintObjects()
/* If refreshing rectangle's top is less than objects' bottom */
/* and left is less than objects' right */
/* */
IF !( tlbr_[ 1 ] <= aBlocks[ i,3,4 ] .AND. ; /* top <= bottom */
tlbr_[ 3 ] >= aBlocks[ i,3,2 ] .AND. ; /* bootm >= top */
tlbr_[ 2 ] <= aBlocks[ i,3,5 ] .AND. ; /* left < right */
tlbr_[ 4 ] >= aBlocks[ i,3,3 ] ) /* right > left */
IF !( tlbr_[ 1 ] <= aBlocks[ i, 3, 4 ] .AND. ; /* top <= bottom */
tlbr_[ 3 ] >= aBlocks[ i, 3, 2 ] .AND. ; /* bootm >= top */
tlbr_[ 2 ] <= aBlocks[ i, 3, 5 ] .AND. ; /* left < right */
tlbr_[ 4 ] >= aBlocks[ i, 3, 3 ] ) /* right > left */
lExe := .F.
ENDIF
ENDCASE
ENDIF
IF lExe
Eval( aBlocks[ i,2 ] )
Eval( aBlocks[ i, 2 ] )
ENDIF
NEXT
ENDIF
@@ -171,16 +171,16 @@ FUNCTION wvg_SetPaint( cID, nAction, xData, aAttr )
IF xData != nil
IF ( n := AScan( t_paint_, {| e_ | e_[ 1 ] == cID } ) ) > 0
IF ( n1 := AScan( t_paint_[ n, 2 ], {| e_ | e_[ 1 ] == nAction } ) ) > 0
oldData := t_paint_[ n,2,n1,2 ]
t_paint_[ n,2,n1,2 ] := xData
t_paint_[ n,2,n1,3 ] := aAttr
oldData := t_paint_[ n, 2, n1, 2 ]
t_paint_[ n, 2, n1, 2 ] := xData
t_paint_[ n, 2, n1, 3 ] := aAttr
ELSE
AAdd( t_paint_[ n,2 ], { nAction, xData, aAttr } )
AAdd( t_paint_[ n, 2 ], { nAction, xData, aAttr } )
ENDIF
ELSE
AAdd( t_paint_, { cID, {} } )
n := Len( t_paint_ )
AAdd( t_paint_[ n,2 ], { nAction, xData, aAttr } )
AAdd( t_paint_[ n, 2 ], { nAction, xData, aAttr } )
ENDIF
ENDIF
@@ -193,7 +193,7 @@ FUNCTION wvg_GetPaint( cID )
LOCAL n
IF ( n := AScan( t_paint_, {| e_ | e_[ 1 ] == cID } ) ) > 0
RETURN t_paint_[ n,2 ]
RETURN t_paint_[ n, 2 ]
ENDIF
RETURN {}
@@ -206,8 +206,8 @@ FUNCTION wvg_DelPaint( cID, nAction )
IF ( n := AScan( t_paint_, {| e_ | e_[ 1 ] == cID } ) ) > 0
IF ( n1 := AScan( t_paint_[ n, 2 ], {| e_ | e_[ 1 ] == nAction } ) ) > 0
xData := t_paint_[ n,2,n1,2 ]
t_paint_[ n,2,n1,2 ] := {|| .T. }
xData := t_paint_[ n, 2, n1, 2 ]
t_paint_[ n, 2, n1, 2 ] := {|| .T. }
ENDIF
ENDIF
@@ -250,7 +250,7 @@ FUNCTION wvg_InsertPaint( cID, aPaint, lSet )
WvtSetPaint( aPaint )
ENDIF
RETURN nil
RETURN NIL
//
//
@@ -338,17 +338,17 @@ FUNCTION Wvt_MakeDlgTemplate( nTop, nLeft, nRows, nCols, aOffSet, cTitle, nStyle
+ DS_3DLOOK
ENDIF
AAdd( aDlg[ 1 ] , iif( Empty( nHelpId ), 0, nHelpId ) )
AAdd( aDlg[ 1 ] , iif( Empty( nExStyle ), 0, nExStyle ) )
AAdd( aDlg[ 1 ] , nStyle )
AAdd( aDlg[ 1 ] , 0 )
AAdd( aDlg[ 1 ] , nX )
AAdd( aDlg[ 1 ] , nY )
AAdd( aDlg[ 1 ] , nW )
AAdd( aDlg[ 1 ] , nH )
AAdd( aDlg[ 1 ] , 0 )
AAdd( aDlg[ 1 ] , 0 )
AAdd( aDlg[ 1 ] , iif( HB_ISSTRING( cTitle ), cTitle, "" ) )
AAdd( aDlg[ 1 ], iif( Empty( nHelpId ), 0, nHelpId ) )
AAdd( aDlg[ 1 ], iif( Empty( nExStyle ), 0, nExStyle ) )
AAdd( aDlg[ 1 ], nStyle )
AAdd( aDlg[ 1 ], 0 )
AAdd( aDlg[ 1 ], nX )
AAdd( aDlg[ 1 ], nY )
AAdd( aDlg[ 1 ], nW )
AAdd( aDlg[ 1 ], nH )
AAdd( aDlg[ 1 ], 0 )
AAdd( aDlg[ 1 ], 0 )
AAdd( aDlg[ 1 ], iif( HB_ISSTRING( cTitle ), cTitle, "" ) )
IF hb_bitAnd( nStyle, DS_SETFONT ) == DS_SETFONT
AAdd( aDlg[ 1 ], iif( HB_ISNUMERIC( nPointSize ), nPointSize, 8 ) )
@@ -408,19 +408,19 @@ FUNCTION Wvt_AddDlgItem( aDlg, nTop, nLeft, nRows, nCols, aOffSet, ;
nH := nRows
ENDIF
aDlg[ 1,4 ]++ /* item count */
aDlg[ 1, 4 ]++ /* item count */
AAdd( aDlg[ 2 ] , iif( HB_ISNUMERIC( nHelpId ), nHelpId , 0 ) )
AAdd( aDlg[ 3 ] , iif( HB_ISNUMERIC( nExStyle ), nExStyle, 0 ) )
AAdd( aDlg[ 4 ] , iif( HB_ISNUMERIC( nStyle ), nStyle , WS_CHILD + WS_VISIBLE ) )
AAdd( aDlg[ 5 ] , nX )
AAdd( aDlg[ 6 ] , nY )
AAdd( aDlg[ 7 ] , nW )
AAdd( aDlg[ 8 ] , nH )
AAdd( aDlg[ 9 ] , cnId )
AAdd( aDlg[ 10 ] , cnDlgClass )
AAdd( aDlg[ 11 ] , iif( HB_ISSTRING( cText ), cText, iif( HB_ISNUMERIC( cText ), cText, "" ) ) )
AAdd( aDlg[ 12 ] , 0 )
AAdd( aDlg[ 2 ], iif( HB_ISNUMERIC( nHelpId ), nHelpId, 0 ) )
AAdd( aDlg[ 3 ], iif( HB_ISNUMERIC( nExStyle ), nExStyle, 0 ) )
AAdd( aDlg[ 4 ], iif( HB_ISNUMERIC( nStyle ), nStyle, WS_CHILD + WS_VISIBLE ) )
AAdd( aDlg[ 5 ], nX )
AAdd( aDlg[ 6 ], nY )
AAdd( aDlg[ 7 ], nW )
AAdd( aDlg[ 8 ], nH )
AAdd( aDlg[ 9 ], cnId )
AAdd( aDlg[ 10 ], cnDlgClass )
AAdd( aDlg[ 11 ], iif( HB_ISSTRING( cText ), cText, iif( HB_ISNUMERIC( cText ), cText, "" ) ) )
AAdd( aDlg[ 12 ], 0 )
RETURN aDlg
@@ -438,9 +438,9 @@ FUNCTION Wvt_CreateDialog( acnDlg, lOnTop, cbDlgProc, ncIcon, nTimerTicks, hMenu
nDlgMode := iif( cType == "C", 0, iif( cType == "N", 1, 2 ) )
IF cType == "A"
xTemplate := Wvt__MakeDlgTemplate( acnDlg[ 1 ] , acnDlg[ 2 ] , acnDlg[ 3 ] , acnDlg[ 4 ] , ;
acnDlg[ 5 ] , acnDlg[ 6 ] , acnDlg[ 7 ] , acnDlg[ 8 ] , ;
acnDlg[ 9 ] , acnDlg[ 10 ] , acnDlg[ 11 ] , acnDlg[ 12 ] )
xTemplate := Wvt__MakeDlgTemplate( acnDlg[ 1 ], acnDlg[ 2 ], acnDlg[ 3 ], acnDlg[ 4 ], ;
acnDlg[ 5 ], acnDlg[ 6 ], acnDlg[ 7 ], acnDlg[ 8 ], ;
acnDlg[ 9 ], acnDlg[ 10 ], acnDlg[ 11 ], acnDlg[ 12 ] )
ELSE
xTemplate := acnDlg
ENDIF
@@ -481,9 +481,9 @@ FUNCTION Wvt_DialogBox( acnDlg, cbDlgProc, hWndParent )
nDlgMode := iif( cType == "C", 0, iif( cType == "N", 1, 2 ) )
IF cType == "A"
xTemplate := Wvt__MakeDlgTemplate( acnDlg[ 1 ] , acnDlg[ 2 ] , acnDlg[ 3 ] , acnDlg[ 4 ] , ;
acnDlg[ 5 ] , acnDlg[ 6 ] , acnDlg[ 7 ] , acnDlg[ 8 ] , ;
acnDlg[ 9 ] , acnDlg[ 10 ] , acnDlg[ 11 ] , acnDlg[ 12 ] )
xTemplate := Wvt__MakeDlgTemplate( acnDlg[ 1 ], acnDlg[ 2 ], acnDlg[ 3 ], acnDlg[ 4 ], ;
acnDlg[ 5 ], acnDlg[ 6 ], acnDlg[ 7 ], acnDlg[ 8 ], ;
acnDlg[ 9 ], acnDlg[ 10 ], acnDlg[ 11 ], acnDlg[ 12 ] )
ELSE
xTemplate := acnDlg
ENDIF
@@ -517,7 +517,7 @@ FUNCTION WVT_GetOpenFileName( hWnd, cPath, cTitle, acFilter, nFlags, cInitDir, c
HB_SYMBOL_UNUSED( hWnd )
__defaultNIL( @cPath , "" )
__defaultNIL( @cPath, "" )
__defaultNIL( @nFlags, OFN_EXPLORER + OFN_NOCHANGEDIR )
/* WIN_GETOPENFILENAME( [[@]<nFlags>], [<cTitle>], [<cInitDir>], [<cDefExt>],;

View File

@@ -245,7 +245,7 @@ METHOD WvgStatusBar:addItem( cCaption, xImage, cDLL, nStyle, cKey, nMode )
IF lSuccess
AAdd( ::aItems, oPanel )
ELSE
RETURN nil
RETURN NIL
ENDIF
RETURN oPanel

View File

@@ -250,7 +250,7 @@ METHOD WvgStatic:handleEvent( nMessage, aNM )
IF HB_ISBLOCK( ::sl_resize )
Eval( ::sl_resize, NIL, NIL, self )
ENDIF
AEval( ::aChildren, {|o| o:handleEvent( HB_GTE_RESIZED, { 0, 0, 0, 0, 0 } ) } )
AEval( ::aChildren, {| o | o:handleEvent( HB_GTE_RESIZED, { 0, 0, 0, 0, 0 } ) } )
RETURN EVENT_HANDELLED
CASE nMessage == HB_GTE_CTLCOLOR

View File

@@ -358,33 +358,33 @@ METHOD wndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgFontDialog
WVG_SetWindowText( ::hWnd, ::title )
ENDIF
IF ! ::buttonCancel
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,IDCANCEL ), .F. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd, IDCANCEL ), .F. )
ENDIF
IF ! ::buttonApply
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1026 ), .F. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd, 1026 ), .F. )
ENDIF
IF ! ::buttonHelp
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1038 ), .F. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd, 1038 ), .F. )
ENDIF
IF ! ::strikeOut
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1040 ), .F. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd, 1040 ), .F. )
ENDIF
IF ! ::underscore
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1041 ), .F. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd, 1041 ), .F. )
ENDIF
IF ! ::name
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1136 ), .F. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd, 1136 ), .F. )
ENDIF
IF ! ::style
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1137 ), .F. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd, 1137 ), .F. )
ENDIF
IF ! ::size
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1138 ), .F. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd, 1138 ), .F. )
ENDIF
IF ::aPos[ 1 ] > 0 .OR. ::aPos[ 2 ] > 0
aRect := WVG_GetWindowRect( ::hWnd )
WVG_MoveWindow( ::hWnd, ::aPos[ 1 ], ::aPos[ 2 ], aRect[3] - aRect[1], aRect[4] - aRect[2], .F. )
WVG_MoveWindow( ::hWnd, ::aPos[ 1 ], ::aPos[ 2 ], aRect[ 3 ] - aRect[ 1 ], aRect[ 4 ] - aRect[ 2 ], .F. )
ENDIF
RETURN 1
@@ -625,7 +625,7 @@ METHOD createFont() CLASS WvgFont
aFont := Wvg_FontCreate( ::aFontInfo )
IF Empty( aFont[ 1 ] )
RETURN nil
RETURN NIL
ENDIF
::hFont := aFont[ 15 ]

View File

@@ -32,7 +32,7 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
HB_SYMBOL_UNUSED( xParam )
HB_SYMBOL_UNUSED( oCom )
//--------------------------- Dialog -------------------------------\\
// --------------------------- Dialog -------------------------------\\
#if 1
oCrt := WvgDialog():new( , , { 30, 30 }, { 800, 600 }, , .T. )
oCrt:closable := .T.
@@ -47,13 +47,13 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
oDA := oCrt:drawingArea
//--------------------------- Menu --------------------------------\\
// --------------------------- Menu --------------------------------\\
ActiveXBuildMenu( oCrt, @oStatic, @oStatic2 )
//--------------------------- ToolBar -----------------------------\\
// --------------------------- ToolBar -----------------------------\\
oTBar := BuildWvgToolBar( oDA, nActiveX )
//--------------------------- StatusBar ---------------------------\\
// --------------------------- StatusBar ---------------------------\\
oSBar := WvgStatusBar():new( oDA ):create( , , , , , .T. )
oSBar:panelClick := {| oPanel | WVG_MessageBox( , oPanel:caption ) }
oPanel := oSBar:getItem( 1 )
@@ -63,17 +63,17 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
oPanel2 := oSBar:addItem()
oPanel2:caption := 'Click on any part!'
//--------------------------- Static ------------------------------\\
// --------------------------- Static ------------------------------\\
oStatic := WvgStatic():new( oDA )
oStatic:type := WVGSTATIC_TYPE_TEXT
oStatic:options := WVGSTATIC_TEXT_CENTER
oStatic:caption := Chr( 13 ) + 'Implemented Xbase++ Parts'
oStatic:create( , , { 0, oTBar:currentSize()[2] + 3 }, { 120, oCrt:currentSize()[2] - ;
oTBar:currentSize()[2] - oSBar:currentSize()[2] - 4 }, , .T. )
oStatic:setColorBG( RGB( 198,198,198 ) )
oStatic:create( , , { 0, oTBar:currentSize()[ 2 ] + 3 }, { 120, oCrt:currentSize()[ 2 ] - ;
oTBar:currentSize()[ 2 ] - oSBar:currentSize()[ 2 ] - 4 }, , .T. )
oStatic:setColorBG( RGB( 198, 198, 198 ) )
#if 0 // panel
//--------------------------- Static + Radio + Checkbox ----------\\
// --------------------------- Static + Radio + Checkbox ----------\\
oStatic2 := WvgStatic():New( oCrt, , { 150, 150 }, { 500, 310 }, , .F. )
// oStatic2:type := WVGSTATIC_TYPE_RAISEDBOX //BGNDFRAME
oStatic2:exStyle += WS_EX_WINDOWEDGE
@@ -99,21 +99,21 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
oCheck := WvgCheckBox():New( oStatic2, , { 10, 70 }, { 100, 15 }, , .T. )
oCheck:caption := 'Checkbox A'
oCheck:create()
oCheck:selected := {| m1, m2, o | m1 := m1, m2 := m2, WVG_MessageBox( , iif( o:getData(), 'I am selected','I am not selected' ) ) }
oCheck:selected := {| m1, m2, o | m1 := m1, m2 := m2, WVG_MessageBox( , iif( o:getData(), 'I am selected', 'I am not selected' ) ) }
// Create first 3State button, passing the position to :create()
oXbp := Wvg3State():new( oStatic2 )
oXbp:caption := "3 State A"
oXbp:create( , , { 10, 100 }, { 100, 15 } )
// Determine current state using mp1
oXbp:selected := {| m1, m2, oBtn | m2 := m2, oBtn := oBtn, oPanel1:caption := "3State A [" + aState[ m1+1 ] + "]" }
oXbp:selected := {| m1, m2, oBtn | m2 := m2, oBtn := oBtn, oPanel1:caption := "3State A [" + aState[ m1 + 1 ] + "]" }
// Create second 3State Button, passing the position to :new()
oXbp := Wvg3State():new( oStatic2, , { 10, 125 }, { 100, 15 } )
oXbp:caption := "3 State B"
oXbp:create( oStatic2 )
// Determine current state using :getData()
oXbp:selected := {| m1, m2, oBtn | m1 := m1, m2 := m2, WVG_MessageBox( , "3State B", aState[ oBtn:getData()+1 ] ) }
oXbp:selected := {| m1, m2, oBtn | m1 := m1, m2 := m2, WVG_MessageBox( , "3State B", aState[ oBtn:getData() + 1 ] ) }
// Create first SLE, specify position using :create()
// On :typeOut set the focus to the second SLE
@@ -132,7 +132,7 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
oXbp:tabStop := .T.
oXbp:bufferLength := 15
oXbp:dataLink := {| x | iif( x == NIL, cVarB, cVarB := x ) }
oXbp:create( )
oXbp:create()
oXbp:setData()
oXbp:killInputFocus := {| x, y, oSLE | x := x, y := y, oSLE:getData(), oPanel:caption := "cVarB =" + cVarB }
@@ -149,11 +149,11 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
oMLE:setData()
#endif
//--------------------------- ListBox -----------------------------\\
// --------------------------- ListBox -----------------------------\\
oListBox := WvgListBox():new()
oListBox:create( oStatic, , { 5, 55 }, { 107, 380 } )
oListBox:setColorFG( RGB( 218,61,34 ) )
oListBox:setColorFG( RGB( 218, 61, 34 ) )
AAdd( aParts, 'XbpDialog' )
AAdd( aParts, 'XbpMenuBar' )
@@ -175,22 +175,22 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
oListBox:itemSelected := {|| WVG_MessageBox( , oListBox:getCurItem() ) }
oListBox:setData( 3 )
//--------------------------- PushButton --------------------------\\
// --------------------------- PushButton --------------------------\\
oXbp := WvgPushButton():new( oStatic )
oXbp:caption := "Hide"
oXbp:create( , , { 20, 440 }, { 80, 30 } )
oXbp:activate := {|| oStatic:hide(), oCrt:sendMessage( WM_SIZE, 0, 0 ) }
//--------------------------- TreeView ---------------------------\\
oTree := WvgTreeView():new( oDA, , { oCrt:currentSize()[1] - 160, oTBar:currentSize()[2] + 3 }, ;
{ 160, oCrt:currentSize()[2] - ;
oTBar:currentSize()[2] - oSBar:currentSize()[2] - 4 }, , .T. )
// --------------------------- TreeView ---------------------------\\
oTree := WvgTreeView():new( oDA, , { oCrt:currentSize()[ 1 ] - 160, oTBar:currentSize()[ 2 ] + 3 }, ;
{ 160, oCrt:currentSize()[ 2 ] - ;
oTBar:currentSize()[ 2 ] - oSBar:currentSize()[ 2 ] - 4 }, , .T. )
oTree:hasLines := .T.
oTree:hasButtons := .T.
oTree:alwaysShowSelection := .T.
oTree:create()
oTree:setColorBG( RGB( 120,15,240 ) )
oTree:setColorFG( RGB( 15,240,120 ) )
oTree:setColorBG( RGB( 120, 15, 240 ) )
oTree:setColorFG( RGB( 15, 240, 120 ) )
oTree:itemSelected := {| oItem | iif( oItem != NIL, WVG_MessageBox( , oItem:caption ), NIL ) }
oItem1 := oTree:rootItem:addItem( "First level A" )
@@ -212,16 +212,16 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
oTree:setData( oItem2 )
//--------------------------- Misc Config ------------------------\\
oTBar:buttonClick := {| oBtn | iif( oBtn:caption == 'Hide' , oStatic:hide(), NIL ), ;
iif( oBtn:caption == 'Show' , oStatic:show(), NIL ), ;
// --------------------------- Misc Config ------------------------\\
oTBar:buttonClick := {| oBtn | iif( oBtn:caption == 'Hide', oStatic:hide(), NIL ), ;
iif( oBtn:caption == 'Show', oStatic:show(), NIL ), ;
iif( oBtn:caption == 'Tools', oStatic2:show():toFront(), NIL ), ;
iif( oBtn:caption $ 'Hide,Show', oCrt:sendMessage( WM_SIZE, 0, 0 ), NIL ), ;
oPanel2:caption := "Button [ " + oBtn:caption + " ] clicked!" }
oDA:resize := {|| ResizeDialog( oCrt, oTBar, oSBar, oStatic, oCom, oTree ) }
#if 1
//--------------------------- Active-X ---------------------------\\
// --------------------------- Active-X ---------------------------\\
oCom := BuildActiveXControl( nActiveX, oDA )
IF HB_ISOBJECT( oCom )
oCrt:sendMessage( WM_SIZE, 0, 0 )
@@ -257,16 +257,16 @@ STATIC FUNCTION ResizeDialog( oCrt, oTBar, oSBar, oStatic, oCom, oTree )
// aTree := oTree:currentSize()
// aCom := oCom:currentSize()
nT := aTBar[2]
nH := aCrt[2] - aTBar[2] - aSBar[2]
nT := aTBar[ 2 ]
nH := aCrt[ 2 ] - aTBar[ 2 ] - aSBar[ 2 ]
IF oStatic:isVisible
oStatic:setPosAndSize( { 0, nT + 3 }, { 120, nH - 4 }, .T. )
oCom:setPosAndSize( { 120, nT }, { aCrt[1] - 120 - 150, nH }, .T. )
oTree:setPosAndSize( { aCrt[1] - 150, nT }, { 150, nH }, .T. )
oCom:setPosAndSize( { 120, nT }, { aCrt[ 1 ] - 120 - 150, nH }, .T. )
oTree:setPosAndSize( { aCrt[ 1 ] - 150, nT }, { 150, nH }, .T. )
ELSE
oCom:setPosAndSize( { 0, nT }, { aCrt[1] - 150, nH }, .T. )
oTree:setPosAndSize( { aCrt[1] - 150, nT }, { 150, nH }, .T. )
oCom:setPosAndSize( { 0, nT }, { aCrt[ 1 ] - 150, nH }, .T. )
oTree:setPosAndSize( { aCrt[ 1 ] - 150, nT }, { 150, nH }, .T. )
ENDIF
RETURN 1
@@ -343,16 +343,16 @@ STATIC FUNCTION BuildActiveXControl( nActiveX, oDA )
oCom:CLSID := 'AnalogClockControl.AnalogClock'
oCom:Id := 5
oCom:mapEvent( evDblClk, {|| oCom:Value := Seconds()/86400 , ;
oCom:mapEvent( evDblClk, {|| oCom:Value := Seconds() / 86400, ;
oCom:BackColor := RGB( 0, 140, 210 ), ;
oCom:Refresh() , ;
oCom:ShowSecondsHand := .T. , ;
oCom:Hands3D := .T. , ;
oCom:Refresh() , ;
oCom:showAboutBox() ;
oCom:Refresh(), ;
oCom:ShowSecondsHand := .T., ;
oCom:Hands3D := .T., ;
oCom:Refresh(), ;
oCom:showAboutBox() ;
} )
oCom:mapEvent( evBtnUp, {| nBtn | iif( nBtn == 2, oCom:oParent:sendMessage( WM_CLOSE,0,0 ), NIL ) } )
oCom:mapEvent( evBtnUp, {| nBtn | iif( nBtn == 2, oCom:oParent:sendMessage( WM_CLOSE, 0, 0 ), NIL ) } )
CASE nActiveX == 3
hb_gtInfo( HB_GTI_WINTITLE, 'file://' + hb_DirBase() + 'myharu.pdf' )
@@ -399,13 +399,13 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam )
ELSEIF nActiveX == 5
oCom:loadMultiPage( hb_DirBase() + 'myharu.pdf', 2 )
oCom:addGradientBorder( 10, RGB( 12,20,233 ), RGB( 100,255,20 ), 0 )
oCom:addGradientBorder( 10, RGB( 12, 20, 233 ), RGB( 100, 255, 20 ), 0 )
oCom:drawText( 10, 10, 'Vouch' )
//oCom:emboss( 3,0 )
// oCom:emboss( 3,0 )
oCom:copy2ClipBoard()
oCom:view := 11
oCom:setBackGroundColor( rgb( 225,225,225 ) )
//oCom:rotate90()
oCom:setBackGroundColor( rgb( 225, 225, 225 ) )
// oCom:rotate90()
ENDIF
@@ -413,7 +413,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam )
nKey := Inkey()
IF nActiveX == 2
oCom:Value := Seconds()/86400
oCom:Value := Seconds() / 86400
ENDIF
IF nKey == K_F12
@@ -421,7 +421,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam )
oCom:Navigate( 'www.vouch.info' )
ELSEIF nActiveX == 11
//oCom:document( 0 ):InnerHTML := "<html><h1>Stream Test</h1><p>This HTML content in a document.</html>"
// oCom:document( 0 ):InnerHTML := "<html><h1>Stream Test</h1><p>This HTML content in a document.</html>"
ELSEIF nActiveX == 4
oCom:RMCBackColor := 23456142
@@ -445,7 +445,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam )
DO CASE
CASE s_nTurn == 1
hb_gtInfo( HB_GTI_WINTITLE, 'RMChart [ Next:F11 ] ' + 'Stacked Bars' )
//SetMode( 30,100 )
// SetMode( 30,100 )
sData += "00003600|00004450|000051|000061|000073|00008-6972|00009412|00011Tahoma|100011|10"
sData += "0035|1000410|10005-5|10006-5|1000911|100101|100111|100181|100200|1002150000|1002"
@@ -466,7 +466,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam )
CASE s_nTurn == 2
hb_gtInfo( HB_GTI_WINTITLE, 'RMChart [ Next:F11 ] ' + 'Floating Bars' )
//SetMode( 20,90 )
// SetMode( 20,90 )
sData += "00003550|00004300|000051|000073|00008-2894893|00009412|00011Tahoma|100011|100035"
sData += "|100045|10005-5|10006-5|1000911|100101|100111|100131|100181|100201|1002113|10022"
@@ -481,7 +481,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam )
CASE s_nTurn == 3
hb_gtInfo( HB_GTI_WINTITLE, 'RMChart [ Next:F11 ] ' + 'Four Regions' )
//SetMode( 40,120 )
// SetMode( 40,120 )
sData += "00003700|00004500|000054|000061|000071|00008-984833|00009412|00011Tahoma|100011|"
sData += "100032|100042|10005348|10006248|1000910|100101|100111|100181|100200|10021100|100"
@@ -514,7 +514,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam )
CASE s_nTurn == 4
hb_gtInfo( HB_GTI_WINTITLE, 'RMChart [ Next:F11 ] ' + '10 Biggest Companies' )
//SetMode( 25,90 )
// SetMode( 25,90 )
sData += "00003670|00004450|000051|000061|000071|00008-10185235|00009412|00011Tahoma|10001"
sData += "1|100035|1000410|10005-5|10006-5|1000912|100101|100111|100131|100181|10020100000"
@@ -532,7 +532,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam )
CASE s_nTurn == 5
hb_gtInfo( HB_GTI_WINTITLE, 'RMChart [ Next:F11 ] ' + 'Grouped Bars' )
//SetMode( 25,80 )
// SetMode( 25,80 )
sData += "00003600|00004450|000051|000061|000075|00008-2|00009412|00010paper.jpg|00011Taho"
sData += "ma|100011|100035|100045|10005-5|10006-5|1000910|100101|100111|100181|100200|1002"
@@ -545,7 +545,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam )
CASE s_nTurn == 6
hb_gtInfo( HB_GTI_WINTITLE, 'RMChart [ Next:F11 ] ' + 'Flow Chart' )
//SetMode( 30,50 )
// SetMode( 30,50 )
sData += "00003305|00004400|000051|00008-984833|00009412|00011Tahoma|100011|100035|100045|"
sData += "10005-5|10006-5|10180\7C|010011|010051|010072|010081|0101050|0101125|01012100|01"
@@ -659,10 +659,10 @@ STATIC FUNCTION MyFunction( nMode )
WVG_MessageBox( , "Button clicked!" )
CASE nMode == 101 // Charge
Eval( {|| Tone( 523,2 ), Tone( 698,2 ), Tone( 880,2 ), Tone( 1046,4 ), Tone( 880,2 ), Tone( 1046,8 ) } )
Eval( {|| Tone( 523, 2 ), Tone( 698, 2 ), Tone( 880, 2 ), Tone( 1046, 4 ), Tone( 880, 2 ), Tone( 1046, 8 ) } )
CASE nMode == 102 // NannyBoo
AEval( { { 196,2 }, { 196,2 }, { 164,2 }, { 220,2 }, { 196,4 }, { 164,4 } }, {| a | Tone( a[ 1 ], a[ 2 ] ) } )
AEval( { { 196, 2 }, { 196, 2 }, { 164, 2 }, { 220, 2 }, { 196, 4 }, { 164, 4 } }, {| a | Tone( a[ 1 ], a[ 2 ] ) } )
CASE nMode == 103 // BADKEY
Tone( 480, 0.25 )

View File

@@ -23,10 +23,10 @@
PROCEDURE ExecGCUI()
IF hb_mtvm()
hb_threadStart( {| oCrt | oCrt := WvgCrt():New( , , { 2,4 }, { 20,81 }, , .T. ) , ;
hb_threadStart( {| oCrt | oCrt := WvgCrt():New( , , { 2, 4 }, { 20, 81 }, , .T. ), ;
oCrt:icon := GetResource( "dia_excl.ico" ), ;
oCrt:create(), ;
GCUIConsole( oCrt ) , ;
GCUIConsole( oCrt ), ;
oCrt:destroy() } )
ENDIF
@@ -39,7 +39,7 @@ PROCEDURE ExecGCUI()
PROCEDURE GCUIConsole( oCrt )
LOCAL dDate := Date()
LOCAL cName := PadR( 'Some Usefule Name' , 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 )
@@ -63,22 +63,22 @@ PROCEDURE GCUIConsole( oCrt )
@ 3, nColGet GET dDate ;
WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 1 ) ) } ;
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,0,0 ) ), .T. }
VALID {|| Wvg_SetGObjData( hTxt, 6, RGB( 255, 0, 0 ) ), .T. }
@ 6, nColGet GET cName ;
WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 2 ) ) } ;
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,255,0 ) ), ;
VALID {|| Wvg_SetGObjData( hTxt, 6, RGB( 255, 255, 0 ) ), ;
Wvg_SetGObjState( hBoxR, 3 ), .T. }
@ 9, nColGet GET cAdd1 ;
WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 3 ) ) } ;
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,0,255 ) ), .T. }
VALID {|| Wvg_SetGObjData( hTxt, 6, RGB( 255, 0, 255 ) ), .T. }
@ 11, nColGet GET cAdd2 ;
WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 4 ) ) } ;
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,255,255 ) ), ;
VALID {|| Wvg_SetGObjData( hTxt, 6, RGB( 255, 255, 255 ) ), ;
Wvg_SetGObjState( hBoxR, 1 ), .T. }
@ 13, nColGet GET cAdd3 ;
WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 198,21,140 ) ), .T. }
WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 198, 21, 140 ) ), .T. }
@ 16, nColGet GET nSlry PICTURE "@Z 9999999.99" ;
WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 0,0,0 ) ), .T. }
WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 0, 0, 0 ) ), .T. }
// The only additional calls to render your console GUI
//

View File

@@ -68,6 +68,7 @@ STATIC s_paint_ := { { "", {} } }
//
EXIT PROCEDURE CleanHandles()
LOCAL obj
FOR EACH obj IN SetFonts()
@@ -144,15 +145,15 @@ PROCEDURE Main()
AAdd( aBlocks, {|| Wvt_SetIcon( GetResource( "vr_1.ico" ) ) } )
AAdd( aBlocks, {|| Wvt_SetTitle( "Vouch" ) } )
AAdd( aBlocks, {|| Wvt_DrawLabel( 1,40, cLabel,6,, rgb(255,255,255 ), rgb(198,198,198 ), "Arial", 26, , , , , .T., .T. ) } )
AAdd( aBlocks, {|| Wvt_DrawLabel( 1, 40, cLabel, 6,, rgb( 255, 255, 255 ), rgb( 198, 198, 198 ), "Arial", 26, , , , , .T., .T. ) } )
AAdd( aBlocks, {|| Wvt_DrawBoxRaised( nTop, nLft, nBtm, nRgt ) } )
AAdd( aBlocks, {|| Wvt_DrawBoxRecessed( 7, 61, 13, 70 ) } )
AAdd( aBlocks, {|| Wvt_DrawBoxGroup( 15, 59, 18, 72 ) } )
AAdd( aBlocks, {|| Wvt_DrawBoxGroup( 5, 6, 19, 44 ) } )
AAdd( aBlocks, {|| Wvt_DrawImage( 8,62,12,69, IMAGE_VOUCH ) } )
AAdd( aBlocks, {|| Wvt_DrawImage( 8, 62, 12, 69, IMAGE_VOUCH ) } )
AAdd( aBlocks, {|| Wvt_DrawBoxRecessed( 7, 48, 13, 55 ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( MaxRow() - 2,0,MaxRow() - 2,MaxCol(),WVT_LINE_HORZ,WVT_LINE_RECESSED,WVT_LINE_BOTTOM ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( MaxRow() - 1,41,MaxRow(),41,WVT_LINE_VERT,WVT_LINE_RECESSED,WVT_LINE_CENTER ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( MaxRow() - 2, 0, MaxRow() - 2, MaxCol(), WVT_LINE_HORZ, WVT_LINE_RECESSED, WVT_LINE_BOTTOM ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( MaxRow() - 1, 41, MaxRow(), 41, WVT_LINE_VERT, WVT_LINE_RECESSED, WVT_LINE_CENTER ) } )
AAdd( aBlocks, {|| AEval( GetList, {| oGet | Wvt_DrawBoxGet( oGet:Row, oGet:Col, Len( Transform( oGet:VarGet(), oGet:Picture ) ) ) } ) } )
AAdd( aBlocks, {|| Wvt_Mouse( -1000001 ) } )
@@ -218,9 +219,9 @@ PROCEDURE WvtConsoleGets( nMode )
hb_default( @nMode, 0 )
IF hb_mtvm()
hb_threadStart( {| oCrt | hb_gtReload( 'WVT' ) , ;
hb_threadStart( {| oCrt | hb_gtReload( 'WVT' ), ;
oCrt := hb_gtSelect(), ;
iif( nMode == 0, WvtNextGetsConsole(), GoogleMap() ) , ;
iif( nMode == 0, WvtNextGetsConsole(), GoogleMap() ), ;
oCrt := NIL } )
ENDIF
@@ -267,7 +268,7 @@ PROCEDURE WvtNextGetsConsole()
PROCEDURE WvtNextGets()
IF hb_mtvm()
hb_threadStart( {|| hb_gtReload( 'WVG' ), Wvt_setFont( 'Terminal',20 ), ;
hb_threadStart( {|| hb_gtReload( 'WVG' ), Wvt_setFont( 'Terminal', 20 ), ;
hb_clear(), Wvt_ShowWindow( SW_RESTORE ), WvtNextGets_X() } )
ELSE
WvtNextGets_X()
@@ -307,21 +308,21 @@ PROCEDURE WvtNextGets_X()
Wvt_SetPalette( aNewPalette )
AAdd( aBlocks, {|| Wvt_SetTitle( "Wvt Gets 2nd Window with Different Palette" ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( MaxRow() - 1,0,MaxRow() - 1,MaxCol() ) } )
AAdd( aBlocks, {|| Wvt_SetBrush( 0, rgb( 32,255,100 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawEllipse( 6,50,10,58 ) } )
AAdd( aBlocks, {|| Wvt_SetBrush( 2, rgb( 255,255,100 ),1 ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( MaxRow() - 1, 0, MaxRow() - 1, MaxCol() ) } )
AAdd( aBlocks, {|| Wvt_SetBrush( 0, rgb( 32, 255, 100 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawEllipse( 6, 50, 10, 58 ) } )
AAdd( aBlocks, {|| Wvt_SetBrush( 2, rgb( 255, 255, 100 ), 1 ) } )
AAdd( aBlocks, {|| Wvt_DrawRectangle( 11, 50, 13, 58 ) } )
AAdd( aBlocks, {|| Wvt_DrawBoxGroupRaised( 5, 6, 19, 72 ) } )
AAdd( aBlocks, {|| AEval( GetList, {| oGet | Wvt_DrawBoxGet( oGet:Row, oGet:Col, Len( Transform( oGet:VarGet(), oGet:Picture ) ) ) } ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 21, 6,22, 9,"New" ,"vouch1.bmp" ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 21,11,22,14,"Browse","vouch1.bmp", 1, rgb( 255,255,255 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 21,16,22,19, ,"vouch1.bmp" ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 21,21,22,24,"Data",, 0, rgb( 100,22,241 ), rgb( 198,198,198 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 21,26,22,29,"Flat",IMAGE_VR,2 ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 21,31,22,34,"Outline",IMAGE_VR,3 ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 22,36,22,41,"Data",, 0, rgb( 100,22,241 ), rgb( 198,198,198 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 21, 6, 22, 9, "New","vouch1.bmp" ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 21, 11, 22, 14, "Browse", "vouch1.bmp", 1, rgb( 255, 255, 255 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 21, 16, 22, 19, , "vouch1.bmp" ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 21, 21, 22, 24, "Data",, 0, rgb( 100, 22, 241 ), rgb( 198, 198, 198 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 21, 26, 22, 29, "Flat", IMAGE_VR, 2 ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 21, 31, 22, 34, "Outline", IMAGE_VR, 3 ) } )
AAdd( aBlocks, {|| Wvt_DrawButton( 22, 36, 22, 41, "Data",, 0, rgb( 100, 22, 241 ), rgb( 198, 198, 198 ) ) } )
aLastPaint := WvtSetBlocks( aBlocks )
@@ -416,10 +417,10 @@ FUNCTION WvtLines()
CLS
AAdd( aBlocks, {|| Wvt_DrawLine( 0, 0, 0, nCols, WVT_LINE_HORZ, WVT_LINE_RAISED , WVT_LINE_CENTER ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 0, 0, 0, nCols, WVT_LINE_HORZ, WVT_LINE_RAISED, WVT_LINE_CENTER ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 1, 0, 1, nCols, WVT_LINE_HORZ, WVT_LINE_RECESSED, WVT_LINE_TOP ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 2, 0, 2, nCols, WVT_LINE_HORZ, WVT_LINE_PLAIN , WVT_LINE_CENTER, WVT_LINE_SOLID, 4, Rgb( 255,255,255 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 3, 0, 3, nCols, WVT_LINE_HORZ, WVT_LINE_RAISED , WVT_LINE_CENTER, WVT_LINE_DASH , 0, Rgb( 255,0,0 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 2, 0, 2, nCols, WVT_LINE_HORZ, WVT_LINE_PLAIN, WVT_LINE_CENTER, WVT_LINE_SOLID, 4, Rgb( 255, 255, 255 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 3, 0, 3, nCols, WVT_LINE_HORZ, WVT_LINE_RAISED, WVT_LINE_CENTER, WVT_LINE_DASH, 0, Rgb( 255, 0, 0 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 4, 0, 4, nCols, WVT_LINE_HORZ, WVT_LINE_RECESSED, WVT_LINE_BOTTOM ) } )
@ 0, 1 SAY "Center Raised"
@@ -431,14 +432,14 @@ FUNCTION WvtLines()
@ nRows, 0 SAY PadC( "Press ESC to Quit", nCols + 1 ) COLOR "GR+/W"
AAdd( aBlocks, {|| Wvt_DrawLine( 11, 5,nRows - 2, 5, WVT_LINE_VERT, WVT_LINE_RAISED , WVT_LINE_CENTER ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11, 6,nRows - 2, 6, WVT_LINE_VERT, WVT_LINE_RECESSED, WVT_LINE_CENTER ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11, 7,nRows - 2, 7, WVT_LINE_VERT, WVT_LINE_PLAIN , WVT_LINE_LEFT ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11, 8,nRows - 2, 8, WVT_LINE_VERT, WVT_LINE_PLAIN , WVT_LINE_CENTER ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11, 9,nRows - 2, 9, WVT_LINE_VERT, WVT_LINE_PLAIN , WVT_LINE_RIGHT ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11,10,nRows - 2,10, WVT_LINE_VERT, WVT_LINE_PLAIN , WVT_LINE_CENTER, WVT_LINE_DOT, 0, RGB( 0,0,255 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11,11,nRows - 2,11, WVT_LINE_VERT, WVT_LINE_PLAIN , WVT_LINE_CENTER, WVT_LINE_DASH, 0, RGB( 255,0,0 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11,12,nRows - 2,12, WVT_LINE_VERT, WVT_LINE_PLAIN , WVT_LINE_CENTER, WVT_LINE_DASHDOT, 0, RGB( 0,255,0 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11, 5, nRows - 2, 5, WVT_LINE_VERT, WVT_LINE_RAISED, WVT_LINE_CENTER ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11, 6, nRows - 2, 6, WVT_LINE_VERT, WVT_LINE_RECESSED, WVT_LINE_CENTER ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11, 7, nRows - 2, 7, WVT_LINE_VERT, WVT_LINE_PLAIN, WVT_LINE_LEFT ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11, 8, nRows - 2, 8, WVT_LINE_VERT, WVT_LINE_PLAIN, WVT_LINE_CENTER ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11, 9, nRows - 2, 9, WVT_LINE_VERT, WVT_LINE_PLAIN, WVT_LINE_RIGHT ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11, 10, nRows - 2, 10, WVT_LINE_VERT, WVT_LINE_PLAIN, WVT_LINE_CENTER, WVT_LINE_DOT, 0, RGB( 0, 0, 255 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11, 11, nRows - 2, 11, WVT_LINE_VERT, WVT_LINE_PLAIN, WVT_LINE_CENTER, WVT_LINE_DASH, 0, RGB( 255, 0, 0 ) ) } )
AAdd( aBlocks, {|| Wvt_DrawLine( 11, 12, nRows - 2, 12, WVT_LINE_VERT, WVT_LINE_PLAIN, WVT_LINE_CENTER, WVT_LINE_DASHDOT, 0, RGB( 0, 255, 0 ) ) } )
WvtSetBlocks( aBlocks )

View File

@@ -209,7 +209,7 @@ FUNCTION DoModalDialog()
oCrt:Create()
oCrt:show()
AAdd( aPaint, { "Box_V" , {|| Wvt_DrawBoxRaised( 1, 2, 11, 47 ) }, NIL, { WVT_BLOCK_BOX, 0, 0, MaxRow(), MaxCol() } } )
AAdd( aPaint, { "Box_V", {|| Wvt_DrawBoxRaised( 1, 2, 11, 47 ) }, NIL, { WVT_BLOCK_BOX, 0, 0, MaxRow(), MaxCol() } } )
WvtSetPaint( aPaint )
SetColor( 'N/W' )

View File

@@ -35,7 +35,7 @@ PROCEDURE Main()
LOCAL aState := { "not selected", "selected", "undefined" }
LOCAL aParts := {}
//--------------------------- Dialog -------------------------------\\
// --------------------------- Dialog -------------------------------\\
oCrt := WvgDialog():new( , , { 30, 30 }, { 900, 600 }, , .T. )
oCrt:closable := .T.
oCrt:icon := "vr_1.ico"
@@ -45,13 +45,13 @@ PROCEDURE Main()
oDA := oCrt:drawingArea
//--------------------------- Menu --------------------------------\\
// --------------------------- Menu --------------------------------\\
ActiveXBuildMenuXbp( oCrt, @oStatic, @oStatic2 )
//--------------------------- ToolBar -----------------------------\\
// --------------------------- ToolBar -----------------------------\\
oTBar := ActiveXBuildToolBarXbp( oDA )
//--------------------------- StatusBar ---------------------------\\
// --------------------------- StatusBar ---------------------------\\
oSBar := WvgStatusBar():new( oCrt ):create( , , , , , .T. )
oSBar:panelClick := {| oPanel | WVG_MessageBox( , oPanel:caption ) }
oPanel := oSBar:getItem( 1 )
@@ -61,21 +61,21 @@ PROCEDURE Main()
oPanel2 := oSBar:addItem()
oPanel2:caption := 'Click on any part!'
//--------------------------- Static ------------------------------\\
// --------------------------- Static ------------------------------\\
oStatic := WvgStatic():new( oDA )
oStatic:type := WVGSTATIC_TYPE_TEXT
oStatic:options := WVGSTATIC_TEXT_CENTER
oStatic:caption := Chr( 13 ) + 'Implemented Xbase++ Parts'
oStatic:create( , , { 0, oTBar:currentSize()[2] + 3 }, { 120, oCrt:currentSize()[2] - ;
oTBar:currentSize()[2] - oSBar:currentSize()[2] - 4 }, , .T. )
oStatic:setColorBG( RGB( 200,200,200 ) )
oStatic:create( , , { 0, oTBar:currentSize()[ 2 ] + 3 }, { 120, oCrt:currentSize()[ 2 ] - ;
oTBar:currentSize()[ 2 ] - oSBar:currentSize()[ 2 ] - 4 }, , .T. )
oStatic:setColorBG( RGB( 200, 200, 200 ) )
//--------------------------- ListBox -----------------------------\\
// --------------------------- ListBox -----------------------------\\
oListBox := WvgListBox():new()
oListBox:create( oStatic, , { 5, 55 }, { 107, 380 } )
oListBox:setColorFG( RGB( 218,61,34 ) )
oListBox:setColorFG( RGB( 218, 61, 34 ) )
// oListBox:setColorBG( RGB( 250,244,182 ) )
AAdd( aParts, 'XbpDialog' )
@@ -105,23 +105,23 @@ PROCEDURE Main()
oListBox:itemSelected := {|| WVG_MessageBox( , oListBox:getCurItem() ) }
oListBox:setData( 3 ) // show selected 'XbpToolBar'
//--------------------------- PushButton --------------------------\\
// --------------------------- PushButton --------------------------\\
oXbp := WvgPushButton():new( oStatic )
oXbp:caption := "Hide"
oXbp:create( , , { 20, 440 }, { 80, 30 } )
oXbp:activate := {|| oStatic:hide(), oCrt:sendMessage( WM_SIZE, 0, 0 ) }
//--------------------------- TreeView ---------------------------\\
// --------------------------- TreeView ---------------------------\\
oTree := WvgTreeView():new( oDA, , { oCrt:currentSize()[1] - 160, oTBar:currentSize()[2] + 3 }, ;
{ 160, oCrt:currentSize()[2] - ;
oTBar:currentSize()[2] - oSBar:currentSize()[2] - 4 }, , .T. )
oTree := WvgTreeView():new( oDA, , { oCrt:currentSize()[ 1 ] - 160, oTBar:currentSize()[ 2 ] + 3 }, ;
{ 160, oCrt:currentSize()[ 2 ] - ;
oTBar:currentSize()[ 2 ] - oSBar:currentSize()[ 2 ] - 4 }, , .T. )
oTree:hasLines := .T.
oTree:hasButtons := .T.
oTree:alwaysShowSelection := .T.
oTree:create()
oTree:setColorBG( RGB( 120,15,240 ) )
oTree:setColorFG( RGB( 15,240,120 ) )
oTree:setColorBG( RGB( 120, 15, 240 ) )
oTree:setColorFG( RGB( 15, 240, 120 ) )
oTree:itemSelected := {| oItem | iif( oItem != NIL, WVG_MessageBox( , oItem:caption ), NIL ) }
oItem1 := oTree:rootItem:addItem( "First level A" )
@@ -143,7 +143,7 @@ PROCEDURE Main()
oTree:setData( oItem2 )
//--------------------------- Active-X ---------------------------\\
// --------------------------- Active-X ---------------------------\\
hb_gtInfo( HB_GTI_WINTITLE, 'http://www.harbour.vouch.info' )
#if 0
oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .T. )
@@ -162,19 +162,19 @@ PROCEDURE Main()
oAddr:border := .T.
cNavigate := 'http://www.harbour.vouch.info'
oAddr:dataLink := {| x | iif( x == NIL, cNavigate, cNavigate := x ) }
oAddr:setColorFG( RGB( 0,0,255 ) )
oAddr:setColorBG( RGB( 0,255,255 ) )
oAddr:create( oDA, , { 120, oTBar:currentSize()[2] }, { 500, 20 }, , .T. )
oAddr:setColorFG( RGB( 0, 0, 255 ) )
oAddr:setColorBG( RGB( 0, 255, 255 ) )
oAddr:create( oDA, , { 120, oTBar:currentSize()[ 2 ] }, { 500, 20 }, , .T. )
oAddr:setData()
oAddr:killInputFocus := {| m1, m2, oS | m1 := m1, m2 := m2, oS:getData(), oCom:navigate( cNavigate ) }
//----------------- Panel : Static + Radio + Checkbox ----------\\
// ----------------- Panel : Static + Radio + Checkbox ----------\\
oStatic2 := WvgStatic():New( oDA, , { 150, 150 }, { 500, 310 }, , .F. )
// oStatic2:type := WVGSTATIC_TYPE_RAISEDBOX //BGNDFRAME
// oStatic2:type := WVGSTATIC_TYPE_RAISEDBOX //BGNDFRAME
oStatic2:exStyle += WS_EX_WINDOWEDGE
// oStatic2:options := WVGSTATIC_FRAMETHICK
// oStatic2:options := WVGSTATIC_FRAMETHICK
oStatic2:create()
oStatic2:setColorBG( RGB( 175,175,175 ) )
oStatic2:setColorBG( RGB( 175, 175, 175 ) )
oXbp := WvgPushButton():new( oStatic2 )
oXbp:caption := "Hide"
@@ -195,21 +195,21 @@ PROCEDURE Main()
oCheck := WvgCheckBox():New( oStatic2, , { 10, 70 }, { 100, 15 }, , .T. )
oCheck:caption := 'Checkbox A'
oCheck:create()
oCheck:selected := {| m1, m2, o | m1 := m1, m2 := m2, WVG_MessageBox( , iif( o:getData(), 'I am selected','I am not selected' ) ) }
oCheck:selected := {| m1, m2, o | m1 := m1, m2 := m2, WVG_MessageBox( , iif( o:getData(), 'I am selected', 'I am not selected' ) ) }
// Create first 3State button, passing the position to :create()
oXbp := Wvg3State():new()
oXbp:caption := "3 State A"
oXbp:create( oStatic2, , { 10, 100 }, { 100, 15 } )
// Determine current state using mp1
oXbp:selected := {| m1, m2, oBtn | m2 := m2, oBtn := oBtn, oPanel1:caption := "3State A [" + aState[ m1+1 ] + "]" }
oXbp:selected := {| m1, m2, oBtn | m2 := m2, oBtn := oBtn, oPanel1:caption := "3State A [" + aState[ m1 + 1 ] + "]" }
// Create second 3State Button, passing the position to :new()
oXbp := Wvg3State():new( oStatic2, , { 10, 125 }, { 100, 15 } )
oXbp:caption := "3 State B"
oXbp:create( oStatic2 )
// Determine current state using :getData()
oXbp:selected := {| m1, m2, oBtn | m1 := m1, m2 := m2, WVG_MessageBox( , "3State B", aState[ oBtn:getData()+1 ] ) }
oXbp:selected := {| m1, m2, oBtn | m1 := m1, m2 := m2, WVG_MessageBox( , "3State B", aState[ oBtn:getData() + 1 ] ) }
// Create first SLE, specify position using :create()
// On :typeOut set the focus to the second SLE
@@ -244,7 +244,7 @@ PROCEDURE Main()
// Copy text from LOCAL variable into edit buffer via :dataLink
oMLE:setData()
//--------------------------- Misc Config ------------------------\\
// --------------------------- Misc Config ------------------------\\
oTBar:buttonClick := {| oBtn | iif( oBtn:caption == 'Hide' , oStatic:hide(), NIL ), ;
iif( oBtn:caption == 'Show' , oStatic:show(), NIL ), ;
iif( oBtn:caption == 'Tools' , oStatic2:show():toFront(), NIL ), ;
@@ -278,19 +278,19 @@ STATIC FUNCTION ResizeDialogXbp( oCrt, oTBar, oSBar, oStatic, oCom, oTree, oAddr
aTBar := oTBar:currentSize()
aSBar := oSBar:currentSize()
nT := aTBar[2]
nH := aCrt[2] - aTBar[2] - aSBar[2]
nT := aTBar[ 2 ]
nH := aCrt[ 2 ] - aTBar[ 2 ] - aSBar[ 2 ]
IF oStatic:isVisible
oStatic:setPosAndSize( { 0, nT + 3 }, { 120, nH - 4 }, .T. )
oAddr:setPosAndSize( { 120, nT + 2 }, { aCrt[1] - 120 - 150, 20 }, .T. )
oCom:setPosAndSize( { 120, nT + 2 + 20 }, { aCrt[1] - 120 - 150, nH - 20 }, .T. )
oTree:setPosAndSize( { aCrt[1] - 150, nT }, { 150, nH }, .T. )
oAddr:setPosAndSize( { 120, nT + 2 }, { aCrt[ 1 ] - 120 - 150, 20 }, .T. )
oCom:setPosAndSize( { 120, nT + 2 + 20 }, { aCrt[ 1 ] - 120 - 150, nH - 20 }, .T. )
oTree:setPosAndSize( { aCrt[ 1 ] - 150, nT }, { 150, nH }, .T. )
ELSE
oAddr:setPosAndSize( { 0, nT + 2 }, { aCrt[1] - 150, 20 }, .T. )
oCom:setPosAndSize( { 0, nT + 2 + 20 }, { aCrt[1] - 150, nH - 20 }, .T. )
oTree:setPosAndSize( { aCrt[1] - 150, nT }, { 150, nH }, .T. )
oAddr:setPosAndSize( { 0, nT + 2 }, { aCrt[ 1 ] - 150, 20 }, .T. )
oCom:setPosAndSize( { 0, nT + 2 + 20 }, { aCrt[ 1 ] - 150, nH - 20 }, .T. )
oTree:setPosAndSize( { aCrt[ 1 ] - 150, nT }, { 150, nH }, .T. )
ENDIF
@@ -344,7 +344,7 @@ STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt )
LOCAL oTBar
oTBar := WvgToolBar():new( oCrt , , { 0, 0 }, { 0, 0 }, , .T. )
oTBar := WvgToolBar():new( oCrt, , { 0, 0 }, { 0, 0 }, , .T. )
oTBar:style := WVGTOOLBAR_STYLE_FLAT
@@ -362,11 +362,11 @@ STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt )
oTBar:addItem( "New" , hb_DirBase() + 'v_new.bmp' )
oTBar:addItem( "Select" , hb_DirBase() + 'v_selct1.bmp' )
oTBar:addItem( )
oTBar:addItem()
oTBar:addItem( "FontDlg" , hb_DirBase() + 'v_calend.bmp' )
oTBar:addItem( "Tools" , hb_DirBase() + 'v_lock.bmp' )
oTBar:addItem( "Index" , hb_DirBase() + 'v_index.bmp' )
oTBar:addItem( )
oTBar:addItem()
oTBar:addItem( "Show" , hb_DirBase() + 'v_clclt.bmp' )
oTBar:addItem( "Hide" , hb_DirBase() + 'v_notes1.bmp' )
@@ -380,21 +380,21 @@ STATIC FUNCTION MyFunctionXbp( nMode )
DO CASE
CASE nMode == 1
Tone( MUSIC_WAITON[1], 1 )
Tone( MUSIC_WAITON[2], 1 )
Tone( MUSIC_WAITON[ 1 ], 1 )
Tone( MUSIC_WAITON[ 2 ], 1 )
CASE nMode == 2
Tone( MUSIC_WAITON[2], 1 )
Tone( MUSIC_WAITON[1], 1 )
Tone( MUSIC_WAITON[ 2 ], 1 )
Tone( MUSIC_WAITON[ 1 ], 1 )
CASE nMode == 3
WVG_MessageBox( , "Button clicked!" )
CASE nMode == 101 // Charge
Eval( {|| Tone( 523,2 ), Tone( 698,2 ), Tone( 880,2 ), Tone( 1046,4 ), Tone( 880,2 ), Tone( 1046,8 ) } )
Eval( {|| Tone( 523, 2 ), Tone( 698, 2 ), Tone( 880, 2 ), Tone( 1046, 4 ), Tone( 880, 2 ), Tone( 1046, 8 ) } )
CASE nMode == 102 // NannyBoo
AEval( { { 196,2 }, { 196,2 }, { 164,2 }, { 220,2 }, { 196,4 }, { 164,4 } }, {| a | Tone( a[1],a[2] ) } )
AEval( { { 196, 2 }, { 196, 2 }, { 164, 2 }, { 220, 2 }, { 196, 4 }, { 164, 4 } }, {| a | Tone( a[ 1 ], a[ 2 ] ) } )
CASE nMode == 103 // BADKEY
Tone( 480, 0.25 )

View File

@@ -190,20 +190,20 @@ FUNCTION DynDlgProc( hDlg, nMsg, wParam, lParam )
EXIT
CASE WM_CTLCOLOREDIT
IF ( WVG_GetDlgItem( hDlg,ID_MLE ) == lParam )
WVG_SetTextColor( wParam, RGB( 0,0,255 ) )
WVG_SetBkColor( wParam, RGB( 255,255,200 ) )
IF ( WVG_GetDlgItem( hDlg, ID_MLE ) == lParam )
WVG_SetTextColor( wParam, RGB( 0, 0, 255 ) )
WVG_SetBkColor( wParam, RGB( 255, 255, 200 ) )
RETURN 1
ELSEIF ( WVG_GetDlgItem( hDlg,ID_EDT_TEXT ) == lParam )
WVG_SetTextColor( wParam, RGB( 255,255,255 ) )
WVG_SetBkColor( wParam, RGB( 10,200,45 ) )
ELSEIF ( WVG_GetDlgItem( hDlg, ID_EDT_TEXT ) == lParam )
WVG_SetTextColor( wParam, RGB( 255, 255, 255 ) )
WVG_SetBkColor( wParam, RGB( 10, 200, 45 ) )
RETURN 1
ENDIF
EXIT
CASE WM_CTLCOLORSTATIC
IF ( WVG_GetDlgItem( hDlg,ID_STA_TEXT ) == lParam )
WVG_SetTextColor( wParam, RGB( 255,255,255 ) )
IF ( WVG_GetDlgItem( hDlg, ID_STA_TEXT ) == lParam )
WVG_SetTextColor( wParam, RGB( 255, 255, 255 ) )
RETURN 1
ENDIF
EXIT

View File

@@ -85,9 +85,9 @@ FUNCTION Just_Alert( cMsg, aOpt )
[ <lNoTitleBar:NOTITLEBAR> ] ;
INTO < oCrt > ;
=> ;
< oCrt > := CreateOCrt( < nTop > , < nLeft > , < nBottom > , < nRight > , < ttl > , < icon > , ;
< .lModal. > , < .lRowCols. > , < .lHidden. > , < .lCenter. > , ;
< nRow > , < nCol > , < .lNoTitleBar. > )
<oCrt > := CreateOCrt( <nTop>, <nLeft>, <nBottom>, <nRight>, <ttl>, <icon>, ;
<.lModal.>, <.lRowCols.>, <.lHidden.>, <.lCenter.>, ;
<nRow>, <nCol>, <.lNoTitleBar.> )
//
@@ -100,7 +100,7 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime )
LOCAL maxRow := MaxRow()
LOCAL nBtnCol_
LOCAL pal_ := { "w+/n", "w/r", "n/w", "n/bg", "r/bg", "N/W", "n/B", "w+/B" }
LOCAL aTrg_ , x_ := {}
LOCAL aTrg_, x_ := {}
hb_default( @cCaption , "Your Attention Please!" )
hb_default( @aButtons_ , { "OK" } )
@@ -146,7 +146,7 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime )
aTrg_ := Array( Len( aButtons_ ) )
FOR i := 1 TO Len( aButtons_ )
aTrg_[i] := Upper( SubStr( aButtons_[ i ], 1, 1 ) )
aTrg_[ i ] := Upper( SubStr( aButtons_[ i ], 1, 1 ) )
NEXT
// Create a new Window
@@ -164,7 +164,7 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime )
nBtnCol_[ 1 ] := Int( ( nColRqd - nColBut ) / 2 ) + 3
IF Len( aButtons_ ) > 1
FOR i := 2 TO Len( aButtons_ )
nBtnCol_[ i ] := nBtnCol_[ i-1 ] + Len( aButtons_[ i-1 ] ) + 3 + 4
nBtnCol_[ i ] := nBtnCol_[ i - 1 ] + Len( aButtons_[ i - 1 ] ) + 3 + 4
NEXT
ENDIF
@@ -196,7 +196,7 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime )
NEXT
SetColor( pal_[ DLG_CLR_HILITE ] )
@ nBtnRow, nBtnCol_[ sel ] SAY " " + aButtons_[sel] + " "
@ nBtnRow, nBtnCol_[ sel ] SAY " " + aButtons_[ sel ] + " "
SetColor( pal_[ DLG_CLR_HISEL ] )
@ nBtnRow, nBtnCol_[ sel ] + 2 SAY SubStr( aButtons_[ sel ], 1, 1 )
@@ -263,13 +263,13 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime )
DispBegin()
FOR i := 1 TO Len( aButtons_ )
SetColor( pal_[ DLG_CLR_BTN ] )
@ nBtnRow, nBtnCol_[ i ] SAY " " + aButtons_[i] + " "
SetColor( pal_[ DLG_CLR_TRG] )
@ nBtnRow, nBtnCol_[i] + 2 SAY SubStr( aButtons_[i], 1, 1 )
@ nBtnRow, nBtnCol_[ i ] SAY " " + aButtons_[ i ] + " "
SetColor( pal_[ DLG_CLR_TRG ] )
@ nBtnRow, nBtnCol_[ i ] + 2 SAY SubStr( aButtons_[ i ], 1, 1 )
NEXT
IF sel > 0
SetColor( pal_[ DLG_CLR_HILITE ] )
@ nBtnRow, nBtnCol_[sel] SAY " " + aButtons_[ sel ] + " "
@ nBtnRow, nBtnCol_[ sel ] SAY " " + aButtons_[ sel ] + " "
SetColor( pal_[ DLG_CLR_HISEL ] )
@ nBtnRow, nBtnCol_[ sel ] + 2 SAY SubStr( aButtons_[ sel ], 1, 1 )
ENDIF
@@ -295,7 +295,7 @@ FUNCTION CreateOCrt( nT, nL, nB, nR, cTitle, xIcon, lModal, lRowCols, lHidden, ;
hb_default( @lCenter , .F. )
hb_default( @lNoTitleBar , .F. )
aPos := iif( lCenter, { -1, -1 }, iif( nRow == NIL, { nT, nL }, { nRow,nCol } ) )
aPos := iif( lCenter, { -1, -1 }, iif( nRow == NIL, { nT, nL }, { nRow, nCol } ) )
oCrt := WvgCrt():new( , , aPos, { nB - nT, nR - nL }, , !lHidden )
oCrt:lModal := lModal

View File

@@ -42,7 +42,7 @@
FUNCTION WvtMyBrowse()
IF hb_mtvm()
hb_threadStart( {| oCrt | oCrt := WvgCrt():new( , , { -1, -2 }, { 34,69 }, , .T. ), ;
hb_threadStart( {| oCrt | oCrt := WvgCrt():new( , , { -1, -2 }, { 34, 69 }, , .T. ), ;
oCrt:resizeMode := HB_GTI_RESIZEMODE_ROWS, ;
oCrt:icon := GetResource( "dia_excl.ico" ), ;
oCrt:create(), ;
@@ -61,8 +61,8 @@ FUNCTION WvtMyBrowse()
FUNCTION ExecBrowser( oCrt )
LOCAL nKey, bBlock, oBrowse , aLastPaint, i, pGT
LOCAL cFileIndex, cFileDbf, cRDD, nIndex, oTBar, cScr, info_ //, oLB
LOCAL nKey, bBlock, oBrowse, aLastPaint, i, pGT
LOCAL cFileIndex, cFileDbf, cRDD, nIndex, oTBar, cScr, info_ // , oLB
LOCAL lEnd := .F.
LOCAL aBlocks := {}
LOCAL nTop := 4
@@ -534,7 +534,7 @@ STATIC FUNCTION BrwBuildButtons( oCrt, oBrw )
oPB:create( , , { {|| -MaxRow() }, -nOff }, { -1, -aW[ i ] } )
ENDIF
oPB:activate := aAct[ i ]
oPB:setColorFG( RGB( 0,255,0 ) )
oPB:setColorFG( RGB( 0, 255, 0 ) )
oPB:tooltipText := aPmt[ i ]
nOff += aW[ i ] + nG
@@ -605,7 +605,7 @@ STATIC FUNCTION BrwBuildToolBar( oCrt )
oTBar:style := WVGTOOLBAR_STYLE_FLAT
oTBar:borderStyle := WVGFRAME_RECT
oTBar:buttonWidth := 40 //28
oTBar:buttonWidth := 40 // 28
oTBar:buttonHeight := 26
oTBar:imageWidth := 26
@@ -793,11 +793,11 @@ STATIC FUNCTION TBNext()
LOCAL nSaveRecNum := RecNo()
LOCAL lMoved := .T.
IF EOF()
IF Eof()
lMoved := .F.
ELSE
dbSkip( 1 )
IF EOF()
IF Eof()
lMoved := .F.
dbGoto( nSaveRecNum )
ENDIF
@@ -814,7 +814,7 @@ STATIC FUNCTION TBPrev()
dbSkip( -1 )
IF BOF()
IF Bof()
dbGoto( nSaveRecNum )
lMoved := .F.
ENDIF
@@ -1032,7 +1032,7 @@ FUNCTION ConfigBrowser( aFields, cUseAlias, aTLBR, cDesc, oParent, cColorSpec, n
FOR i := 1 TO Len( aFields )
bBlock := VouBlockField( aFields[ i ] )
oBrowse:AddColumn( TBColumnNew( info_[ aFields[ i ],1 ], bBlock ) )
oBrowse:AddColumn( TBColumnNew( info_[ aFields[ i ], 1 ], bBlock ) )
NEXT
oBrowse:configure()

View File

@@ -48,23 +48,23 @@
//
THREAD STATIC t_keys_ := { , , , , , , , , , , , , , , , , , , , }
THREAD STATIC t_pic_ := { , , , , , , , , , , , , , , , , , , , }
THREAD STATIC t_keys_ := {, , , , , , , , , , , , , , , , , , , }
THREAD STATIC t_pic_ := {, , , , , , , , , , , , , , , , , , , }
//
FUNCTION WvtSetKeys( lSet )
IF lSet
t_keys_[ 2 ] := SetKey( K_F2, {|| WvtNextGets() } )
t_keys_[ 3 ] := SetKey( K_F3, {|| WvtWindowExpand( 1 ) } )
t_keys_[ 4 ] := SetKey( K_F4, {|| WvtWindowExpand( -1 ) } )
t_keys_[ 5 ] := SetKey( K_F5, {|| WvtMyBrowse() } )
t_keys_[ 6 ] := SetKey( K_F6, {|| Wvt_Minimize() } )
t_keys_[ 7 ] := SetKey( K_F7, {|| WvtPartialScreen() } )
t_keys_[ 8 ] := SetKey( K_F8, {|| WvtLines() } )
t_keys_[ 9 ] := SetKey( K_F9, {|| Wvt_ChooseFont() } )
t_keys_[ 10] := SetKey( K_F10, {|| Wvt_ChooseColor() } )
t_keys_[ 2 ] := SetKey( K_F2, {|| WvtNextGets() } )
t_keys_[ 3 ] := SetKey( K_F3, {|| WvtWindowExpand( 1 ) } )
t_keys_[ 4 ] := SetKey( K_F4, {|| WvtWindowExpand( -1 ) } )
t_keys_[ 5 ] := SetKey( K_F5, {|| WvtMyBrowse() } )
t_keys_[ 6 ] := SetKey( K_F6, {|| Wvt_Minimize() } )
t_keys_[ 7 ] := SetKey( K_F7, {|| WvtPartialScreen() } )
t_keys_[ 8 ] := SetKey( K_F8, {|| WvtLines() } )
t_keys_[ 9 ] := SetKey( K_F9, {|| Wvt_ChooseFont() } )
t_keys_[ 10 ] := SetKey( K_F10, {|| Wvt_ChooseColor() } )
ELSE
SetKey( K_F2, t_keys_[ 2 ] )
SetKey( K_F3, t_keys_[ 3 ] )
@@ -74,7 +74,7 @@ FUNCTION WvtSetKeys( lSet )
SetKey( K_F7, t_keys_[ 7 ] )
SetKey( K_F8, t_keys_[ 8 ] )
SetKey( K_F9, t_keys_[ 9 ] )
SetKey( K_F10, t_keys_[ 10] )
SetKey( K_F10, t_keys_[ 10 ] )
ENDIF
RETURN NIL
@@ -352,7 +352,7 @@ FUNCTION BuildWvgToolBar( oDA, nActiveX )
oTBar:style := WVGTOOLBAR_STYLE_FLAT
oTBar:borderStyle := WVGFRAME_RECT
oTBar:buttonWidth := 40 //28
oTBar:buttonWidth := 40 // 28
oTBar:buttonHeight := 26
oTBar:imageWidth := 26
@@ -490,7 +490,7 @@ FUNCTION Popups( nID, lDestroy )
FUNCTION DispStatusMsg( cMsg )
Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, rgb( 198,198,198 ), "Arial", 18, , 900 )
Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, rgb( 198, 198, 198 ), "Arial", 18, , 900 )
RETURN .T.

View File

@@ -33,11 +33,11 @@ FUNCTION DialogWvgClassesOne( nMode )
bBlock := {| oCrt | ;
oCrt := WvgCrt():New( , , { -1, -1 }, { 54, 184 }, , .F. ), ;
oCrt:fontName := 'Courier', ;
oCrt:fontHeight := 13 , ;
oCrt:fontWidth := 0 , ;
oCrt:Create() , ;
MyDialogOne( oCrt ) , ;
oCrt:destroy() ;
oCrt:fontHeight := 13, ;
oCrt:fontWidth := 0, ;
oCrt:Create(), ;
MyDialogOne( oCrt ), ;
oCrt:destroy() ;
}
hb_threadStart( bBlock )
ENDIF
@@ -133,14 +133,14 @@ STATIC FUNCTION MyDialogOne( oCrt )
oTBar := WvtToolbar():New( oDlg, 103, 0, 0, 2 )
oTBar:lFloating := .F.
oTBar:Tooltip := "Toolbar"
oTBar:AddButton( aImg_[ 1 ], {|| oImg:SetImage( aImg_[ 1 ] ) } , "Lock" )
oTBar:AddButton( aImg_[ 2 ], {|| oImg:SetImage( aImg_[ 2 ] ), oText:SetText( "Harbour" ) } , "New" )
oTBar:AddButton( aImg_[ 3 ], {|| oImg:SetImage( aImg_[ 3 ] ) } , "Calculator" )
oTBar:AddButton( aImg_[ 1 ], {|| oImg:SetImage( aImg_[ 1 ] ) }, "Lock" )
oTBar:AddButton( aImg_[ 2 ], {|| oImg:SetImage( aImg_[ 2 ] ), oText:SetText( "Harbour" ) }, "New" )
oTBar:AddButton( aImg_[ 3 ], {|| oImg:SetImage( aImg_[ 3 ] ) }, "Calculator" )
oTBar:AddButton()
oTBar:AddButton( aImg_[ 5 ], {|| oImg:SetImage( aImg_[ 5 ] ) } , "Restore" )
oTBar:AddButton( aImg_[ 4 ], {|| oImg:SetImage( aImg_[ 4 ] ), oText:SetText( "Vouch" ) } , "Calendar" )
oTBar:AddButton( aImg_[ 6 ], {|| oImg:SetImage( aImg_[ 6 ] ) } , "Notes" )
oTBar:AddButton( aImg_[ 7 ], {|| oImg:SetImage( aImg_[ 7 ] ) } , "Press to Send Browse on Top" )
oTBar:AddButton( aImg_[ 5 ], {|| oImg:SetImage( aImg_[ 5 ] ) }, "Restore" )
oTBar:AddButton( aImg_[ 4 ], {|| oImg:SetImage( aImg_[ 4 ] ), oText:SetText( "Vouch" ) }, "Calendar" )
oTBar:AddButton( aImg_[ 6 ], {|| oImg:SetImage( aImg_[ 6 ] ) }, "Notes" )
oTBar:AddButton( aImg_[ 7 ], {|| oImg:SetImage( aImg_[ 7 ] ) }, "Press to Send Browse on Top" )
oTBar:AddButton()
oDlg:AddObject( oTBar )
@@ -188,8 +188,8 @@ STATIC FUNCTION MyDialogOne( oCrt )
oDlg:AddObject( oCon )
nGetCol := 158
bBlock := {|| oCon:Say( 12, 148, "Name" , "N/W" ), ;
oCon:Say( 14, 148, "Date" , "N/W" ), ;
bBlock := {|| oCon:Say( 12, 148, "Name", "N/W" ), ;
oCon:Say( 14, 148, "Date", "N/W" ), ;
oCon:Say( 16, 148, "Amount", "N/W" ) }
oGet := WvtGets():New( oDlg, 210, 9, oDlg:MaxCol() - 40, 18, oDlg:MaxCol() - 2 )
@@ -235,7 +235,7 @@ STATIC FUNCTION MyDialogOne( oCrt )
oTBx:nTextColor := RGB( 255, 255, 255 )
oTBx:nTextColorHoverOn := RGB( 0, 0, 255 )
oTBx:aPopup := {}
AAdd( oTBx:aPopup, { "Getsome" , {|| .T. } } )
AAdd( oTBx:aPopup, { "Getsome", {|| .T. } } )
AAdd( oTBx:aPopup, { "Getsome2", {|| .T. } } )
oDlg:AddObject( oTBx )
@@ -343,7 +343,7 @@ FUNCTION DialogWvgClassesTwo()
g_oMenuBar := WvtMenu():new():create()
oMenu := wvtMenu():new():create()
oMenu:Caption := "Miscellaneous"
oMenu:AddItem( "Progressbar", {|| ExeProgBar( oPBar,oPBar1,oPBar2,oPBar3, oPBar4 ) } )
oMenu:AddItem( "Progressbar", {|| ExeProgBar( oPBar, oPBar1, oPBar2, oPBar3, oPBar4 ) } )
oMenu:AddItem( "-" )
oMenu:AddItem( "Exit", {|| Wvt_Keyboard( K_ESC ) } )
g_oMenuBar:addItem( "", oMenu )

View File

@@ -33,7 +33,7 @@ FUNCTION demoxbp()
LOCAL aState := { "not selected", "selected", "undefined" }
LOCAL aParts := {}
//--------------------------- Dialog -------------------------------\\
// --------------------------- Dialog -------------------------------\\
oCrt := WvgDialog():new( , , { 30, 30 }, { 900, 600 }, , .T. )
oCrt:closable := .T.
oCrt:icon := GetResource( "vr_1.ico" )
@@ -43,13 +43,13 @@ FUNCTION demoxbp()
oDA := oCrt:drawingArea
//--------------------------- Menu --------------------------------\\
// --------------------------- Menu --------------------------------\\
ActiveXBuildMenuXbp( oCrt, @oStatic, @oStatic2 )
//--------------------------- ToolBar -----------------------------\\
// --------------------------- ToolBar -----------------------------\\
oTBar := ActiveXBuildToolBarXbp( oDA )
//--------------------------- StatusBar ---------------------------\\
// --------------------------- StatusBar ---------------------------\\
oSBar := WvgStatusBar():new( oCrt ):create( , , , , , .T. )
oSBar:panelClick := {| oPanel | WVG_MessageBox( , oPanel:caption ) }
oPanel := oSBar:getItem( 1 )
@@ -59,7 +59,7 @@ FUNCTION demoxbp()
oPanel2 := oSBar:addItem()
oPanel2:caption := 'Click on any part!'
//--------------------------- Static ------------------------------\\
// --------------------------- Static ------------------------------\\
oStatic := WvgStatic():new( oDA )
oStatic:type := WVGSTATIC_TYPE_TEXT
oStatic:options := WVGSTATIC_TEXT_CENTER
@@ -67,13 +67,13 @@ FUNCTION demoxbp()
oStatic:create( , , { 0, oTBar:currentSize()[ 2 ] + 3 }, { 120, oCrt:currentSize()[ 2 ] - ;
oTBar:currentSize()[ 2 ] - oSBar:currentSize()[ 2 ] - 4 }, , .T. )
oStatic:setColorBG( RGB( 200,200,200 ) )
oStatic:setColorBG( RGB( 200, 200, 200 ) )
//--------------------------- ListBox -----------------------------\\
// --------------------------- ListBox -----------------------------\\
oListBox := WvgListBox():new()
oListBox:create( oStatic, , { 5, 55 }, { 107, 380 } )
oListBox:setColorFG( RGB( 218,61,34 ) )
oListBox:setColorFG( RGB( 218, 61, 34 ) )
// oListBox:setColorBG( RGB( 250,244,182 ) )
AAdd( aParts, 'XbpDialog' )
@@ -103,13 +103,13 @@ FUNCTION demoxbp()
oListBox:itemSelected := {|| WVG_MessageBox( , oListBox:getCurItem() ) }
oListBox:setData( 3 ) // show selected 'XbpToolBar'
//--------------------------- PushButton --------------------------\\
// --------------------------- PushButton --------------------------\\
oXbp := WvgPushButton():new( oStatic )
oXbp:caption := "Hide"
oXbp:create( , , { 20, 440 }, { 80, 30 } )
oXbp:activate := {|| oStatic:hide(), oCrt:sendMessage( WM_SIZE, 0, 0 ) }
//--------------------------- TreeView ---------------------------\\
// --------------------------- TreeView ---------------------------\\
oTree := WvgTreeView():new( oDA, , { oCrt:currentSize()[ 1 ] - 160, oTBar:currentSize()[ 2 ] + 3 }, ;
{ 160, oCrt:currentSize()[ 2 ] - ;
@@ -118,8 +118,8 @@ FUNCTION demoxbp()
oTree:hasButtons := .T.
oTree:alwaysShowSelection := .T.
oTree:create()
oTree:setColorBG( RGB( 120,15,240 ) )
oTree:setColorFG( RGB( 15,240,120 ) )
oTree:setColorBG( RGB( 120, 15, 240 ) )
oTree:setColorFG( RGB( 15, 240, 120 ) )
oTree:itemSelected := {| oItem | iif( oItem != NIL, WVG_MessageBox( , oItem:caption ), NIL ) }
oItem1 := oTree:rootItem:addItem( "First level A" )
@@ -141,7 +141,7 @@ FUNCTION demoxbp()
oTree:setData( oItem2 )
//--------------------------- Active-X ---------------------------\\
// --------------------------- Active-X ---------------------------\\
hb_gtInfo( HB_GTI_WINTITLE, 'http://www.harbour.vouch.info' )
#if 0
oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .T. )
@@ -161,19 +161,19 @@ FUNCTION demoxbp()
oAddr:border := .T.
cNavigate := 'http://www.harbour.vouch.info'
oAddr:dataLink := {| x | iif( x == NIL, cNavigate, cNavigate := x ) }
oAddr:setColorFG( RGB( 0,0,255 ) )
oAddr:setColorBG( RGB( 0,255,255 ) )
oAddr:setColorFG( RGB( 0, 0, 255 ) )
oAddr:setColorBG( RGB( 0, 255, 255 ) )
oAddr:create( oDA, , { 120, oTBar:currentSize()[ 2 ] }, { 500, 20 }, , .T. )
oAddr:setData()
oAddr:killInputFocus := {| m1, m2, oS | m1 := m1, m2 := m2, oS:getData(), oCom:navigate( cNavigate ) }
//----------------- Panel : Static + Radio + Checkbox ----------\\
// ----------------- Panel : Static + Radio + Checkbox ----------\\
oStatic2 := WvgStatic():New( oDA, , { 150, 150 }, { 500, 310 }, , .F. )
// oStatic2:type := WVGSTATIC_TYPE_RAISEDBOX //BGNDFRAME
// oStatic2:type := WVGSTATIC_TYPE_RAISEDBOX //BGNDFRAME
oStatic2:exStyle += WS_EX_WINDOWEDGE
// oStatic2:options := WVGSTATIC_FRAMETHICK
// oStatic2:options := WVGSTATIC_FRAMETHICK
oStatic2:create()
oStatic2:setColorBG( RGB( 175,175,175 ) )
oStatic2:setColorBG( RGB( 175, 175, 175 ) )
oXbp := WvgPushButton():new( oStatic2 )
oXbp:caption := "Hide"
@@ -194,21 +194,21 @@ FUNCTION demoxbp()
oCheck := WvgCheckBox():New( oStatic2, , { 10, 70 }, { 100, 15 }, , .T. )
oCheck:caption := 'Checkbox A'
oCheck:create()
oCheck:selected := {| m1, m2, o | m1 := m1, m2 := m2, WVG_MessageBox( , iif( o:getData(), 'I am selected','I am not selected' ) ) }
oCheck:selected := {| m1, m2, o | m1 := m1, m2 := m2, WVG_MessageBox( , iif( o:getData(), 'I am selected', 'I am not selected' ) ) }
// Create first 3State button, passing the position to :create()
oXbp := Wvg3State():new()
oXbp:caption := "3 State A"
oXbp:create( oStatic2, , { 10, 100 }, { 100, 15 } )
// Determine current state using mp1
oXbp:selected := {| m1, m2, oBtn | m2 := m2, oBtn := oBtn, oPanel1:caption := "3State A [" + aState[ m1+1 ] + "]" }
oXbp:selected := {| m1, m2, oBtn | m2 := m2, oBtn := oBtn, oPanel1:caption := "3State A [" + aState[ m1 + 1 ] + "]" }
// Create second 3State Button, passing the position to :new()
oXbp := Wvg3State():new( oStatic2, , { 10, 125 }, { 100, 15 } )
oXbp:caption := "3 State B"
oXbp:create( oStatic2 )
// Determine current state using :getData()
oXbp:selected := {| m1, m2, oBtn | m1 := m1, m2 := m2, WVG_MessageBox( , "3State B", aState[ oBtn:getData()+1 ] ) }
oXbp:selected := {| m1, m2, oBtn | m1 := m1, m2 := m2, WVG_MessageBox( , "3State B", aState[ oBtn:getData() + 1 ] ) }
// Create first SLE, specify position using :create()
// On :typeOut set the focus to the second SLE
@@ -243,10 +243,10 @@ FUNCTION demoxbp()
// Copy text from LOCAL variable into edit buffer via :dataLink
oMLE:setData()
//--------------------------- Misc Config ------------------------\\
oTBar:buttonClick := {| oBtn | iif( oBtn:caption == 'Hide' , oStatic:hide(), NIL ), ;
iif( oBtn:caption == 'Show' , oStatic:show(), NIL ), ;
iif( oBtn:caption == 'Tools' , oStatic2:show():toFront(), NIL ), ;
// --------------------------- Misc Config ------------------------\\
oTBar:buttonClick := {| oBtn | iif( oBtn:caption == 'Hide', oStatic:hide(), NIL ), ;
iif( oBtn:caption == 'Show', oStatic:show(), NIL ), ;
iif( oBtn:caption == 'Tools', oStatic2:show():toFront(), NIL ), ;
iif( oBtn:caption == 'FontDlg', ExeFontDialogXbp( oCrt ), NIL ), ;
iif( oBtn:caption $ 'Hide,Show', oCrt:sendMessage( WM_SIZE, 0, 0 ), NIL ), ;
oPanel2:caption := "Button [ " + oBtn:caption + " ] clicked!" }
@@ -343,7 +343,7 @@ STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt )
LOCAL oTBar
oTBar := WvgToolBar():new( oCrt , , { 0, 0 }, { 0, 0 }, , .T. )
oTBar := WvgToolBar():new( oCrt, , { 0, 0 }, { 0, 0 }, , .T. )
oTBar:style := WVGTOOLBAR_STYLE_FLAT
@@ -361,11 +361,11 @@ STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt )
oTBar:addItem( "New" , hb_DirBase() + 'v_new.bmp' )
oTBar:addItem( "Select" , hb_DirBase() + 'v_selct1.bmp' )
oTBar:addItem( )
oTBar:addItem()
oTBar:addItem( "FontDlg" , hb_DirBase() + 'v_calend.bmp' )
oTBar:addItem( "Tools" , hb_DirBase() + 'v_lock.bmp' )
oTBar:addItem( "Index" , hb_DirBase() + 'v_index.bmp' )
oTBar:addItem( )
oTBar:addItem()
oTBar:addItem( "Show" , hb_DirBase() + 'v_clclt.bmp' )
oTBar:addItem( "Hide" , hb_DirBase() + 'v_notes1.bmp' )
@@ -388,10 +388,10 @@ STATIC FUNCTION MyFunctionXbp( nMode )
WVG_MessageBox( , "Button clicked!" )
CASE nMode == 101 // Charge
Eval( {|| Tone( 523,2 ), Tone( 698,2 ), Tone( 880,2 ), Tone( 1046,4 ), Tone( 880,2 ), Tone( 1046,8 ) } )
Eval( {|| Tone( 523, 2 ), Tone( 698, 2 ), Tone( 880, 2 ), Tone( 1046, 4 ), Tone( 880, 2 ), Tone( 1046, 8 ) } )
CASE nMode == 102 // NannyBoo
AEval( { { 196,2 }, { 196,2 }, { 164,2 }, { 220,2 }, { 196,4 }, { 164,4 } }, {| a | Tone( a[ 1 ], a[ 2 ] ) } )
AEval( { { 196, 2 }, { 196, 2 }, { 164, 2 }, { 220, 2 }, { 196, 4 }, { 164, 4 } }, {| a | Tone( a[ 1 ], a[ 2 ] ) } )
CASE nMode == 103 // BADKEY
Tone( 480, 0.25 )

View File

@@ -229,7 +229,7 @@ METHOD WvgToolBar:handleEvent( nMessage, aNM )
IF ::isParentCrt()
::oParent:setFocus()
ENDIF
Eval( ::sl_lbClick, ::aItems[ nObj,2 ], NIL, Self )
Eval( ::sl_lbClick, ::aItems[ nObj, 2 ], NIL, Self )
ENDIF
ENDIF
@@ -253,14 +253,14 @@ METHOD WvgToolBar:destroy()
IF ( nItems := Len( ::aItems ) ) > 0
FOR i := 1 TO nItems
IF ::aItems[ i,2 ]:image != NIL
WVG_DeleteObject( ::aItems[ i,2 ]:image )
IF ::aItems[ i, 2 ]:image != NIL
WVG_DeleteObject( ::aItems[ i, 2 ]:image )
ENDIF
IF ::aItems[ i,2 ]:disabledImage != NIL
WVG_DeleteObject( ::aItems[ i,2 ]:disabledImage )
IF ::aItems[ i, 2 ]:disabledImage != NIL
WVG_DeleteObject( ::aItems[ i, 2 ]:disabledImage )
ENDIF
IF ::aItems[ i,2 ]:hotImage != NIL
WVG_DeleteObject( ::aItems[ i,2 ]:hotImage )
IF ::aItems[ i, 2 ]:hotImage != NIL
WVG_DeleteObject( ::aItems[ i, 2 ]:hotImage )
ENDIF
NEXT
ENDIF
@@ -351,7 +351,7 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
::SendToolbarMessage( TB_SETBUTTONSIZE, ::buttonWidth, ::buttonHeight )
#if 0
SendMessage( hWndTB, TB_SETPADDING, ( WPARAM ) 0, ( LPARAM ) MAKELPARAM( 10,10 ) );
SendMessage( hWndTB, TB_SETPADDING, ( WPARAM ) 0, ( LPARAM ) MAKELPARAM( 10, 10 ) );
::sendToolbarMessage( TB_SETPADDING, 10, 10 )
#endif
::sendToolbarMessage( TB_AUTOSIZE )

View File

@@ -619,12 +619,12 @@ METHOD WvgWindow:isDerivedFrom( cClassORoObject )
/* Compares without Xbp or Wvg prefixes */
IF HB_ISSTRING( cClassORoObject )
IF Upper( SubStr( cClassORoObject,4 ) ) == Upper( SubStr( cCls,4 ) )
IF Upper( SubStr( cClassORoObject, 4 ) ) == Upper( SubStr( cCls, 4 ) )
lTrue := .T.
ENDIF
ELSEIF HB_ISOBJECT( cClassORoObject )
IF Upper( SubStr( cClassORoObject:className,4 ) ) == Upper( SubStr( cCls,4 ) )
IF Upper( SubStr( cClassORoObject:className, 4 ) ) == Upper( SubStr( cCls, 4 ) )
lTrue := .T.
ENDIF
ENDIF
@@ -698,7 +698,7 @@ METHOD WvgWindow:setFontCompoundName( xFont )
ENDIF
IF ( n := At( ".", cFont ) ) > 0
nPoint := Val( SubStr( cFont,1,n - 1 ) )
nPoint := Val( SubStr( cFont, 1, n - 1 ) )
cFont := SubStr( cFont, n + 1 )
ELSE
nPoint := 0

View File

@@ -68,8 +68,10 @@ CREATE CLASS HBBlat
EXPORTED:
// Installation
VAR lSaveSettings AS LOGICAL INIT .F. // store common settings to the Windows Registry. Takes the
// same parameters as -install, and is only for SMTP settings.
VAR lSaveSettings AS LOGICAL INIT .F.
// store common settings to the Windows Registry. Takes the
// same parameters as -install, and is only for SMTP settings.
METHOD SaveSettings( ... ) INLINE ::Install( "SMTP", ... )
//VAR lInstall AS LOGICAL INIT .F.
METHOD Install( cService, cServerAddress, cSenderEmailAddress, nTries, nPort, cProfile, cUsername, cPassword ) VIRTUAL // TODO
@@ -207,6 +209,7 @@ CREATE CLASS HBBlat
ENDCLASS
METHOD Send() CLASS HBBlat
::Check()
IF ::nError == BLAT_SUCCESS
@@ -227,7 +230,7 @@ METHOD PROCEDURE Check() CLASS HBBlat
// Not using registry, so every parameter has to be explicity set
// No control apart from existence
IF !::lChecked
IF ! ::lChecked
::cCommand := ""
@@ -238,7 +241,7 @@ METHOD PROCEDURE Check() CLASS HBBlat
::nError := BLAT_ERR_MISSING_TO
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_TO )
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -249,11 +252,11 @@ METHOD PROCEDURE Check() CLASS HBBlat
// tofile - optional
IF HB_ISSTRING( ::cTOFile )
IF !hb_FileExists( ::cTOFile )
IF ! hb_FileExists( ::cTOFile )
::nError := BLAT_ERR_MISSING_TOFILE
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_TOFILE ) + ": " + ::cToFile
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -268,11 +271,11 @@ METHOD PROCEDURE Check() CLASS HBBlat
// ccfile - optional
IF HB_ISSTRING( ::cCCFile )
IF !hb_FileExists( ::cCCFile )
IF ! hb_FileExists( ::cCCFile )
::nError := BLAT_ERR_MISSING_CCFILE
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_CCFILE ) + ": " + ::cCCFile
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -287,11 +290,11 @@ METHOD PROCEDURE Check() CLASS HBBlat
// bccfile - optional
IF HB_ISSTRING( ::cBCCFile )
IF !hb_FileExists( ::cBCCFile )
IF ! hb_FileExists( ::cBCCFile )
::nError := BLAT_ERR_MISSING_BCCFILE
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_BCCFILE ) + ": " + ::cBCCFile
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -321,11 +324,11 @@ METHOD PROCEDURE Check() CLASS HBBlat
// cSubjectFile - optional
IF HB_ISSTRING( ::cSubjectFile )
IF !hb_FileExists( ::cSubjectFile )
IF ! hb_FileExists( ::cSubjectFile )
::nError := BLAT_ERR_MISSING_SUBJECTFILE
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_SUBJECTFILE ) + ": " + ::cSubjectFile
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -335,11 +338,11 @@ METHOD PROCEDURE Check() CLASS HBBlat
// bodyfile - optional
IF HB_ISSTRING( ::cBodyFile )
IF !hb_FileExists( ::cBodyFile )
IF ! hb_FileExists( ::cBodyFile )
::nError := BLAT_ERR_MISSING_BODYFILE
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_BODYFILE ) + ": " + ::cBodyFile
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -352,18 +355,18 @@ METHOD PROCEDURE Check() CLASS HBBlat
::nError := BLAT_ERR_MISSING_BODY
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_BODY )
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
IF HB_ISSTRING( ::cBody )
::cCommand += ' -body "' + ::cBody + '"'
ELSE
IF !hb_FileExists( ::cBodyFile )
IF ! hb_FileExists( ::cBodyFile )
::nError := BLAT_ERR_MISSING_BODYFILE
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_BODYFILE ) + ": " + ::cBodyFile
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -374,11 +377,11 @@ METHOD PROCEDURE Check() CLASS HBBlat
// cSignatureFile
IF HB_ISSTRING( ::cSignatureFile )
IF !hb_FileExists( ::cSignatureFile )
IF ! hb_FileExists( ::cSignatureFile )
::nError := BLAT_ERR_MISSING_SIGNATUREFILE
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_SIGNATUREFILE ) + ": " + ::cSignatureFile
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -388,11 +391,11 @@ METHOD PROCEDURE Check() CLASS HBBlat
// cTagFile
IF HB_ISSTRING( ::cTagFile )
IF !hb_FileExists( ::cTagFile )
IF ! hb_FileExists( ::cTagFile )
::nError := BLAT_ERR_MISSING_TAGFILE
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_TAGFILE ) + ": " + ::cTagFile
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -402,11 +405,11 @@ METHOD PROCEDURE Check() CLASS HBBlat
// cPostScriptumFile - optional
IF HB_ISSTRING( ::cPostScriptumFile )
IF !hb_FileExists( ::cPostScriptumFile )
IF ! hb_FileExists( ::cPostScriptumFile )
::nError := BLAT_ERR_MISSING_PSFILE
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_PSFILE ) + ": " + ::cPostScriptumFile
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -431,7 +434,7 @@ METHOD PROCEDURE Check() CLASS HBBlat
::nError := BLAT_ERR_MISSING_SERVERSMTP
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_SERVERSMTP )
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -463,7 +466,7 @@ METHOD PROCEDURE Check() CLASS HBBlat
::nError := BLAT_ERR_MISSING_FROM
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_FROM )
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -569,7 +572,7 @@ METHOD PROCEDURE Check() CLASS HBBlat
// No Blat Home Page
// Add only if ::lNoBlatXHeader is .F.
IF !::lNoBlatXHeader
IF ! ::lNoBlatXHeader
IF ::lNoBlatHomePage
::cCommand += " -noh"
ENDIF
@@ -602,14 +605,14 @@ METHOD PROCEDURE Check() CLASS HBBlat
// cDSN
IF HB_ISSTRING( ::cDSN )
IF ( "n" $ Lower( ::cDSN ) .OR. "s" $ Lower( ::cDSN ) .OR. ;
"f" $ Lower( ::cDSN ) .OR. "d" $ Lower( ::cDSN ) )
IF "n" $ Lower( ::cDSN ) .OR. "s" $ Lower( ::cDSN ) .OR. ;
"f" $ Lower( ::cDSN ) .OR. "d" $ Lower( ::cDSN )
::cCommand += " -dsn " + ::cDSN
ELSE
::nError := BLAT_ERR_WRONG_DSN
::cError := ::TranslateBlatError( BLAT_ERR_WRONG_DSN ) + ": " + ::cDSN
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ENDIF
@@ -640,7 +643,7 @@ METHOD PROCEDURE Check() CLASS HBBlat
// Attachment and encoding options --------
// Attach Binary Files
IF !Empty( ::aAttachBinFiles )
IF ! Empty( ::aAttachBinFiles )
IF HB_ISSTRING( ::cAttachBinFiles )
::cAttachBinFiles += ","
ELSE
@@ -653,7 +656,7 @@ METHOD PROCEDURE Check() CLASS HBBlat
ENDIF
// Attach Text Files
IF !Empty( ::aAttachTextFiles )
IF ! Empty( ::aAttachTextFiles )
IF HB_ISSTRING( ::cAttachTextFiles )
::cAttachTextFiles += ","
ELSE
@@ -666,7 +669,7 @@ METHOD PROCEDURE Check() CLASS HBBlat
ENDIF
// Attach INLINE Files
IF !Empty( ::aAttachInlineFiles )
IF ! Empty( ::aAttachInlineFiles )
IF HB_ISSTRING( ::cAttachInlineFiles )
::cAttachInlineFiles += ","
ELSE
@@ -679,7 +682,7 @@ METHOD PROCEDURE Check() CLASS HBBlat
ENDIF
// Attach Html Embedded Files
IF !Empty( ::aHtmlEmbeddedFiles )
IF ! Empty( ::aHtmlEmbeddedFiles )
IF HB_ISSTRING( ::cHtmlEmbeddedFiles )
::cHtmlEmbeddedFiles += ","
ELSE
@@ -693,11 +696,11 @@ METHOD PROCEDURE Check() CLASS HBBlat
// cAttachListBinFile - optional
IF HB_ISSTRING( ::cAttachListBinFile )
IF !hb_FileExists( ::cAttachListBinFile )
IF ! hb_FileExists( ::cAttachListBinFile )
::nError := BLAT_ERR_MISSING_ATTACHLISTBINFILE
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_ATTACHLISTBINFILE ) + ": " + ::cAttachListBinFile
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -707,11 +710,11 @@ METHOD PROCEDURE Check() CLASS HBBlat
// cAttachListTextFile - optional
IF HB_ISSTRING( ::cAttachListTextFile )
IF !hb_FileExists( ::cAttachListTextFile )
IF ! hb_FileExists( ::cAttachListTextFile )
::nError := BLAT_ERR_MISSING_ATTACHLISTTEXTFILE
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_ATTACHLISTTEXTFILE ) + ": " + ::cAttachListTextFile
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -721,11 +724,11 @@ METHOD PROCEDURE Check() CLASS HBBlat
// cAttachListEmbeddedFile - optional
IF HB_ISSTRING( ::cAttachListEmbeddedFile )
IF !hb_FileExists( ::cAttachListEmbeddedFile )
IF ! hb_FileExists( ::cAttachListEmbeddedFile )
::nError := BLAT_ERR_MISSING_ATTACHLISTEMBEDDEDFILE
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_ATTACHLISTEMBEDDEDFILE ) + ": " + ::cAttachListEmbeddedFile
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -765,11 +768,11 @@ METHOD PROCEDURE Check() CLASS HBBlat
// cAlternateTextFile - optional
IF HB_ISSTRING( ::cAlternateTextFile )
IF !hb_FileExists( ::cAlternateTextFile )
IF ! hb_FileExists( ::cAlternateTextFile )
::nError := BLAT_ERR_MISSING_ALTERNATETEXTFILE
::cError := ::TranslateBlatError( BLAT_ERR_MISSING_ALTERNATETEXTFILE ) + ": " + ::cAlternateTextFile
AAdd( ::aErrors, { ::nError, ::cError } )
IF !::lIgnoreErrors
IF ! ::lIgnoreErrors
RETURN
ENDIF
ELSE
@@ -898,8 +901,6 @@ METHOD PROCEDURE Check() CLASS HBBlat
ENDIF
//--------------------------------------------------
// Check done
::lChecked := .T.
@@ -908,9 +909,11 @@ METHOD PROCEDURE Check() CLASS HBBlat
RETURN
METHOD GetCommand() CLASS HBBlat
IF !::lChecked
IF ! ::lChecked
::Check()
ENDIF
RETURN ::cCommand
METHOD Error() CLASS HBBlat
@@ -929,32 +932,32 @@ METHOD BlatErrorString() CLASS HBBlat
RETURN ::cBlatError
METHOD TranslateBlatError( nErr ) CLASS HBBlat
LOCAL cError, nPos
// TODO: add function that returns language error array
LOCAL aErrors := { ;
{ BLAT_ERR_UNKNONW , BLAT_TEXT_ERR_UNKNOWN } ,;
{ BLAT_SUCCESS , BLAT_TEXT_SUCCESS } ,;
{ BLAT_ERR_MESSAGE_NOT_ACCEPTED , BLAT_TEXT_ERR_MESSAGE_NOT_ACCEPTED } ,;
{ BLAT_ERR_MISSING_FROM , BLAT_TEXT_ERR_MISSING_FROM } ,;
{ BLAT_ERR_MISSING_TO , BLAT_TEXT_ERR_MISSING_TO } ,;
{ BLAT_ERR_MISSING_TOFILE , BLAT_TEXT_ERR_MISSING_TOFILE } ,;
{ BLAT_ERR_MISSING_BODY , BLAT_TEXT_ERR_MISSING_BODY } ,;
{ BLAT_ERR_MISSING_BODYFILE , BLAT_TEXT_ERR_MISSING_BODYFILE } ,;
{ BLAT_ERR_MISSING_SERVERSMTP , BLAT_TEXT_ERR_MISSING_SERVERSMTP } ,;
{ BLAT_ERR_MISSING_SUBJECTFILE , BLAT_TEXT_ERR_MISSING_SUBJECTFILE } ,;
{ BLAT_ERR_MISSING_CCFILE , BLAT_TEXT_ERR_MISSING_CCFILE } ,;
{ BLAT_ERR_MISSING_BCCFILE , BLAT_TEXT_ERR_MISSING_BCCFILE } ,;
{ BLAT_ERR_MISSING_PSFILE , BLAT_TEXT_ERR_MISSING_PSFILE } ,;
{ BLAT_ERR_MISSING_ATTACHLISTBINFILE , BLAT_TEXT_ERR_MISSING_ATTACHLISTBINFILE } ,;
{ BLAT_ERR_MISSING_ATTACHLISTTEXTFILE , BLAT_TEXT_ERR_MISSING_ATTACHLISTTEXTFILE } ,;
{ BLAT_ERR_MISSING_ATTACHLISTEMBEDDEDFILE , BLAT_TEXT_ERR_MISSING_ATTACHLISTEMBEDDEDFILE } ,;
{ BLAT_ERR_MISSING_ALTERNATETEXTFILE , BLAT_TEXT_ERR_MISSING_ALTERNATETEXTFILE } ,;
{ BLAT_ERR_MISSING_SIGNATUREFILE , BLAT_TEXT_ERR_MISSING_SIGNATUREFILE } ,;
{ BLAT_ERR_MISSING_TAGFILE , BLAT_TEXT_ERR_MISSING_TAGFILE } ,;
{ BLAT_ERR_WRONG_DSN , BLAT_TEXT_ERR_WRONG_DSN } ,;
{ BLAT_ERR_LOGICAL_EXPECTED , BLAT_TEXT_ERR_LOGICAL_EXPECTED } ,;
{ BLAT_ERR_STRING_EXPECTED , BLAT_TEXT_ERR_STRING_EXPECTED } ;
}
{ BLAT_ERR_UNKNONW , BLAT_TEXT_ERR_UNKNOWN }, ;
{ BLAT_SUCCESS , BLAT_TEXT_SUCCESS }, ;
{ BLAT_ERR_MESSAGE_NOT_ACCEPTED , BLAT_TEXT_ERR_MESSAGE_NOT_ACCEPTED }, ;
{ BLAT_ERR_MISSING_FROM , BLAT_TEXT_ERR_MISSING_FROM }, ;
{ BLAT_ERR_MISSING_TO , BLAT_TEXT_ERR_MISSING_TO }, ;
{ BLAT_ERR_MISSING_TOFILE , BLAT_TEXT_ERR_MISSING_TOFILE }, ;
{ BLAT_ERR_MISSING_BODY , BLAT_TEXT_ERR_MISSING_BODY }, ;
{ BLAT_ERR_MISSING_BODYFILE , BLAT_TEXT_ERR_MISSING_BODYFILE }, ;
{ BLAT_ERR_MISSING_SERVERSMTP , BLAT_TEXT_ERR_MISSING_SERVERSMTP }, ;
{ BLAT_ERR_MISSING_SUBJECTFILE , BLAT_TEXT_ERR_MISSING_SUBJECTFILE }, ;
{ BLAT_ERR_MISSING_CCFILE , BLAT_TEXT_ERR_MISSING_CCFILE }, ;
{ BLAT_ERR_MISSING_BCCFILE , BLAT_TEXT_ERR_MISSING_BCCFILE }, ;
{ BLAT_ERR_MISSING_PSFILE , BLAT_TEXT_ERR_MISSING_PSFILE }, ;
{ BLAT_ERR_MISSING_ATTACHLISTBINFILE , BLAT_TEXT_ERR_MISSING_ATTACHLISTBINFILE }, ;
{ BLAT_ERR_MISSING_ATTACHLISTTEXTFILE , BLAT_TEXT_ERR_MISSING_ATTACHLISTTEXTFILE }, ;
{ BLAT_ERR_MISSING_ATTACHLISTEMBEDDEDFILE , BLAT_TEXT_ERR_MISSING_ATTACHLISTEMBEDDEDFILE }, ;
{ BLAT_ERR_MISSING_ALTERNATETEXTFILE , BLAT_TEXT_ERR_MISSING_ALTERNATETEXTFILE }, ;
{ BLAT_ERR_MISSING_SIGNATUREFILE , BLAT_TEXT_ERR_MISSING_SIGNATUREFILE }, ;
{ BLAT_ERR_MISSING_TAGFILE , BLAT_TEXT_ERR_MISSING_TAGFILE }, ;
{ BLAT_ERR_WRONG_DSN , BLAT_TEXT_ERR_WRONG_DSN }, ;
{ BLAT_ERR_LOGICAL_EXPECTED , BLAT_TEXT_ERR_LOGICAL_EXPECTED }, ;
{ BLAT_ERR_STRING_EXPECTED , BLAT_TEXT_ERR_STRING_EXPECTED } }
nPos := AScan( aErrors, {| e | e[ 1 ] == nErr }, 2 )
IF nPos == 0
@@ -981,6 +984,7 @@ METHOD TranslateBlatError( nErr ) CLASS HBBlat
RETURN cError
STATIC FUNCTION ArrayToString( aArray )
LOCAL cString := ""
LOCAL nLen := Len( aArray )
LOCAL cElem

View File

@@ -67,29 +67,38 @@ THREAD STATIC t_nErrorMaj := 0
THREAD STATIC t_nErrorMin := 0
PROCEDURE HB_BLIVERNUM( cString )
IF HB_ISSTRING( cString )
s_cSerialNum := cString
ENDIF
RETURN
PROCEDURE HB_BLIDEMDTE( dDate )
IF HB_ISDATE( dDate )
s_cDemoDate := DToS( dDate )
ENDIF
RETURN
PROCEDURE HB_BLIDEMMIN( nValue )
IF HB_ISNUMERIC( nValue )
s_nDemoMinutes := nValue
ENDIF
RETURN
FUNCTION BLIDBGHAN( nValue )
STATIC s_nDebugHandle := 1
LOCAL nOldValue := s_nDebugHandle
IF HB_ISNUMERIC( nValue )
s_nDebugHandle := nValue
ENDIF
RETURN nOldValue
FUNCTION BLIDEMDTE()
@@ -99,14 +108,19 @@ FUNCTION BLIDEMDTEBAS()
RETURN s_cDemoDate
FUNCTION BLIDEMMIN( nValue )
LOCAL nOldValue := s_nDemoMinutes
IF HB_ISNUMERIC( nValue )
s_nDemoMinutes := nValue
ENDIF
RETURN nOldValue
PROCEDURE BLIDISFRG( fhnd )
HB_SYMBOL_UNUSED( fhnd )
RETURN
FUNCTION BLIERRNUM()
@@ -127,27 +141,36 @@ FUNCTION BLIFUNHAN( pLib, cFunction )
RETURN hb_hrbGetFunSym( pLib, cFunction )
FUNCTION BLIFUNCAL( ... )
LOCAL aParams := hb_AParams()
LOCAL pFunction
IF Len( aParams ) > 0
pFunction := ATail( aParams )
ASize( aParams, Len( aParams ) - 1 )
RETURN hb_hrbDo( pFunction, hb_arrayToParams( aParams ) )
RETURN hb_hrbDo( pFunction, hb_ArrayToParams( aParams ) )
ENDIF
RETURN NIL
PROCEDURE BLILIBFRE( pLib )
hb_hrbUnLoad( pLib )
hb_hrbUnload( pLib )
RETURN
PROCEDURE BLILIBOVR( lValue )
IF HB_ISLOGICAL( lValue )
s_lLibOverrides := lValue
ENDIF
RETURN
PROCEDURE BLILSTFRG( fhnd )
HB_SYMBOL_UNUSED( fhnd )
RETURN
FUNCTION BLIMEMAVL()
@@ -157,15 +180,20 @@ FUNCTION BLIMEMSIZ()
RETURN Memory( HB_MEM_CHAR )
FUNCTION BLIMEMBLK( nBlockSize )
HB_SYMBOL_UNUSED( nBlockSize )
RETURN Memory( HB_MEM_CHAR )
FUNCTION BLIMEMPAK( nValue )
STATIC s_nGCFrequency := 0
LOCAL nOldValue := s_nDemoMinutes
IF HB_ISNUMERIC( nValue )
s_nGCFrequency := nValue
ENDIF
RETURN nOldValue
FUNCTION BLIMEMUSE()
@@ -184,7 +212,9 @@ FUNCTION BLIOVLSIZ()
RETURN 0
PROCEDURE BLIOVLSUS( nValue )
HB_SYMBOL_UNUSED( nValue )
RETURN
FUNCTION BLIPTRDEC( nPointer, nValue )
@@ -200,16 +230,19 @@ FUNCTION BLISERNUMBAS()
RETURN s_cSerialNum
FUNCTION BLISTRFRG( cString )
HB_SYMBOL_UNUSED( cString )
RETURN ""
FUNCTION BLIVERNUM()
RETURN 700
FUNCTION BLICPUREL()
RETURN hb_releaseCPU()
RETURN hb_ReleaseCPU()
FUNCTION BLIMGRSTS( nParam )
SWITCH nParam
CASE BliCacheLoc ; RETURN BliCacheNone
CASE BliCacheSize ; RETURN 0
@@ -221,32 +254,45 @@ FUNCTION BLIMGRSTS( nParam )
CASE BliRealMemAvail ; RETURN Memory( HB_MEM_CHAR )
CASE BliVirMemAvail ; RETURN 0
ENDSWITCH
RETURN 0
FUNCTION SWPADDENV( nBytes )
HB_SYMBOL_UNUSED( nBytes )
RETURN 32768
FUNCTION SWPADDSTR( cPID, cString )
HB_SYMBOL_UNUSED( cPID )
HB_SYMBOL_UNUSED( cString )
RETURN 1
FUNCTION SWPADDSTRBAS( cPID, cString )
HB_SYMBOL_UNUSED( cPID )
HB_SYMBOL_UNUSED( cString )
RETURN 1
FUNCTION SWPCURDIR( lValue )
HB_SYMBOL_UNUSED( lValue )
RETURN .T.
FUNCTION SWPDISMSG( lValue )
HB_SYMBOL_UNUSED( lValue )
RETURN .F.
FUNCTION SWPEMS320( lValue )
HB_SYMBOL_UNUSED( lValue )
RETURN .F.
FUNCTION SWPERRLEV()
@@ -259,75 +305,100 @@ FUNCTION SWPERRMIN()
RETURN t_nErrorMin
FUNCTION SWPFREEMS( nLimitKB )
HB_SYMBOL_UNUSED( nLimitKB )
RETURN 0
FUNCTION SWPUSEEMS( lValue )
HB_SYMBOL_UNUSED( lValue )
RETURN .F.
FUNCTION SWPFREXMS( nLimitKB )
HB_SYMBOL_UNUSED( nLimitKB )
RETURN 0
FUNCTION SWPUSEXMS( lValue )
HB_SYMBOL_UNUSED( lValue )
RETURN .F.
FUNCTION SWPUSEUMB( lValue )
HB_SYMBOL_UNUSED( lValue )
RETURN .F.
FUNCTION SWPGETKEY( lValue )
HB_SYMBOL_UNUSED( lValue )
RETURN .F.
FUNCTION SWPGETPID( cIDString )
HB_SYMBOL_UNUSED( cIDString )
RETURN .F.
FUNCTION SWPVIDMDE( lValue )
HB_SYMBOL_UNUSED( lValue )
RETURN .F.
FUNCTION SWPGETSTR()
RETURN ""
FUNCTION SWPKEYBRD( cKeyString )
HB_SYMBOL_UNUSED( cKeyString )
RETURN 0
FUNCTION SWPKEYBRDBAS( cKeyString )
HB_SYMBOL_UNUSED( cKeyString )
RETURN 0
FUNCTION SWPKEYCLR( nValue )
HB_SYMBOL_UNUSED( nValue )
RETURN 0
FUNCTION SWPNOBOOT( lValue )
HB_SYMBOL_UNUSED( lValue )
RETURN .F.
FUNCTION SWPRUNCMD( cCommand, nMem, cRunPath, cTempPath )
LOCAL cShell
HB_SYMBOL_UNUSED( nMem )
HB_SYMBOL_UNUSED( cRunPath )
HB_SYMBOL_UNUSED( cTempPath )
#if defined( __PLATFORM__UNIX )
cShell := hb_GetEnv( "SHELL" )
#else
cShell := hb_GetEnv( "COMSPEC" )
#endif
#if defined( __PLATFORM__UNIX )
cShell := hb_GetEnv( "SHELL" )
#else
cShell := hb_GetEnv( "COMSPEC" )
#endif
IF ! Empty( cShell )
#if defined( __PLATFORM__UNIX )
cCommand := cShell + " " + cCommand
#else
cCommand := cShell + " /c " + cCommand
#endif
#if defined( __PLATFORM__UNIX )
cCommand := cShell + " " + cCommand
#else
cCommand := cShell + " /c " + cCommand
#endif
ENDIF
t_nErrorLevel := hb_run( cCommand )
@@ -335,6 +406,7 @@ FUNCTION SWPRUNCMD( cCommand, nMem, cRunPath, cTempPath )
RETURN .T.
FUNCTION SWPSETENV( cString )
LOCAL cPair
LOCAL tmp
@@ -350,17 +422,25 @@ FUNCTION SWPSETENV( cString )
RETURN .T.
FUNCTION SWPSETPID( cIDString )
HB_SYMBOL_UNUSED( cIDString )
RETURN .T.
FUNCTION SWPSETPIDBAS( cIDString )
HB_SYMBOL_UNUSED( cIDString )
RETURN .T.
FUNCTION SWPSETSTR( cString )
HB_SYMBOL_UNUSED( cString )
RETURN .T.
FUNCTION SWPSETSTRBAS( cString )
HB_SYMBOL_UNUSED( cString )
RETURN .T.

View File

@@ -6,8 +6,8 @@
#include "hbcairo.ch"
PROCEDURE Main()
LOCAL hSurface
hSurface := cairo_pdf_surface_create( "fancytxt.pdf", 566.9, 793.7 ) // 200x280 mm in pt
@@ -18,10 +18,12 @@ PROCEDURE Main()
draw( hSurface )
cairo_surface_write_to_png( hSurface, "fancytxt.png" )
cairo_surface_destroy( hSurface )
RETURN
RETURN
PROC draw( hSurface )
PROCEDURE draw( hSurface )
LOCAL hCairo, hPath
hCairo := cairo_create( hSurface )
@@ -61,18 +63,19 @@ PROC draw( hSurface )
cairo_show_page( hCairo )
cairo_destroy( hCairo )
RETURN
RETURN
PROC map_path_onto( hCairo, hPath )
PROCEDURE map_path_onto( hCairo, hPath )
LOCAL hCurrentPath, aLengths, hIterator, nI, aPoints
hCurrentPath := cairo_copy_path( hCairo )
aLengths := path_lengths( hPath )
hIterator := cairo_path_iterator_create( hCurrentPath )
DO WHILE cairo_path_iterator_next( hIterator ) != NIL
IF LEN( aPoints := cairo_path_iterator_get_points( hIterator ) ) > 0
FOR nI := 1 TO LEN( aPoints )
IF Len( aPoints := cairo_path_iterator_get_points( hIterator ) ) > 0
FOR nI := 1 TO Len( aPoints )
transform_point( @aPoints[ nI, 1 ], @aPoints[ nI, 2 ], hPath, aLengths )
NEXT
cairo_path_iterator_set_points( hIterator, aPoints )
@@ -80,10 +83,12 @@ PROC map_path_onto( hCairo, hPath )
ENDDO
cairo_path_iterator_destroy( hIterator )
cairo_append_path( hCairo, hCurrentPath )
RETURN
RETURN
STATIC PROC transform_point( nX, nY, hPath, aLengths )
STATIC PROCEDURE transform_point( nX, nY, hPath, aLengths )
LOCAL hIterator, nI, nNX, nNY, nDX, nDY, nRatio, nType, aLast, aPoints, nK1, nK2
nNX := nX
@@ -107,34 +112,36 @@ STATIC PROC transform_point( nX, nY, hPath, aLengths )
IF nType == CAIRO_PATH_MOVE_TO
ELSEIF nType == CAIRO_PATH_LINE_TO
nRatio := nNX / aLengths[ nI ]
nX := aLast[ 1 ] * (1 - nRatio) + aPoints[ 1, 1 ] * nRatio
nY := aLast[ 2 ] * (1 - nRatio) + aPoints[ 1, 2 ] * nRatio
nX := aLast[ 1 ] * ( 1 - nRatio ) + aPoints[ 1, 1 ] * nRatio
nY := aLast[ 2 ] * ( 1 - nRatio ) + aPoints[ 1, 2 ] * nRatio
nDX := -(aLast[ 1 ] - aPoints[ 1, 1 ])
nDY := -(aLast[ 2 ] - aPoints[ 1, 2 ])
nDX := -( aLast[ 1 ] - aPoints[ 1, 1 ] )
nDY := -( aLast[ 2 ] - aPoints[ 1, 2 ] )
nRatio := nNY / aLengths[ nI ]
nX += -nDY * nRatio
nY += nDX * nRatio
ELSEIF nType == CAIRO_PATH_CURVE_TO
nX := aLast[ 1 ] * (1 - nRatio)^3 + 3 * aPoints[ 1, 1 ] * (1 - nRatio)^2 * nRatio + 3 * aPoints[ 2, 1 ] * (1 - nRatio) * nRatio^2 + aPoints[ 3, 1 ] * nRatio^3
nY := aLast[ 2 ] * (1 - nRatio)^3 + 3 * aPoints[ 1, 2 ] * (1 - nRatio)^2 * nRatio + 3 * aPoints[ 2, 2 ] * (1 - nRatio) * nRatio^2 + aPoints[ 3, 2 ] * nRatio^3
nX := aLast[ 1 ] * ( 1 - nRatio ) ^ 3 + 3 * aPoints[ 1, 1 ] * ( 1 - nRatio ) ^ 2 * nRatio + 3 * aPoints[ 2, 1 ] * ( 1 - nRatio ) * nRatio ^ 2 + aPoints[ 3, 1 ] * nRatio ^ 3
nY := aLast[ 2 ] * ( 1 - nRatio ) ^ 3 + 3 * aPoints[ 1, 2 ] * ( 1 - nRatio ) ^ 2 * nRatio + 3 * aPoints[ 2, 2 ] * ( 1 - nRatio ) * nRatio ^ 2 + aPoints[ 3, 2 ] * nRatio ^ 3
nK1 := 1 - 4 * nRatio + 3 * nRatio^2
nK2 := 2 * nRatio - 3 * nRatio^2
nK1 := 1 - 4 * nRatio + 3 * nRatio ^ 2
nK2 := 2 * nRatio - 3 * nRatio ^ 2
nDX := -3 * aLast[ 1 ] * (1 - nRatio)^2 + 3 * aPoints[ 1, 1 ] * nK1 + 3 * aPoints[ 2, 1 ] * nK2 + 3 * aPoints[ 3, 1 ] * nRatio^2
nDY := -3 * aLast[ 2 ] * (1 - nRatio)^2 + 3 * aPoints[ 1, 2 ] * nK1 + 3 * aPoints[ 2, 2 ] * nK2 + 3 * aPoints[ 3, 2 ] * nRatio^2
nDX := -3 * aLast[ 1 ] * ( 1 - nRatio ) ^ 2 + 3 * aPoints[ 1, 1 ] * nK1 + 3 * aPoints[ 2, 1 ] * nK2 + 3 * aPoints[ 3, 1 ] * nRatio ^ 2
nDY := -3 * aLast[ 2 ] * ( 1 - nRatio ) ^ 2 + 3 * aPoints[ 1, 2 ] * nK1 + 3 * aPoints[ 2, 2 ] * nK2 + 3 * aPoints[ 3, 2 ] * nRatio ^ 2
nRatio := nNY / SQRT( nDX * nDX + nDY * nDY )
nRatio := nNY / Sqrt( nDX * nDX + nDY * nDY )
nX += -nDY * nRatio
nY += nDX * nRatio
ENDIF
cairo_path_iterator_destroy( hIterator )
RETURN
RETURN
STATIC FUNC path_lengths( hPath )
LOCAL hIterator, nType, aLast, aRet, aPoints, nLen
aRet := {}
@@ -149,20 +156,22 @@ STATIC FUNC path_lengths( hPath )
aLast := aPoints[ 1 ]
ELSEIF nType == CAIRO_PATH_CURVE_TO
nLen := curve_length( aLast[ 1 ], aLast[ 2 ], aPoints[ 1, 1 ], aPoints[ 1, 2 ], ;
aPoints[ 2, 1 ], aPoints[ 2, 2 ], aPoints[ 3, 1 ], aPoints[ 3, 2 ] )
aPoints[ 2, 1 ], aPoints[ 2, 2 ], aPoints[ 3, 1 ], aPoints[ 3, 2 ] )
aLast := aPoints[ 3 ]
ENDIF
AADD( aRet, nLen )
AAdd( aRet, nLen )
ENDDO
cairo_path_iterator_destroy( hIterator )
RETURN aRet
RETURN aRet
STATIC FUNC distance( nX1, nY1, nX2, nY2 )
RETURN sqrt( (nX1-nX2)^2 + (nY1-nY2)^2 )
RETURN Sqrt( ( nX1 - nX2 ) ^ 2 + ( nY1 - nY2 ) ^ 2 )
STATIC FUNC curve_length( nX1, nY1, nX2, nY2, nX3, nY3, nX4, nY4 )
LOCAL nLength := 0, hSurface, hCairo, hPath, hIterator, nType, aLast, aPoints
hSurface := cairo_image_surface_create( CAIRO_FORMAT_A8, 0, 0 )
@@ -183,4 +192,5 @@ STATIC FUNC curve_length( nX1, nY1, nX2, nY2, nX3, nY3, nX4, nY4 )
cairo_path_destroy( hPath )
cairo_destroy( hCairo )
cairo_surface_destroy( hSurface )
RETURN nLength
RETURN nLength

View File

@@ -7,6 +7,7 @@
#include "hbcairo.ch"
PROCEDURE Main()
LOCAL hSurface, hCairo
hSurface := cairo_pdf_surface_create( "glyphdbg.pdf", 566.9, 793.7 ) // 200x280 mm in pt
@@ -27,15 +28,17 @@ PROCEDURE Main()
cairo_show_page( hCairo )
cairo_destroy( hCairo )
cairo_surface_destroy( hSurface )
RETURN
RETURN
PROC path_debug( hCairo, nTolerance )
PROCEDURE path_debug( hCairo, nTolerance )
LOCAL hPath, hIterator, nType, aPoints
cairo_save( hCairo )
IF EMPTY( nTolerance )
IF Empty( nTolerance )
hPath := cairo_copy_path( hCairo )
ELSE
cairo_save( hCairo )
@@ -81,4 +84,5 @@ PROC path_debug( hCairo, nTolerance )
cairo_stroke( hCairo )
cairo_path_destroy( hPath )
cairo_restore( hCairo )
RETURN
RETURN

View File

@@ -11,9 +11,10 @@
REQUEST HB_CODEPAGE_LTWIN
PROCEDURE Main()
LOCAL hSurface, hCairo, nI
HB_CDPSELECT("LTWIN")
hb_cdpSelect( "LTWIN" )
hSurface := cairo_pdf_surface_create( "hellow.pdf", 566.9, 793.7 ) // 200x280 mm in pt
hCairo := cairo_create( hSurface )
@@ -26,7 +27,7 @@ PROCEDURE Main()
cairo_set_line_width( hCairo, 1 )
FOR nI := 1 TO 10
cairo_set_source_rgb( hCairo, HB_RANDOM(), HB_RANDOM(), HB_RANDOM() )
cairo_set_source_rgb( hCairo, hb_Random(), hb_Random(), hb_Random() )
cairo_rectangle( hCairo, 100 + nI * 5, 50 + nI * 5, 100, 70 )
cairo_stroke( hCairo )
NEXT
@@ -41,4 +42,5 @@ PROCEDURE Main()
cairo_show_page( hCairo )
cairo_destroy( hCairo )
cairo_surface_destroy( hSurface )
RETURN
RETURN

View File

@@ -6,8 +6,8 @@
#include "hbcairo.ch"
PROCEDURE Main()
LOCAL hSurface, hCairo, nI
hSurface := cairo_pdf_surface_create( "lightning.pdf", 566.9, 793.7 ) // 200x280 mm in pt
@@ -15,18 +15,20 @@ PROCEDURE Main()
// 20 pages
FOR nI := 1 TO 20
cairo_set_source_rgb( hCairo, 0, 0, 0 )
cairo_paint( hCairo )
cairo_set_source_rgb( hCairo, 1, 0.7, 1 )
DrawLightning( hCairo, 250, 50, 700, 3 )
cairo_show_page( hCairo )
cairo_set_source_rgb( hCairo, 0, 0, 0 )
cairo_paint( hCairo )
cairo_set_source_rgb( hCairo, 1, 0.7, 1 )
DrawLightning( hCairo, 250, 50, 700, 3 )
cairo_show_page( hCairo )
NEXT
cairo_destroy( hCairo )
cairo_surface_destroy( hSurface )
RETURN
RETURN
PROC DrawLightning( hCairo, nX, nY, nLen, nW, nInit )
PROCEDURE DrawLightning( hCairo, nX, nY, nLen, nW, nInit )
LOCAL nI, nK, nW0, nX2
cairo_move_to( hCairo, nX, nY )
@@ -36,29 +38,30 @@ PROC DrawLightning( hCairo, nX, nY, nLen, nW, nInit )
ENDIF
nK := 0
FOR nI := 1 TO nLen
// AR(1) process
nInit := nInit * 0.9 + (hb_random() - 0.5)
// ARIMA(1, 1, 0) process
nK += nInit
// ARIMA(1, 1, 0) + white noise
nX2 := nX + nK + hb_random()
cairo_line_to( hCairo, nX2, nI + nY )
nW -= 0.003
IF nW < nW0 - 0.1
cairo_set_line_width( hCairo, nW0 )
cairo_stroke( hCairo )
cairo_move_to( hCairo, nX2, nI + nY )
nW0 := nW
ENDIF
// Branch
IF ABS(nInit) > 1.6
cairo_set_line_width( hCairo, nW0 )
cairo_stroke( hCairo )
DrawLightning( hCairo, nX2, nI + nY, INT((nLen - nI) / 2), nW / 2, nInit * 0.5 )
nInit *= -0.3
cairo_move_to( hCairo, nX2, nI + nY )
ENDIF
// AR(1) process
nInit := nInit * 0.9 + ( hb_Random() - 0.5 )
// ARIMA(1, 1, 0) process
nK += nInit
// ARIMA(1, 1, 0) + white noise
nX2 := nX + nK + hb_Random()
cairo_line_to( hCairo, nX2, nI + nY )
nW -= 0.003
IF nW < nW0 - 0.1
cairo_set_line_width( hCairo, nW0 )
cairo_stroke( hCairo )
cairo_move_to( hCairo, nX2, nI + nY )
nW0 := nW
ENDIF
// Branch
IF Abs( nInit ) > 1.6
cairo_set_line_width( hCairo, nW0 )
cairo_stroke( hCairo )
DrawLightning( hCairo, nX2, nI + nY, Int( ( nLen - nI ) / 2 ), nW / 2, nInit * 0.5 )
nInit *= -0.3
cairo_move_to( hCairo, nX2, nI + nY )
ENDIF
NEXT
cairo_set_line_width( hCairo, nW0 )
cairo_stroke( hCairo )
RETURN
RETURN

View File

@@ -6,20 +6,20 @@
#include "hbcairo.ch"
PROCEDURE Main()
LOCAL hSurface, hCairo
FIELD CODE, NAME, RESIDENTS
// Create database
DBCREATE( "country", {{"CODE", "C", 3, 0}, {"NAME", "C", 30, 0}, {"RESIDENTS", "N", 10, 0}},, .T. )
DBAPPEND(); CODE := "LTU"; NAME := "Lithuania"; RESIDENTS := 3369600
DBAPPEND(); CODE := "USA"; NAME := "United States of America"; RESIDENTS := 305397000
DBAPPEND(); CODE := "POR"; NAME := "Portugal"; RESIDENTS := 10617600
DBAPPEND(); CODE := "POL"; NAME := "Poland"; RESIDENTS := 38115967
DBAPPEND(); CODE := "AUS"; NAME := "Australia"; RESIDENTS := 21446187
DBAPPEND(); CODE := "FRA"; NAME := "France"; RESIDENTS := 64473140
DBAPPEND(); CODE := "RUS"; NAME := "Russia"; RESIDENTS := 141900000
dbCreate( "country", { { "CODE", "C", 3, 0 }, { "NAME", "C", 30, 0 }, { "RESIDENTS", "N", 10, 0 } },, .T. )
dbAppend(); CODE := "LTU"; NAME := "Lithuania"; RESIDENTS := 3369600
dbAppend(); CODE := "USA"; NAME := "United States of America"; RESIDENTS := 305397000
dbAppend(); CODE := "POR"; NAME := "Portugal"; RESIDENTS := 10617600
dbAppend(); CODE := "POL"; NAME := "Poland"; RESIDENTS := 38115967
dbAppend(); CODE := "AUS"; NAME := "Australia"; RESIDENTS := 21446187
dbAppend(); CODE := "FRA"; NAME := "France"; RESIDENTS := 64473140
dbAppend(); CODE := "RUS"; NAME := "Russia"; RESIDENTS := 141900000
// Draw
hSurface := cairo_pdf_surface_create( "table.pdf", 566.9, 793.7 ) // 200x280 mm in pt
@@ -32,16 +32,18 @@ PROCEDURE Main()
cairo_move_to( hCairo, 50, 50 )
cairo_show_text( hCairo, "Table of countries" )
draw_table( hCairo, 50, 75, {{"Code", "CODE"}, {"Country", "NAME"}, {"Residents", "RESIDENTS"}} )
draw_table( hCairo, 50, 75, { { "Code", "CODE" }, { "Country", "NAME" }, { "Residents", "RESIDENTS" } } )
cairo_show_page( hCairo )
cairo_destroy( hCairo )
cairo_surface_destroy( hSurface )
DBCLOSEALL()
RETURN
dbCloseAll()
RETURN
STATIC PROC draw_table( hCairo, nX, nY, aCol )
STATIC PROCEDURE draw_table( hCairo, nX, nY, aCol )
LOCAL nI, aWidth, nDX, nW, xValue
cairo_save( hCairo )
@@ -50,61 +52,61 @@ STATIC PROC draw_table( hCairo, nX, nY, aCol )
cairo_set_source_rgb( hCairo, 0, 0, 0 )
cairo_set_line_width( hCairo, 1 )
DBGOTOP()
aWidth := ARRAY( LEN( aCol ) )
FOR nI := 1 TO LEN( aCol )
aWidth[ nI ] := cairo_text_extents( hCairo, REPLICATE( "9", FIELDLEN( FIELDPOS( aCol[ nI, 2 ] ) ) ) )[ 5 ]
aWidth[ nI ] := MAX( aWidth[ nI ], cairo_text_extents( hCairo, aCol[ nI, 1 ] )[ 5 ] ) + 20
dbGoTop()
aWidth := Array( Len( aCol ) )
FOR nI := 1 TO Len( aCol )
aWidth[ nI ] := cairo_text_extents( hCairo, Replicate( "9", FieldLen( FieldPos( aCol[ nI, 2 ] ) ) ) )[ 5 ]
aWidth[ nI ] := Max( aWidth[ nI ], cairo_text_extents( hCairo, aCol[ nI, 1 ] )[ 5 ] ) + 20
NEXT
nW := 0
AEVAL( aWidth, {| X | nW += X } )
AEval( aWidth, {| X | nW += X } )
cairo_move_to( hCairo, nX, nY )
cairo_rel_line_to( hCairo, nW, 0 )
cairo_stroke( hCairo )
nDX := nX
FOR nI := 1 TO LEN( aCol )
cairo_move_to( hCairo, nDX + aWidth[ nI ] / 2, nY + 10 )
show_text_center( hCairo, aCol[ nI, 1 ] )
nDX += aWidth[ nI ]
IF nI < LEN( aCol )
cairo_move_to( hCairo, nDX, nY )
cairo_rel_line_to( hCairo, 0, 13 )
cairo_stroke( hCairo )
ENDIF
FOR nI := 1 TO Len( aCol )
cairo_move_to( hCairo, nDX + aWidth[ nI ] / 2, nY + 10 )
show_text_center( hCairo, aCol[ nI, 1 ] )
nDX += aWidth[ nI ]
IF nI < Len( aCol )
cairo_move_to( hCairo, nDX, nY )
cairo_rel_line_to( hCairo, 0, 13 )
cairo_stroke( hCairo )
ENDIF
NEXT
nY += 13
cairo_move_to( hCairo, nX, nY )
cairo_rel_line_to( hCairo, nW, 0 )
cairo_stroke( hCairo )
DO WHILE ! EOF()
DO WHILE ! Eof()
nDX := nX
FOR nI := 1 TO LEN( aCol )
xValue := FIELDGET( FIELDPOS( aCol[ nI, 2 ] ) )
SWITCH VALTYPE( xValue )
CASE "C"
cairo_move_to( hCairo, nDX + 10, nY + 10 )
cairo_show_text( hCairo, xValue )
EXIT
CASE "N"
cairo_move_to( hCairo, nDX + aWidth[ nI ] - 10, nY + 10 )
show_text_right( hCairo, STR( xValue ) )
EXIT
CASE "D"
cairo_move_to( hCairo, nDX + 10, nY + 10 )
show_text_right( hCairo, DTOC( xValue ) )
EXIT
ENDSWITCH
nDX += aWidth[ nI ]
IF nI < LEN( aCol )
cairo_move_to( hCairo, nDX, nY )
cairo_rel_line_to( hCairo, 0, 13 )
cairo_stroke( hCairo )
ENDIF
FOR nI := 1 TO Len( aCol )
xValue := FieldGet( FieldPos( aCol[ nI, 2 ] ) )
SWITCH ValType( xValue )
CASE "C"
cairo_move_to( hCairo, nDX + 10, nY + 10 )
cairo_show_text( hCairo, xValue )
EXIT
CASE "N"
cairo_move_to( hCairo, nDX + aWidth[ nI ] - 10, nY + 10 )
show_text_right( hCairo, Str( xValue ) )
EXIT
CASE "D"
cairo_move_to( hCairo, nDX + 10, nY + 10 )
show_text_right( hCairo, DToC( xValue ) )
EXIT
ENDSWITCH
nDX += aWidth[ nI ]
IF nI < Len( aCol )
cairo_move_to( hCairo, nDX, nY )
cairo_rel_line_to( hCairo, 0, 13 )
cairo_stroke( hCairo )
ENDIF
NEXT
DBSKIP()
dbSkip()
nY += 13
ENDDO
cairo_move_to( hCairo, nX, nY )
@@ -112,16 +114,21 @@ STATIC PROC draw_table( hCairo, nX, nY, aCol )
cairo_stroke( hCairo )
cairo_restore( hCairo )
RETURN
RETURN
STATIC PROC show_text_right( hCairo, cText )
STATIC PROCEDURE show_text_right( hCairo, cText )
cairo_rel_move_to( hCairo, - cairo_text_extents( hCairo, cText )[ 5 ], 0 )
cairo_show_text( hCairo, cText )
RETURN
RETURN
STATIC PROC show_text_center( hCairo, cText )
STATIC PROCEDURE show_text_center( hCairo, cText )
cairo_rel_move_to( hCairo, -0.5 * cairo_text_extents( hCairo, cText )[ 5 ], 0 )
cairo_show_text( hCairo, cText )
RETURN
RETURN

View File

@@ -56,6 +56,7 @@ STATIC s_hPort := { => }
STATIC s_hbcomm_mutex := hb_mutexCreate()
FUNCTION INIT_PORT( cPort, nBaud, nData, nParity, nStop, nBufferSize )
LOCAL nPort
LOCAL cOldPortName
LOCAL cParity
@@ -98,7 +99,7 @@ FUNCTION INIT_PORT( cPort, nBaud, nData, nParity, nStop, nBufferSize )
IF hb_comInit( nPort, nBaud, cParity, nData, nStop )
s_hPort[ nPort ] := cOldPortName
hb_mutexUnLock( s_hbcomm_mutex )
hb_mutexUnlock( s_hbcomm_mutex )
RETURN nPort
ELSE
hb_comClose( nPort )
@@ -109,7 +110,7 @@ FUNCTION INIT_PORT( cPort, nBaud, nData, nParity, nStop, nBufferSize )
hb_comSetDevice( nPort, cOldPortName )
ENDIF
hb_mutexUnLock( s_hbcomm_mutex )
hb_mutexUnlock( s_hbcomm_mutex )
RETURN 0
@@ -127,11 +128,14 @@ FUNCTION ISWORKING( nPort )
[vszakats] */
/* Fetch <nCount> chars into <cData> */
FUNCTION INCHR( nPort, nCount, /* @ */ cData )
cData := iif( HB_ISNUMERIC( nCount ), Space( nCount ), "" )
RETURN hb_comRecv( nPort, @cData, nCount )
/* Send out characters. Returns .T. if successful. */
FUNCTION OUTCHR( nPort, cData )
LOCAL nLen
DO WHILE hb_BLen( cData ) > 0
@@ -158,6 +162,7 @@ FUNCTION OUTBUFSIZE( nPort )
/* Close port and clear handle */
FUNCTION UNINT_PORT( nPort )
LOCAL lRetVal := .F.
hb_mutexLock( s_hbcomm_mutex )
@@ -173,6 +178,6 @@ FUNCTION UNINT_PORT( nPort )
ENDIF
ENDIF
hb_mutexUnLock( s_hbcomm_mutex )
hb_mutexUnlock( s_hbcomm_mutex )
RETURN lRetVal

View File

@@ -18,6 +18,7 @@ STATIC s_nHandle
STATIC s_lConnected := .F.
PROCEDURE Main()
LOCAL nOption
DO WHILE .T.
@@ -45,6 +46,7 @@ PROCEDURE Main()
RETURN
STATIC PROCEDURE FConnect()
LOCAL cCom := "COM1"
LOCAL nBaudeRate := 19200
LOCAL nDatabits := 8
@@ -65,11 +67,14 @@ STATIC PROCEDURE FConnect()
RETURN
STATIC PROCEDURE FDisconnect()
s_lConnected := .F.
UNINT_PORT( s_nHandle )
RETURN
STATIC PROCEDURE FSend()
LOCAL cToSend
ACCEPT "Enter string to send: " TO cToSend
@@ -83,6 +88,7 @@ STATIC PROCEDURE FSend()
RETURN
STATIC PROCEDURE FReceive()
LOCAL cReceive
LOCAL nSize

View File

@@ -39,7 +39,7 @@
$EXAMPLES$
// Add 32 to the ASCII value of the character at the last position
// in the string
? addascii( "SmitH", 32 ) // --> "Smith"
$TESTS$
addascii( "0000", 1, 1 ) == "1000"

View File

@@ -30,9 +30,9 @@
$DESCRIPTION$
<TODO: add a description, some examples and tests here>
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$

View File

@@ -8,19 +8,19 @@
$CATEGORY$
CT3 video functions
$ONELINER$
$SYNTAX$
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -30,7 +30,7 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -40,17 +40,17 @@
$CATEGORY$
CT3 video functions
$ONELINER$
$SYNTAX$
COLORTON( <cAttr> ) -> <nAttr>
$ARGUMENTS$
<cAttr> Designates the alphanumeric color attribute that is
converted in NN/NN or CC/CC form.
$RETURNS$
COLORTON() returns a number that corresponds to the combined numeric
color attribute.
$DESCRIPTION$
COLOR TO (N)umeric
The function changes an alphanumeric color attribute from NN/NN or
@@ -58,22 +58,22 @@
values are useful with the CA-Cl*pper Tools functions STRSCREEN(),
SCREENMIX(), SCREENATTR(), and the CA-Cl*pper commands
SAVE/RESTORE SCREEN.
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -83,42 +83,42 @@
$CATEGORY$
HBCT video functions
$ONELINER$
$SYNTAX$
NTOCOLOR( <nAttr>, [<lColorCode>] ) -> <cAttr>
$ARGUMENTS$
<nAttr> Designates the value for the combined numeric color
attributes.
<lColorCode> If designated as .F. or if the parameter is omitted,
NTOCOLOR() returns a string with a numeric color code.
When designated as .T., NTOCOLOR() returns a string with
the CA-Cl*pper alpha color coding.
$RETURNS$
NTOCOLOR() returns the designated color attribute in the NN/NN
or CC/CC form.
$DESCRIPTION$
NTOCOLOR() converts a color attribute returned from another function
in numeric form, into the alphanumeric data format. Use this
attribute in conjunction with the CA-Cl*pper SET COLOR TO command.
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -132,15 +132,15 @@
$SYNTAX$
ENHANCED() -> <cEmptyString>
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -164,15 +164,15 @@
$SYNTAX$
STANDARD() -> <cEmptyString>
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -196,15 +196,15 @@
$SYNTAX$
UNSELECTED() -> <cEmptyString>
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -12,15 +12,15 @@
$SYNTAX$
COUNTLEFT( <cString>, [<cSearch|nSearch>] ) -> nCount
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -44,15 +44,15 @@
$SYNTAX$
COUNTRIGHT( <cString>, [<cSearch|nSearch>] ) -> nCount
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -22,9 +22,9 @@
idea to call it once again explicitly somewhere at the beginning of
your program to check the initialization.
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -34,7 +34,7 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -58,9 +58,9 @@
to call it explicitly somewhere at the end of your program to make
sure that the deinitialization takes place.
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -70,6 +70,6 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/

View File

@@ -29,9 +29,9 @@
The last is the default behaviour and switches any argument error
throwing off.
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -41,7 +41,7 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -62,9 +62,9 @@
The CTCINIT() function initializes the C source part of the CT3
library. Do not call this function directly.
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -95,9 +95,9 @@
The CTCEXIT() function uninitializes the C part of the CT3 library.
Do not call this function directly.
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$

View File

@@ -19,9 +19,9 @@
Be aware that calls to this functions do _NOT_ affect the
calculation precision of the math functions at the moment.
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -31,7 +31,7 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -45,16 +45,16 @@
$SYNTAX$
GETPREC() -> nDigits
$ARGUMENTS$
$RETURNS$
nDigits digit count between 1 and 16
$DESCRIPTION$
Be aware that calls to this functions do _NOT_ affect the
calculation precision of the math functions at the moment.
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -64,6 +64,6 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/

View File

@@ -107,7 +107,7 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -142,7 +142,7 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -181,6 +181,6 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/

View File

@@ -12,15 +12,15 @@
$SYNTAX$
PADLEFT( <cString>, <nLength>, [<cChar|nChar>] ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -44,15 +44,15 @@
$SYNTAX$
PADRIGHT( <cString>, <nLength>, [<cChar|nChar>] ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -21,7 +21,7 @@
Within the CT3 functions, the following functions do not
change the length of a string passed as parameter while
transforming this string:
ADDASCII() BLANK() CHARADD()
CHARAND() CHARMIRR() CHARNOT()
CHAROR() CHARRELREP() CHARREPL()
@@ -31,18 +31,18 @@
REPLALL() REPLLEFT() REPLRIGHT()
TOKENLOWER() TOKENUPPER() WORDREPL()
WORDSWAP()
Thus, these functions allow to pass the string by reference [@] to
the function so that it may not be necessary to return the transformed
string. By calling CSETREF (.T.), the above mentioned functions return
the value .F. instead of the transformed string if the string is
passed by reference to the function.
The switch is turned off (.F.) by default.
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -81,18 +81,18 @@
current state of the switch
$DESCRIPTION$
CSETATMUPA determines how the following CT3 string functions
ATNUM() AFTERATNUM() BEFORATNUM()
ATREPL() NUMAT() ATADJUST()
WORDTOCHAR() WORDREPL()
perform their work. See the respective function documentation for a
further description how the switch influences these functions.
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -134,27 +134,27 @@
$DESCRIPTION$
In the following CT3 functions, strings are compared on a character
base:
ATADJUST() ATNUM() AFTERATNUM()
BEFOREATNUM() ATREPL() NUMAT()
STRDIFF()
With the SETATLIKE function, one can determine when characters are
considered to match within these functions. If CT_SETATLIKE_WILDCARD
is set (e.g. "?"), then "?" matches every other character.
<nMode> can be one of the following values that are defined
in ct.ch
Definition | Value
----------------------|------
CT_SETATLIKE_EXACT | 0
CT_SETATLIKE_WILDCARD | 1
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -166,6 +166,6 @@
$FILES$
Header is ct.ch, library is libct.
$SEEALSO$
$END$
*/

View File

@@ -12,15 +12,15 @@
$SYNTAX$
BOM( [<dDate>] ) -> dDateBeginOfMonth
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -44,15 +44,15 @@
$SYNTAX$
EOM( [<dDate>] ) -> dDateEndOfMonth
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -76,15 +76,15 @@
$SYNTAX$
BOQ( [<dDate>] ) -> dDateBeginOfQuarter
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -108,15 +108,15 @@
$SYNTAX$
EOQ( [<dDate>] ) -> dDateEndOfQuarter
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -140,15 +140,15 @@
$SYNTAX$
BOY( [<dDate>] ) -> dDateBeginOfYear
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -172,15 +172,15 @@
$SYNTAX$
EOY( [<dDate>] ) -> dDateEndOfYear
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -12,15 +12,15 @@
$SYNTAX$
CTODOW( <cName> ) -> nOrdinal
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -44,15 +44,15 @@
$SYNTAX$
CTOMONTH( <cName> ) -> nOrdinal
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -76,17 +76,17 @@
$SYNTAX$
DMY( [<dDate>][, <lMode>] ) -> cDateString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
Returns the date as a string in DD Month YY format. If lmode
is TRUE, a "." is inserted after the DD
TODO: add further documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -110,17 +110,17 @@
$SYNTAX$
MDY( [<dDate>] ) -> cDateString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
Returns the date as a string in Month DD, YY or Month DD, YYYY
If dDate is NULL, the system date is used
TODO: add further documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -144,15 +144,15 @@
$SYNTAX$
ADDMONTH( [<dDate>,] <nMonths> ) -> dShiftedDate
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -162,7 +162,7 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -176,17 +176,17 @@
$SYNTAX$
DMY( [<dDate>] ) -> nDayOfYear
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
Determines the day of the year for a specific date
if dDate is invalid, returns 0
TODO: add further documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -196,7 +196,7 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -210,15 +210,15 @@
$SYNTAX$
ISLEAP( [<dDate>] ) -> lIsLeap
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add further documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -228,7 +228,7 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -242,17 +242,17 @@
$SYNTAX$
DAYSTOMONTH( <nMonth>, <lLeapYear> ) -> nDaysToMonth
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
lLeap is FALSE for a non-leap year but TRUE if it is. If so and nMonth
is greater than 2, ndays is incremented
TODO: add further documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -276,15 +276,15 @@
$SYNTAX$
DAYSINMONTH (<nMonth>, <lLeapYear>) -> nDaysInMonth
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -308,17 +308,17 @@
$SYNTAX$
QUARTER( [<dDate>] ) -> nQuarter
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
Returns a number equal to the quarter in which ddate
falls. If ddate is empty, the system date is employed.
TODO: add further documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -328,7 +328,7 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -342,18 +342,18 @@
$SYNTAX$
LASTDAYOM( [<dDate|nMonth>] ) -> nDaysInMonth
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
<dDate|nMonth> can be a date or a month number. If empty uses the
system date. If nMonth is a 2, lastdayom() will not know if it
is a leap year or not. If dDate is invalid, returns 0
TODO: add further documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -377,15 +377,15 @@
$SYNTAX$
NTOCDOW( <nDay> ) -> cDay
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -409,15 +409,15 @@
$SYNTAX$
NTOCMONTH( <nMonth> ) -> cMonth
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -441,9 +441,9 @@
$SYNTAX$
WEEK( [<dDate>][, <lSWN>] ) -> nWeek
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
Returns the calendar week a number. If no date is specified,
the system date is used. An empty date via hb_SToD("")
@@ -457,9 +457,9 @@
will be calculated
TODO: add further documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -469,6 +469,6 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/

View File

@@ -24,9 +24,9 @@
the <nDelay> parameter in 1/100th seconds. Subsequently, the function
can be implemented without a parameter for additional loop conditions.
It returns .T., as long as the designated time span has not yet run out.
Note
The function notes the status of the internal timer at
initialization. From that point on, the initialization should always
precede the respective DO WHILE; otherwise, the time delay is
@@ -34,13 +34,13 @@
is taken into account.
$EXAMPLES$
Run a loop for 5 seconds:
WAITPERIOD( 500 ) // Initialization, 5 seconds
DO WHILE <cond1> .AND. <cond2> .AND. WAITPERIOD()
*...
ENDDO
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -50,7 +50,7 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -74,9 +74,9 @@
check time inputs was unavoidable up to now. TIMEVALID() permits
Complete checking of a time designation. You can use this FUNCTION
effectively with a VALID clause within a READ mask.
Note
Note the format for time designations. There must always be
two digits for hours, minutes, seconds, and hundredths; otherwise,
the time it is regarded as invalid. Valid examples are "12",
@@ -88,21 +88,21 @@
$EXAMPLES$
Using the VALID clause with TRIM, all valid times are
accepted, even IF no seconds or minutes are specIFied:
cBegin := SPACE( 11 )
@ 5, 10 SAY "Please input time for beginning work:";
GET cBegin VALID TIMEVALID( RTRIM( cBegin ) )
READ
Using a VALID clause without TRIM, hours and minutes must be
specified, so that TIMEVALID() can confirm a valid time:
cBegin := SPACE( 5 )
@ 5, 10 SAY "Please input time for beginning work:";
GET cBegin VALID TIMEVALID( cBegin )
READ
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -128,7 +128,7 @@
$ARGUMENTS$
<cTime> Designates a character string that contains the time that
is to become the system time.
<lMode> Designates whether the time should also be set in the
CMOS-RAM of an AT. The default is do not write to CMOS-RAM. Note that in
Windows platform this adjust is automatic, therefore this parameter is
@@ -142,19 +142,19 @@
$EXAMPLES$
Set the system time in each case; but the hardware clock only
on an AT:
cNewTime := "10:20:00"
IF ISAT()
SETTIME( cNewTime, .T. )
ELSE
SETTIME( cNewTime )
ENDIF
Or, more compactly:
SETTIME( cNewTime, ISAT() )
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -179,7 +179,7 @@
SETDATE( <dDate>, [<lMode>] ) --> lSet
$ARGUMENTS$
<dDate> Designates which date to use to set the system date.
<lMode> Designates whether the date should also be set in the CMOS-
RAM of an AT. The default is do not write (.F.). Note that in Windows
plataform this adjust is automatic, therefore this parameter is without
@@ -193,19 +193,19 @@
$EXAMPLES$
Set the system date in each case; but the hardware clock only
on an AT:
dNewDate := SToD( "19910730" )
IF ISAT()
SETDATE( dNewDate, .T. )
ELSE
SETDATE( dNewDate )
ENDIF
Or, more compactly:
SETDATE( dNewDate, ISAT() )
$TESTS$
$STATUS$
Ready
$COMPLIANCE$

View File

@@ -18,19 +18,19 @@
$DESCRIPTION$
This function supplements EXPONENT() to return the mantissa of the
<nFloatingPointNumber> number.
Note: The mantissa value can be 0 or in the range of 1 to 2.
The following calculation reproduces the original value:
MANTISSA( <nFloatingPointNumber> ) * 2 ^ EXPONENT( <nFloatingPointNumber> ) =
<nFloatingPointNumber>
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -61,23 +61,23 @@
$DESCRIPTION$
This function supplements MANTISSA() to return the exponent of the
<nFloatingPointNumber> number.
Values > 1 or values < -1 return a positive number 0 to 1023.
Values < 1 or values > -1 return a negative number -1 to -1023.
The EXPONENT( 0 ), return 0.
The following calculation reproduces the original value:
2^EXPONENT(<nFloatingPointNumber>) * MANTISSA(<nFloatingPointNumber>) =
<nFloatingPointNumber>
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -36,7 +36,7 @@
$EXAMPLES$
// Payment of 1000 per year for 10 years at a interest rate
// of 5 per cent per year
? fv( 1000, 0.05, 10 ) // --> 12577.893
$TESTS$
fv( 1000, 0.00, 10 ) == 10000.0
@@ -87,7 +87,7 @@
// at a interest rate of 0.5% per month (6% per year), so instead
// of 6000 Dollars (the amount you will pay back) the bank will pay
// you
? pv( 100, 0.005, 60 ) // --> 5172.56
$TESTS$
pv( 100, 0.0, 60 ) == 6000.0
@@ -136,7 +136,7 @@
// You get a loan of 5172.56 at a interest rate of 0.5% per
// month (6% per year).
// For 5 years, you have to pay back every month
? payment( 5172.56, 0.005, 60 ) // --> 100.00
$TESTS$
payment( 5172.56, 0.0, 60 ) == 86.21
@@ -180,7 +180,7 @@
debt in period <nPeriod> = ((debt in period <nPeriod>-1)-<nPayment>)*(1+<nInterest>/100)
-> has to be 0, so
<nPeriods> = -log(1-<nLoan>*(<nInterest>/100)/<nPayment>)/log(1+<nInterest>/100))
Note, however that in the case of nPayment <= <nLoan>*(<nInterest>/100),
one would need infinite time to pay the loan back. The functions does
then return -1.
@@ -188,9 +188,9 @@
// You get a loan of 5172.56 at a interest rate of 0.5% per
// month (6% per year).
// You can afford to pay 100 back every month, so you need
? periods( 5172.56, 100, 0.005 ) // --> 60.0
// months to cancel the loan.
$TESTS$
periods( 5172.56, 100, 0.005 ) == 60.0
@@ -227,18 +227,18 @@
RATE() calculates the rate of interest per period for the given
loan, payment per periods and number of periods. This is done with
the same equation used in the PAYMENT() or PERIODS() function:
<nPayment> = <nLoan>*(<nInterest>/100)/(1-(1+<nInterest>/100)^(-<nPeriods>))
However, this equation can not be solved for <nInterest> in a "closed"
manner, i.e. <nInterest> = ..., so that the result can only be estimated.
$EXAMPLES$
// You get a loan of 5172.56, pay 100 back every month for
// 5 years (60 months). The effective interest rate per
// period (=month) is
? rate( 5172.56, 100, 60 ) // --> 0.005
$TESTS$
rate( 5172.56, 100, 60.0 ) == 0.005
rate( 6000.0, 100, 60.0 ) == 0.0

View File

@@ -8,32 +8,32 @@
$CATEGORY$
CT3 number and bit manipulation functions
$ONELINER$
$SYNTAX$
FTOC( <nFloatingPointNumber> ) --> cFloatingPointNumber
$ARGUMENTS$
<nFloatingPointNumber> Designate any Harbour number.
$RETURNS$
FTOC() return a string with the size of DOUBLE.
ATTENTION: different implementations or platforms of Harbour, they
could produce different format in the string returned by FTOC().
$DESCRIPTION$
Harbour internal numbers in Floating Point are stored in data type
DOUBLE. FTOC() returns these bits as an string. In this way,
numbers con be saved more compactly.
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
@@ -49,33 +49,33 @@
$CATEGORY$
CT3 number and bit manipulation functions
$ONELINER$
$SYNTAX$
CTOF( <cFloatingPointNumber> ) --> nFloatingPointNumber
$ARGUMENTS$
<cFloatingPointNumber> Designate a string that contains a Harbour
number in flotaing point format.
ATTENTION: different implementations or platforms of Harbour, they
could produce different format in the string returned by FTOC().
$RETURNS$
CTOF() return the floating point number that corresponds to the
string passed.
$DESCRIPTION$
Character strings created with FTOC() or XTOC() are convert into
Harbour floating point number
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$

View File

@@ -12,15 +12,15 @@
$SYNTAX$
JUSTLEFT( <[@]cString>, [<cChar>|<nChar>] ) -> cJustifiedString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -44,15 +44,15 @@
$SYNTAX$
JUSTRIGHT( <[@]cString>, [<cChar>|<nChar>] ) -> cJustifiedString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -8,29 +8,29 @@
$CATEGORY$
CT3 switch and state functions
$ONELINER$
$SYNTAX$
KSETINS( [<lNewSwitch>] ) -> lOldSwitch
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
DOS
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -40,29 +40,29 @@
$CATEGORY$
CT3 switch and state functions
$ONELINER$
$SYNTAX$
KSETCAPS( [<lNewSwitch>] ) -> lOldSwitch
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
DOS
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -72,29 +72,29 @@
$CATEGORY$
CT3 switch and state functions
$ONELINER$
$SYNTAX$
KSETNUM( [<lNewSwitch>] ) -> lOldSwitch
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
DOS
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -104,28 +104,28 @@
$CATEGORY$
CT3 switch and state functions
$ONELINER$
$SYNTAX$
KSETSCROLL( [<lNewSwitch>] ) -> lOldSwitch
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
DOS
$FILES$
Library is libct.
$SEEALSO$
$END$
*/

View File

@@ -8,21 +8,21 @@
$CATEGORY$
CT3 miscellaneous functions
$ONELINER$
$SYNTAX$
XTOC( <expValue> ) --> cValue
$ARGUMENTS$
<expValue> Designate an expression of some of the following data
type: NUMBER, CHARACTER, DATE, LOGICAL.
$RETURNS$
XTOC() return a string with the representation of data type of
expValue.
$DESCRIPTION$
Each data type always returns a string with a particular fixed length:
-----------------------------------------------------------
Data Type Result Length Similar function
-----------------------------------------------------------
@@ -31,16 +31,16 @@
Date 8 DTOS()
String Unchanged
-----------------------------------------------------------
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$

View File

@@ -98,9 +98,9 @@
INFINITY() returns the largest floating point number available
in the system. For platform independance, this is set to DBL_MAX.
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -110,6 +110,6 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/

View File

@@ -12,15 +12,15 @@
$SYNTAX$
NUMAT( <cStringToMatch>, <cString>, [<nIgnore>] ) --> nCount
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -8,23 +8,23 @@
$CATEGORY$
CT3 number and bit manipulation functions
$ONELINER$
$SYNTAX$
NTOC( <xNumber>[, <nBase>][,<nLength>][,<cPadChar>] ) -> <cNumber>
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
@@ -40,23 +40,23 @@
$CATEGORY$
CT3 number and bit manipulation functions
$ONELINER$
$SYNTAX$
CTON( <xNumber>[, <nBase>][,<lMode>] ) -> <nNumber>
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
@@ -72,23 +72,23 @@
$CATEGORY$
CT3 number and bit manipulation functions
$ONELINER$
$SYNTAX$
BITTOC( <nInteger>, <cBitPattern>[,<lMode>] ) -> <cBitString>
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
@@ -104,23 +104,23 @@
$CATEGORY$
CT3 number and bit manipulation functions
$ONELINER$
$SYNTAX$
CTOBIT( <cBitString>, <cBitPattern> ) -> <nWord>
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$

View File

@@ -12,15 +12,15 @@
$SYNTAX$
POSALPHA( <cString>, [<lMode>], [<nIgnore>] ) -> nPosition
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -44,15 +44,15 @@
$SYNTAX$
POSLOWER( <cString>, [<lMode>], [<nIgnore>] ) -> nPosition
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -77,15 +77,15 @@
POSRANGE( <cChar1>, <cChar2>, <cString>, [<lMode>],
[<nIgnore>] ) -> nPosition
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -109,15 +109,15 @@
$SYNTAX$
POSUPPER( <cString>, [<lMode>], [<nIgnore>] ) -> nPosition
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -12,15 +12,15 @@
$SYNTAX$
POSCHAR( <[@]cString>, <cCharacter|nCharacter>, [<nPosition>] ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -44,15 +44,15 @@
$SYNTAX$
POSDEL( <cString>, [<nStartPosition>], <nLength> ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -76,15 +76,15 @@
$SYNTAX$
POSINS( <cString>, <cInsert>, [<nPosition>] ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -108,15 +108,15 @@
$SYNTAX$
POSREPL( <[@]cString>, <cReplacement>, [<nStartPosition>] ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -12,15 +12,15 @@
$SYNTAX$
POSDIFF( <cString1>, <cString2>, [<nIgnore>] ) -> nPosition
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -44,15 +44,15 @@
$SYNTAX$
POSEQUAL( <cString1>, <cString2>, [<nCompare>], [<nIgnore>] ) -> nPosition
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -8,29 +8,29 @@
$CATEGORY$
CT3 printer functions
$ONELINER$
$SYNTAX$
PRINTSTAT( [<nPrinter>] ) -> nState
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
DOS
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -40,28 +40,28 @@
$CATEGORY$
CT3 printer functions
$ONELINER$
$SYNTAX$
PRINTREADY( [<nPrinter>] ) -> lPrinterReady
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
DOS
$FILES$
Library is libct.
$SEEALSO$
$END$
*/

View File

@@ -12,9 +12,9 @@
$SYNTAX$
RANGEREM( <cChar1|nChar1>, <cChar2|nChar2>, <cString> ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
@@ -50,9 +50,9 @@
RANGEREPL( <cChar1|nChar1>, <cChar2|nChar2>,
<[@]cString>, <cReplacementChar|nReplacementChar> ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$

View File

@@ -13,15 +13,15 @@
CHARRELA( <cStringToMatch1>, <cString1>,
<cStringToMatch2>, <cString2> ) -> nPosition
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -47,15 +47,15 @@
<cStringToMatch2>, <[@]cString2>,
<cReplacement> ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -12,15 +12,15 @@
$SYNTAX$
REMALL( <cString>, [<cSearch|nSearch>] ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -44,15 +44,15 @@
$SYNTAX$
REMLEFT( <cString>, [<cSearch|nSearch>] ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -76,15 +76,15 @@
$SYNTAX$
REMRIGHT( <cString>, [<cSearch|nSearch>] ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -12,15 +12,15 @@
$SYNTAX$
REPLALL( <cString>, <cReplace|nReplace>, [<cSearch|nSearch>] ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -44,15 +44,15 @@
$SYNTAX$
REPLLEFT( <cString>, <cReplace|nReplace>, [<cSearch|nSearch>] ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -76,15 +76,15 @@
$SYNTAX$
REPLRIGHT( <cString>, <cReplace|nReplace>, [<cSearch|nSearch>] ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -8,39 +8,39 @@
$CATEGORY$
CT3 video functions
$ONELINER$
$SYNTAX$
SCREENATTR( [<nRow>],[<nColumn>] ) -> <nAttr>
$ARGUMENTS$
<nRow> Designates the line from which to determine the attribute.
The default is the cursor line.
<nColumn> Designates the column from which to determine the
attribute. The default is the cursor column.
$RETURNS$
SCREENATTR() returns the attribute at the designated position.
$DESCRIPTION$
SCREENATTR() returns the current screen attribute at <nRow> and
<nColumn>. You can query targeted attributes this way and save them
to use later, or process them later with INVERTATTR().
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -50,29 +50,29 @@
$CATEGORY$
CT3 video functions
$ONELINER$
$SYNTAX$
SCREENMIX( <cCharString>, <cAttributeString>, [<nRow>], [<nCol>] ) -> <cEmptyString>
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -82,7 +82,7 @@
$CATEGORY$
CT3 video functions
$ONELINER$
$SYNTAX$
SAYSCREEN( <cString>, [<nRow>], [<nCol>] ) -> <cEmptyString>
$ARGUMENTS$
@@ -95,13 +95,13 @@
Outputs a string at specified coordinates without changing character
attributes.
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
@@ -117,19 +117,19 @@
$CATEGORY$
CT3 video functions
$ONELINER$
$SYNTAX$
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -139,7 +139,7 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -149,7 +149,7 @@
$CATEGORY$
CT3 video functions
$ONELINER$
$SYNTAX$
UNTEXTWIN( <nTopLine>, <nLeftColumn>, <nBottomLine>, <nRightColumn>,
<cReplacementCharacter|nReplacementCharacter>,
@@ -180,19 +180,19 @@
Replaces an area of characters from a region of the screen
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -202,7 +202,7 @@
$CATEGORY$
CT3 video functions
$ONELINER$
$SYNTAX$
CHARWIN( <nTop>, <nLeft>, <nBottom>, <nRight>, [<cNewChar|nNewChar>],
[<cOldChar|nOldChar>] ) --> <cEmptyString>
@@ -223,19 +223,19 @@
Exchanges particular characters in a screen area.
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -245,7 +245,7 @@
$CATEGORY$
CT3 video functions
$ONELINER$
$SYNTAX$
COLORWIN( [<nTopLine>], [<nLeftCol>], [<nBottomLine>], [<nRightCol>],
[<cNewAttr|nNewAttr>], [<cOldAttr|nOldAttr>] ) --> cNull
@@ -268,19 +268,19 @@
Exchanges particular attributes in a screen area
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -290,7 +290,7 @@
$CATEGORY$
CT video functions (Harbour extension)
$ONELINER$
$SYNTAX$
SCREENTEXT( <nTop>, <nLeft>, <nBottom>, <nRight> )
$ARGUMENTS$
@@ -304,19 +304,19 @@
Returns string with characters taken from given screen region.
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -326,7 +326,7 @@
$CATEGORY$
CT3 video functions
$ONELINER$
$SYNTAX$
COLORREPL( [<cNewAttr|nNewAttr>], [<cOldAttr|nOldAttr>] ) --> cNull
$ARGUMENTS$
@@ -340,18 +340,18 @@
Exchanges particular screen attributes
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
$PLATFORMS$
All
$FILES$
Library is libct.
$SEEALSO$
$END$
*/

View File

@@ -25,24 +25,24 @@
This distance is a measure for the number of single character replace/insert/delete operations (so called
"point mutations") required to transform <cString1> into <cString2> and its value will be the smallest sum of
the penalty points of the required operations.
Be aware that this function is both quite time - O(len(cString1)*len(cString2)) - and memory consuming -
O((len(cString1)+1)*(len(cString2)+1)*sizeof(int)) - so keep the strings as short as possible.
E.g., on common 32 bit systems (sizeof(int) == 4), calling strdiff() with two strings of 1024 bytes
in length will consume 4 MB of memory. To not impose unneeded restrictions, the function will only check if
(len(cString1)+1)*(len(cString2)+1)*sizeof(int) <= UINT_MAX, although allocing UINT_MAX bytes will not
work on most systems. If this simple check fails, -1 is returned.
Also, be aware that there can be an overflow when the penalty points are summed up: Assuming that the
number of transformation operations is in the order of max(len(cString1),len(cString2)), the penalty point
sum, that is internally stored in an "int" variable, is in the order of
(max(len(cString1),len(cString2))*max(nReplacementPenalty,nDeletionPenalty,nInsertionPentaly).
The STRDIFF() does not do an overflow check due to time performance reasons. Future versions of STRDIFF()
could use a type different to "int" to store the penalty point sum to save memory or to avoid overflows.
The function is aware of the settings done by SETATLIKE(), that means that the wildchar character
is considered equal to ALL characters.
$EXAMPLES$
? strdiff( "ABC", "ADC" ) // 3, one character replaced
? strdiff( "ABC", "AEC" ) // 3, dito

View File

@@ -12,15 +12,15 @@
$SYNTAX$
STRSWAP( <[@]cString1>, <[@]cString2> ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -30,6 +30,6 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/

View File

@@ -26,11 +26,11 @@
should be ignored as a newline indicator,
default is .F. (functions uses Chr(141))
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
tabexpand("-"+Chr(9)+"!") == "- !"
tabexpand("----"+Chr(9) +"!") == "---- !"
@@ -78,13 +78,13 @@
should be ignored as a newline indicator,
default is .F. (functions uses Chr(141))
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -144,13 +144,13 @@
$SYNTAX$
NUMTOKEN( <cString>, [<cTokenizer>], [<nSkipWidth>] ) -> nTokenCount
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
$EXAMPLES$
$TESTS$
numtoken( "Hello, World!" ) == 2
numtoken( "This is good. See you! How do you do?", ".!?" ) == 3
@@ -319,7 +319,7 @@
$EXAMPLES$
see TOKEN() function
$TESTS$
$STATUS$
Ready
$COMPLIANCE$

View File

@@ -35,24 +35,24 @@
This information is created in the process of tokenization of the
string <cString> - equal to the one used in the TOKEN() function
with the help of the <cTokenizer> and <nSkipWidth> parameters.
This token environment can be very useful when large strings have
to be tokenized since the tokenization has to take place only once
whereas the TOKEN() function must always start the tokenizing process
from scratch.
Unlike CTIII, this function provides two mechanisms of storing the
resulting token environment. If a variable is passed by reference
as 4th parameter, the token environment is stored in this variable,
otherwise the global token environment is used. Do not modify the
token environment string directly !
Additionally, a counter is stored in the token environment, so that
the tokens can successivly be obtained. This counter is first set to 1.
When the TOKENINIT() function is called without a string a tokenize,
the counter of either the global environment or the environment given
by reference in the 4th parameter is rewind to 1.
Additionally, unlike CTIII, tokeninit() does not need the string
<cString> to be passed by reference, since one must provide the
string in calls to TOKENNEXT() again.
@@ -71,7 +71,7 @@
// not given by reference !!!
tokeninit( ,,, @cTE1 ) // set counter in TE stored in cTE1 to 1
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -108,13 +108,13 @@
in either the global token environment or the local one supplied by
<cTokenEnvironment>. Note that, is supplied, this 3rd parameter has
always to be passed by reference.
If the 2nd parameter, <nToken> is given, TOKENNEXT() simply returns
the <nToken>th token without manipulating the TE counter. Otherwise
the token pointed to by the TE counter is returned and the counter
is incremented by one. Like this, a simple loop with TOKENEND() can
be used to retrieve all tokens of a string successivly.
Note that <cString> does not have to be the same used in TOKENINIT(),
so that one can do a "correlational tokenization", i.e. tokenize a string
as if it was another! E.G. using TOKENINIT() with the string
@@ -129,7 +129,7 @@
? tokennext( cString, 3 ) // get the 3rd token, counter will remain the same
tokenexit() // free the memory used for the global TE
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -168,7 +168,7 @@
tokeninit( "a.b.c.d", ".", 1 ) // initialize global TE
? tokennum() // --> 4
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -211,7 +211,7 @@
? tokennext( "a.b.c.d" ) // get all tokens successivly
ENDDO
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -236,7 +236,7 @@
$SYNTAX$
TOKENEXIT() -> lStaticEnvironmentReleased
$ARGUMENTS$
$RETURNS$
<lStaticEnvironmentReleased> .T., if global token environment is successfully released
$DESCRIPTION$
@@ -252,7 +252,7 @@
? tokennext( cString, 3 ) // get the 3rd token, counter will remain the same
tokenexit() // free the memory used for the global TE
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -289,17 +289,17 @@
The TOKENAT() function is used to retrieve the start and end position
of the tokens in a token environment. Note however that the position of
last character of a token is given by tokenat (.T.)-1 !!
If the 2nd parameter, <nToken> is given, TOKENAT() returns the
positions of the <nToken>th token. Otherwise
the token pointed to by the TE counter, i.e. the token that will
be retrieved by TOKENNEXT() _NEXT_ is used.
If the parameter <@cTokenEnvironment> is supplied (must be by
reference), the information from this token environment is used,
otherwise the global TE is used.
$EXAMPLES$
$TESTS$
tokeninit( cString ) // initialize a TE
DO WHILE ! tokenend()
@@ -333,7 +333,7 @@
$SYNTAX$
SAVETOKEN() -> cStaticTokenEnvironment
$ARGUMENTS$
$RETURNS$
<cStaticTokenEnvironment> a binary string encoding the global TE
$DESCRIPTION$
@@ -342,9 +342,9 @@
Note however that the latter can now be solved with locally stored
token environments.
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$
@@ -377,9 +377,9 @@
of SAVETOKEN() or the value stored in the 4th parameter in a
TOKENINIT() call.
$EXAMPLES$
$TESTS$
$STATUS$
Ready
$COMPLIANCE$

View File

@@ -12,7 +12,7 @@
$SYNTAX$
PI() -> nPi
$ARGUMENTS$
$RETURNS$
<nPi> the math constant Pi with maximum precision available
$DESCRIPTION$
@@ -22,10 +22,10 @@
$EXAMPLES$
// the diameter of a circle-like swimming pool is 3.4 meters, how
// long is the perimeter ?
? Str( PI() * 3.4, 5, 3 ) + " meters" // --> 10.681 meters
$TESTS$
$STATUS$
Ready
$COMPLIANCE$

View File

@@ -12,15 +12,15 @@
$SYNTAX$
CHARPIX() --> nHeight
$ARGUMENTS$
$RETURNS$
Returns the number of scan lines per character.
$DESCRIPTION$
Returns the number of scan lines per character.
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -30,7 +30,7 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/
@@ -56,11 +56,11 @@
$RETURNS$
Returns .T. on success.
$DESCRIPTION$
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -84,15 +84,15 @@
$SYNTAX$
VIDEOTYPE() --> nMask
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: Finish documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -124,13 +124,13 @@
<nCounter> Number of characters to load.
<lCompute> When .T., the function computes font height automatically.
$RETURNS$
$DESCRIPTION$
TODO: Finish documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$
@@ -140,6 +140,6 @@
$FILES$
Library is libct.
$SEEALSO$
$END$
*/

View File

@@ -13,15 +13,15 @@
WORDTOCHAR( <cDoubleCharacterSearchString>, <cString>,
<cSingleCharacterReplaceString> ) -> cString
$ARGUMENTS$
$RETURNS$
$DESCRIPTION$
TODO: add documentation
$EXAMPLES$
$TESTS$
$STATUS$
Started
$COMPLIANCE$

View File

@@ -75,7 +75,7 @@ FUNCTION KeySec( nKey, nTime, nCounter, lMode )
lMode := .F.
ENDIF
nSeconds := hb_milliSeconds()
nSeconds := hb_MilliSeconds()
t_hIdle := hb_idleAdd( {|| doKeySec( nKey, nTime, lMode, ;
@nCounter, @nSeconds ) } )
RETURN .T.
@@ -85,7 +85,7 @@ FUNCTION KeySec( nKey, nTime, nCounter, lMode )
STATIC PROCEDURE doKeySec( nKey, nTime, lMode, nCounter, nSeconds )
LOCAL nSec := hb_milliSeconds()
LOCAL nSec := hb_MilliSeconds()
IF lMode .AND. ! Empty( NextKey() )
nSeconds := nSec

View File

@@ -65,261 +65,261 @@ STATIC s_hTrs := { => }
STATIC s_hMutex := hb_mutexCreate()
STATIC sc_hCnv := { ;
KS_DISABLE => 0 ,;
KS_A => hb_keyCode( "A" ) ,;
KS_B => hb_keyCode( "B" ) ,;
KS_C => hb_keyCode( "C" ) ,;
KS_D => hb_keyCode( "D" ) ,;
KS_E => hb_keyCode( "E" ) ,;
KS_F => hb_keyCode( "F" ) ,;
KS_G => hb_keyCode( "G" ) ,;
KS_H => hb_keyCode( "H" ) ,;
KS_I => hb_keyCode( "I" ) ,;
KS_J => hb_keyCode( "J" ) ,;
KS_K => hb_keyCode( "K" ) ,;
KS_L => hb_keyCode( "L" ) ,;
KS_M => hb_keyCode( "M" ) ,;
KS_N => hb_keyCode( "N" ) ,;
KS_O => hb_keyCode( "O" ) ,;
KS_P => hb_keyCode( "P" ) ,;
KS_Q => hb_keyCode( "Q" ) ,;
KS_R => hb_keyCode( "R" ) ,;
KS_S => hb_keyCode( "S" ) ,;
KS_T => hb_keyCode( "T" ) ,;
KS_U => hb_keyCode( "U" ) ,;
KS_V => hb_keyCode( "V" ) ,;
KS_W => hb_keyCode( "W" ) ,;
KS_X => hb_keyCode( "X" ) ,;
KS_Y => hb_keyCode( "Y" ) ,;
KS_Z => hb_keyCode( "Z" ) ,;
KS_a => hb_keyCode( "a" ) ,;
KS_b => hb_keyCode( "b" ) ,;
KS_c => hb_keyCode( "c" ) ,;
KS_d => hb_keyCode( "d" ) ,;
KS_e => hb_keyCode( "e" ) ,;
KS_f => hb_keyCode( "f" ) ,;
KS_g => hb_keyCode( "g" ) ,;
KS_h => hb_keyCode( "h" ) ,;
KS_i => hb_keyCode( "i" ) ,;
KS_j => hb_keyCode( "j" ) ,;
KS_k => hb_keyCode( "k" ) ,;
KS_l => hb_keyCode( "l" ) ,;
KS_m => hb_keyCode( "m" ) ,;
KS_n => hb_keyCode( "n" ) ,;
KS_o => hb_keyCode( "o" ) ,;
KS_p => hb_keyCode( "p" ) ,;
KS_q => hb_keyCode( "q" ) ,;
KS_r => hb_keyCode( "r" ) ,;
KS_s => hb_keyCode( "s" ) ,;
KS_t => hb_keyCode( "t" ) ,;
KS_u => hb_keyCode( "u" ) ,;
KS_v => hb_keyCode( "v" ) ,;
KS_w => hb_keyCode( "w" ) ,;
KS_x => hb_keyCode( "x" ) ,;
KS_y => hb_keyCode( "y" ) ,;
KS_z => hb_keyCode( "z" ) ,;
KS_1 => hb_keyCode( "1" ) ,;
KS_2 => hb_keyCode( "2" ) ,;
KS_3 => hb_keyCode( "3" ) ,;
KS_4 => hb_keyCode( "4" ) ,;
KS_5 => hb_keyCode( "5" ) ,;
KS_6 => hb_keyCode( "6" ) ,;
KS_7 => hb_keyCode( "7" ) ,;
KS_8 => hb_keyCode( "8" ) ,;
KS_9 => hb_keyCode( "9" ) ,;
KS_0 => hb_keyCode( "0" ) ,;
KS_DOT => hb_keyCode( "." ) ,;
KS_COMMA => hb_keyCode( "," ) ,;
KS_CTRL_A => K_CTRL_A ,;
KS_CTRL_B => K_CTRL_B ,;
KS_CTRL_C => K_CTRL_C ,;
KS_CTRL_D => K_CTRL_D ,;
KS_CTRL_E => K_CTRL_E ,;
KS_CTRL_F => K_CTRL_F ,;
KS_CTRL_G => K_CTRL_G ,;
KS_CTRL_H => K_CTRL_H ,;
KS_CTRL_I => K_CTRL_I ,;
KS_CTRL_M => K_CTRL_M ,;
KS_CTRL_N => K_CTRL_N ,;
KS_CTRL_R => K_CTRL_R ,;
KS_CTRL_S => K_CTRL_S ,;
KS_CTRL_T => K_CTRL_T ,;
KS_CTRL_U => K_CTRL_U ,;
KS_CTRL_V => K_CTRL_V ,;
KS_CTRL_W => K_CTRL_W ,;
KS_CTRL_X => K_CTRL_X ,;
KS_CTRL_Y => K_CTRL_Y ,;
KS_CTRL_Z => K_CTRL_Z ,;
KS_ALT_A => K_ALT_A ,;
KS_ALT_B => K_ALT_B ,;
KS_ALT_C => K_ALT_C ,;
KS_ALT_D => K_ALT_D ,;
KS_ALT_E => K_ALT_E ,;
KS_ALT_F => K_ALT_F ,;
KS_ALT_G => K_ALT_G ,;
KS_ALT_H => K_ALT_H ,;
KS_ALT_I => K_ALT_I ,;
KS_ALT_J => K_ALT_J ,;
KS_ALT_K => K_ALT_K ,;
KS_ALT_L => K_ALT_L ,;
KS_ALT_M => K_ALT_M ,;
KS_ALT_N => K_ALT_N ,;
KS_ALT_O => K_ALT_O ,;
KS_ALT_P => K_ALT_P ,;
KS_ALT_Q => K_ALT_Q ,;
KS_ALT_R => K_ALT_R ,;
KS_ALT_S => K_ALT_S ,;
KS_ALT_T => K_ALT_T ,;
KS_ALT_U => K_ALT_U ,;
KS_ALT_V => K_ALT_V ,;
KS_ALT_W => K_ALT_W ,;
KS_ALT_X => K_ALT_X ,;
KS_ALT_Y => K_ALT_Y ,;
KS_ALT_Z => K_ALT_Z ,;
KS_ALT_1 => K_ALT_1 ,;
KS_ALT_2 => K_ALT_2 ,;
KS_ALT_3 => K_ALT_3 ,;
KS_ALT_4 => K_ALT_4 ,;
KS_ALT_5 => K_ALT_5 ,;
KS_ALT_6 => K_ALT_6 ,;
KS_ALT_7 => K_ALT_7 ,;
KS_ALT_8 => K_ALT_8 ,;
KS_ALT_9 => K_ALT_9 ,;
KS_ALT_0 => K_ALT_0 ,;
KS_F1 => K_F1 ,;
KS_F2 => K_F2 ,;
KS_F3 => K_F3 ,;
KS_F4 => K_F4 ,;
KS_F5 => K_F5 ,;
KS_F6 => K_F6 ,;
KS_F7 => K_F7 ,;
KS_F8 => K_F8 ,;
KS_F9 => K_F9 ,;
KS_F10 => K_F10 ,;
KS_F11 => K_F11 ,;
KS_F12 => K_F12 ,;
KS_SH_F1 => K_SH_F1 ,;
KS_SH_F2 => K_SH_F2 ,;
KS_SH_F3 => K_SH_F3 ,;
KS_SH_F4 => K_SH_F4 ,;
KS_SH_F5 => K_SH_F5 ,;
KS_SH_F6 => K_SH_F6 ,;
KS_SH_F7 => K_SH_F7 ,;
KS_SH_F8 => K_SH_F8 ,;
KS_SH_F9 => K_SH_F9 ,;
KS_SH_F10 => K_SH_F10 ,;
KS_SH_F11 => K_SH_F11 ,;
KS_SH_F12 => K_SH_F12 ,;
KS_CTRL_F1 => K_CTRL_F1 ,;
KS_CTRL_F2 => K_CTRL_F2 ,;
KS_CTRL_F3 => K_CTRL_F3 ,;
KS_CTRL_F4 => K_CTRL_F4 ,;
KS_CTRL_F5 => K_CTRL_F5 ,;
KS_CTRL_F6 => K_CTRL_F6 ,;
KS_CTRL_F7 => K_CTRL_F7 ,;
KS_CTRL_F8 => K_CTRL_F8 ,;
KS_CTRL_F9 => K_CTRL_F9 ,;
KS_CTRL_F10 => K_CTRL_F10 ,;
KS_CTRL_F11 => K_CTRL_F11 ,;
KS_CTRL_F12 => K_CTRL_F12 ,;
KS_ALT_F1 => K_ALT_F1 ,;
KS_ALT_F2 => K_ALT_F2 ,;
KS_ALT_F3 => K_ALT_F3 ,;
KS_ALT_F4 => K_ALT_F4 ,;
KS_ALT_F5 => K_ALT_F5 ,;
KS_ALT_F6 => K_ALT_F6 ,;
KS_ALT_F7 => K_ALT_F7 ,;
KS_ALT_F8 => K_ALT_F8 ,;
KS_ALT_F9 => K_ALT_F9 ,;
KS_ALT_F10 => K_ALT_F10 ,;
KS_ALT_F11 => K_ALT_F11 ,;
KS_ALT_F12 => K_ALT_F12 ,;
KS_BS => K_BS ,;
KS_ESC => K_ESC ,;
KS_TAB => K_TAB ,;
KS_SH_TAB => K_SH_TAB ,;
KS_ALT_BS => K_ALT_BS ,;
KS_ALT_ESC => K_ALT_ESC ,;
KS_ALT_TAB => K_ALT_TAB ,;
KS_ENTER => K_ENTER ,;
KS_CTRL_ENTER => K_CTRL_ENTER ,;
KS_ALT_ENTER => K_ALT_ENTER ,;
KS_PAD_ENTER => HB_KP_ENTER ,;
KS_PAD_CTRL_ENTER => HB_KP_CTRL_ENTER ,;
KS_PAD_ALT_ENTER => KP_ALT_ENTER ,;
KS_INS => K_INS ,;
KS_DEL => K_DEL ,;
KS_HOME => K_HOME ,;
KS_END => K_END ,;
KS_PGUP => K_PGUP ,;
KS_PGDN => K_PGDN ,;
KS_UP => K_UP ,;
KS_LEFT => K_LEFT ,;
KS_DOWN => K_DOWN ,;
KS_RIGHT => K_RIGHT ,;
KS_CTRL_INS => K_CTRL_INS ,;
KS_CTRL_DEL => K_CTRL_DEL ,;
KS_CTRL_HOME => K_CTRL_HOME ,;
KS_CTRL_END => K_CTRL_END ,;
KS_CTRL_PGUP => K_CTRL_PGUP ,;
KS_CTRL_PGDN => K_CTRL_PGDN ,;
KS_CTRL_UP => K_CTRL_UP ,;
KS_CTRL_LEFT => K_CTRL_LEFT ,;
KS_CTRL_DOWN => K_CTRL_DOWN ,;
KS_CTRL_RIGHT => K_CTRL_RIGHT ,;
KS_ALT_INS => K_ALT_INS ,;
KS_ALT_DEL => K_ALT_DEL ,;
KS_ALT_HOME => K_ALT_HOME ,;
KS_ALT_END => K_ALT_END ,;
KS_ALT_PGUP => K_ALT_PGUP ,;
KS_ALT_PGDN => K_ALT_PGDN ,;
KS_ALT_UP => K_ALT_UP ,;
KS_ALT_LEFT => K_ALT_LEFT ,;
KS_ALT_DOWN => K_ALT_DOWN ,;
KS_ALT_RIGHT => K_ALT_RIGHT ,;
KS_PAD_INS => HB_KP_INS ,;
KS_PAD_DEL => HB_KP_DEL ,;
KS_PAD_HOME => HB_KP_HOME ,;
KS_PAD_END => HB_KP_END ,;
KS_PAD_PGUP => HB_KP_PG_UP ,;
KS_PAD_PGDN => HB_KP_PG_DN ,;
KS_PAD_UP => HB_KP_UP ,;
KS_PAD_LEFT => HB_KP_LEFT ,;
KS_PAD_DOWN => HB_KP_DOWN ,;
KS_PAD_RIGHT => HB_KP_RIGHT ,;
KS_CTRL_PAD_INS => HB_KP_CTRL_INS ,;
KS_CTRL_PAD_DEL => HB_KP_CTRL_DEL ,;
KS_CTRL_PAD_HOME => HB_KP_CTRL_HOME ,;
KS_CTRL_PAD_END => HB_KP_CTRL_END ,;
KS_CTRL_PAD_PGUP => HB_KP_CTRL_PG_UP ,;
KS_CTRL_PAD_PGDN => HB_KP_CTRL_PG_DN ,;
KS_CTRL_PAD_UP => HB_KP_CTRL_UP ,;
KS_CTRL_PAD_LEFT => HB_KP_CTRL_LEFT ,;
KS_CTRL_PAD_DOWN => HB_KP_CTRL_DOWN ,;
KS_CTRL_PAD_RIGHT => HB_KP_CTRL_RIGHT ,;
KS_PAD_DIV => KP_ALT_SLASH ,;
KS_PAD_MUL => KP_ALT_ASTERISK ,;
KS_PAD_MINUS => KP_ALT_MINUS ,;
KS_PAD_PLUS => KP_ALT_PLUS ,;
KS_CTRL_PAD_DIV => KP_CTRL_SLASH ,;
KS_CTRL_PAD_MUL => KP_CTRL_ASTERISK ,;
KS_CTRL_PAD_MINUS => KP_CTRL_MINUS ,;
KS_CTRL_PAD_PLUS => KP_CTRL_PLUS ,;
KS_ALT_PAD_DIV => HB_KP_ALT_SLASH ,;
KS_ALT_PAD_MUL => HB_KP_ALT_STAR ,;
KS_ALT_PAD_MINUS => HB_KP_ALT_MINUS ,;
KS_ALT_PAD_PLUS => HB_KP_ALT_PLUS ,;
KS_PAD_1 => 0 ,; /* no Harbour equivalent */
KS_PAD_2 => 0 ,; /* no Harbour equivalent */
KS_PAD_3 => 0 ,; /* no Harbour equivalent */
KS_PAD_4 => 0 ,; /* no Harbour equivalent */
KS_PAD_5 => 0 ,; /* no Harbour equivalent */
KS_PAD_6 => 0 ,; /* no Harbour equivalent */
KS_PAD_7 => 0 ,; /* no Harbour equivalent */
KS_PAD_8 => 0 ,; /* no Harbour equivalent */
KS_PAD_9 => 0 ,; /* no Harbour equivalent */
KS_PAD_0 => 0 ,; /* no Harbour equivalent */
KS_PAD_DECIMAL => 0 } /* no Harbour equivalent */
KS_DISABLE => 0 , ;
KS_A => hb_keyCode( "A" ) , ;
KS_B => hb_keyCode( "B" ) , ;
KS_C => hb_keyCode( "C" ) , ;
KS_D => hb_keyCode( "D" ) , ;
KS_E => hb_keyCode( "E" ) , ;
KS_F => hb_keyCode( "F" ) , ;
KS_G => hb_keyCode( "G" ) , ;
KS_H => hb_keyCode( "H" ) , ;
KS_I => hb_keyCode( "I" ) , ;
KS_J => hb_keyCode( "J" ) , ;
KS_K => hb_keyCode( "K" ) , ;
KS_L => hb_keyCode( "L" ) , ;
KS_M => hb_keyCode( "M" ) , ;
KS_N => hb_keyCode( "N" ) , ;
KS_O => hb_keyCode( "O" ) , ;
KS_P => hb_keyCode( "P" ) , ;
KS_Q => hb_keyCode( "Q" ) , ;
KS_R => hb_keyCode( "R" ) , ;
KS_S => hb_keyCode( "S" ) , ;
KS_T => hb_keyCode( "T" ) , ;
KS_U => hb_keyCode( "U" ) , ;
KS_V => hb_keyCode( "V" ) , ;
KS_W => hb_keyCode( "W" ) , ;
KS_X => hb_keyCode( "X" ) , ;
KS_Y => hb_keyCode( "Y" ) , ;
KS_Z => hb_keyCode( "Z" ) , ;
KS_a => hb_keyCode( "a" ) , ;
KS_b => hb_keyCode( "b" ) , ;
KS_c => hb_keyCode( "c" ) , ;
KS_d => hb_keyCode( "d" ) , ;
KS_e => hb_keyCode( "e" ) , ;
KS_f => hb_keyCode( "f" ) , ;
KS_g => hb_keyCode( "g" ) , ;
KS_h => hb_keyCode( "h" ) , ;
KS_i => hb_keyCode( "i" ) , ;
KS_j => hb_keyCode( "j" ) , ;
KS_k => hb_keyCode( "k" ) , ;
KS_l => hb_keyCode( "l" ) , ;
KS_m => hb_keyCode( "m" ) , ;
KS_n => hb_keyCode( "n" ) , ;
KS_o => hb_keyCode( "o" ) , ;
KS_p => hb_keyCode( "p" ) , ;
KS_q => hb_keyCode( "q" ) , ;
KS_r => hb_keyCode( "r" ) , ;
KS_s => hb_keyCode( "s" ) , ;
KS_t => hb_keyCode( "t" ) , ;
KS_u => hb_keyCode( "u" ) , ;
KS_v => hb_keyCode( "v" ) , ;
KS_w => hb_keyCode( "w" ) , ;
KS_x => hb_keyCode( "x" ) , ;
KS_y => hb_keyCode( "y" ) , ;
KS_z => hb_keyCode( "z" ) , ;
KS_1 => hb_keyCode( "1" ) , ;
KS_2 => hb_keyCode( "2" ) , ;
KS_3 => hb_keyCode( "3" ) , ;
KS_4 => hb_keyCode( "4" ) , ;
KS_5 => hb_keyCode( "5" ) , ;
KS_6 => hb_keyCode( "6" ) , ;
KS_7 => hb_keyCode( "7" ) , ;
KS_8 => hb_keyCode( "8" ) , ;
KS_9 => hb_keyCode( "9" ) , ;
KS_0 => hb_keyCode( "0" ) , ;
KS_DOT => hb_keyCode( "." ) , ;
KS_COMMA => hb_keyCode( "," ) , ;
KS_CTRL_A => K_CTRL_A , ;
KS_CTRL_B => K_CTRL_B , ;
KS_CTRL_C => K_CTRL_C , ;
KS_CTRL_D => K_CTRL_D , ;
KS_CTRL_E => K_CTRL_E , ;
KS_CTRL_F => K_CTRL_F , ;
KS_CTRL_G => K_CTRL_G , ;
KS_CTRL_H => K_CTRL_H , ;
KS_CTRL_I => K_CTRL_I , ;
KS_CTRL_M => K_CTRL_M , ;
KS_CTRL_N => K_CTRL_N , ;
KS_CTRL_R => K_CTRL_R , ;
KS_CTRL_S => K_CTRL_S , ;
KS_CTRL_T => K_CTRL_T , ;
KS_CTRL_U => K_CTRL_U , ;
KS_CTRL_V => K_CTRL_V , ;
KS_CTRL_W => K_CTRL_W , ;
KS_CTRL_X => K_CTRL_X , ;
KS_CTRL_Y => K_CTRL_Y , ;
KS_CTRL_Z => K_CTRL_Z , ;
KS_ALT_A => K_ALT_A , ;
KS_ALT_B => K_ALT_B , ;
KS_ALT_C => K_ALT_C , ;
KS_ALT_D => K_ALT_D , ;
KS_ALT_E => K_ALT_E , ;
KS_ALT_F => K_ALT_F , ;
KS_ALT_G => K_ALT_G , ;
KS_ALT_H => K_ALT_H , ;
KS_ALT_I => K_ALT_I , ;
KS_ALT_J => K_ALT_J , ;
KS_ALT_K => K_ALT_K , ;
KS_ALT_L => K_ALT_L , ;
KS_ALT_M => K_ALT_M , ;
KS_ALT_N => K_ALT_N , ;
KS_ALT_O => K_ALT_O , ;
KS_ALT_P => K_ALT_P , ;
KS_ALT_Q => K_ALT_Q , ;
KS_ALT_R => K_ALT_R , ;
KS_ALT_S => K_ALT_S , ;
KS_ALT_T => K_ALT_T , ;
KS_ALT_U => K_ALT_U , ;
KS_ALT_V => K_ALT_V , ;
KS_ALT_W => K_ALT_W , ;
KS_ALT_X => K_ALT_X , ;
KS_ALT_Y => K_ALT_Y , ;
KS_ALT_Z => K_ALT_Z , ;
KS_ALT_1 => K_ALT_1 , ;
KS_ALT_2 => K_ALT_2 , ;
KS_ALT_3 => K_ALT_3 , ;
KS_ALT_4 => K_ALT_4 , ;
KS_ALT_5 => K_ALT_5 , ;
KS_ALT_6 => K_ALT_6 , ;
KS_ALT_7 => K_ALT_7 , ;
KS_ALT_8 => K_ALT_8 , ;
KS_ALT_9 => K_ALT_9 , ;
KS_ALT_0 => K_ALT_0 , ;
KS_F1 => K_F1 , ;
KS_F2 => K_F2 , ;
KS_F3 => K_F3 , ;
KS_F4 => K_F4 , ;
KS_F5 => K_F5 , ;
KS_F6 => K_F6 , ;
KS_F7 => K_F7 , ;
KS_F8 => K_F8 , ;
KS_F9 => K_F9 , ;
KS_F10 => K_F10 , ;
KS_F11 => K_F11 , ;
KS_F12 => K_F12 , ;
KS_SH_F1 => K_SH_F1 , ;
KS_SH_F2 => K_SH_F2 , ;
KS_SH_F3 => K_SH_F3 , ;
KS_SH_F4 => K_SH_F4 , ;
KS_SH_F5 => K_SH_F5 , ;
KS_SH_F6 => K_SH_F6 , ;
KS_SH_F7 => K_SH_F7 , ;
KS_SH_F8 => K_SH_F8 , ;
KS_SH_F9 => K_SH_F9 , ;
KS_SH_F10 => K_SH_F10 , ;
KS_SH_F11 => K_SH_F11 , ;
KS_SH_F12 => K_SH_F12 , ;
KS_CTRL_F1 => K_CTRL_F1 , ;
KS_CTRL_F2 => K_CTRL_F2 , ;
KS_CTRL_F3 => K_CTRL_F3 , ;
KS_CTRL_F4 => K_CTRL_F4 , ;
KS_CTRL_F5 => K_CTRL_F5 , ;
KS_CTRL_F6 => K_CTRL_F6 , ;
KS_CTRL_F7 => K_CTRL_F7 , ;
KS_CTRL_F8 => K_CTRL_F8 , ;
KS_CTRL_F9 => K_CTRL_F9 , ;
KS_CTRL_F10 => K_CTRL_F10 , ;
KS_CTRL_F11 => K_CTRL_F11 , ;
KS_CTRL_F12 => K_CTRL_F12 , ;
KS_ALT_F1 => K_ALT_F1 , ;
KS_ALT_F2 => K_ALT_F2 , ;
KS_ALT_F3 => K_ALT_F3 , ;
KS_ALT_F4 => K_ALT_F4 , ;
KS_ALT_F5 => K_ALT_F5 , ;
KS_ALT_F6 => K_ALT_F6 , ;
KS_ALT_F7 => K_ALT_F7 , ;
KS_ALT_F8 => K_ALT_F8 , ;
KS_ALT_F9 => K_ALT_F9 , ;
KS_ALT_F10 => K_ALT_F10 , ;
KS_ALT_F11 => K_ALT_F11 , ;
KS_ALT_F12 => K_ALT_F12 , ;
KS_BS => K_BS , ;
KS_ESC => K_ESC , ;
KS_TAB => K_TAB , ;
KS_SH_TAB => K_SH_TAB , ;
KS_ALT_BS => K_ALT_BS , ;
KS_ALT_ESC => K_ALT_ESC , ;
KS_ALT_TAB => K_ALT_TAB , ;
KS_ENTER => K_ENTER , ;
KS_CTRL_ENTER => K_CTRL_ENTER , ;
KS_ALT_ENTER => K_ALT_ENTER , ;
KS_PAD_ENTER => HB_KP_ENTER , ;
KS_PAD_CTRL_ENTER => HB_KP_CTRL_ENTER , ;
KS_PAD_ALT_ENTER => KP_ALT_ENTER , ;
KS_INS => K_INS , ;
KS_DEL => K_DEL , ;
KS_HOME => K_HOME , ;
KS_END => K_END , ;
KS_PGUP => K_PGUP , ;
KS_PGDN => K_PGDN , ;
KS_UP => K_UP , ;
KS_LEFT => K_LEFT , ;
KS_DOWN => K_DOWN , ;
KS_RIGHT => K_RIGHT , ;
KS_CTRL_INS => K_CTRL_INS , ;
KS_CTRL_DEL => K_CTRL_DEL , ;
KS_CTRL_HOME => K_CTRL_HOME , ;
KS_CTRL_END => K_CTRL_END , ;
KS_CTRL_PGUP => K_CTRL_PGUP , ;
KS_CTRL_PGDN => K_CTRL_PGDN , ;
KS_CTRL_UP => K_CTRL_UP , ;
KS_CTRL_LEFT => K_CTRL_LEFT , ;
KS_CTRL_DOWN => K_CTRL_DOWN , ;
KS_CTRL_RIGHT => K_CTRL_RIGHT , ;
KS_ALT_INS => K_ALT_INS , ;
KS_ALT_DEL => K_ALT_DEL , ;
KS_ALT_HOME => K_ALT_HOME , ;
KS_ALT_END => K_ALT_END , ;
KS_ALT_PGUP => K_ALT_PGUP , ;
KS_ALT_PGDN => K_ALT_PGDN , ;
KS_ALT_UP => K_ALT_UP , ;
KS_ALT_LEFT => K_ALT_LEFT , ;
KS_ALT_DOWN => K_ALT_DOWN , ;
KS_ALT_RIGHT => K_ALT_RIGHT , ;
KS_PAD_INS => HB_KP_INS , ;
KS_PAD_DEL => HB_KP_DEL , ;
KS_PAD_HOME => HB_KP_HOME , ;
KS_PAD_END => HB_KP_END , ;
KS_PAD_PGUP => HB_KP_PG_UP , ;
KS_PAD_PGDN => HB_KP_PG_DN , ;
KS_PAD_UP => HB_KP_UP , ;
KS_PAD_LEFT => HB_KP_LEFT , ;
KS_PAD_DOWN => HB_KP_DOWN , ;
KS_PAD_RIGHT => HB_KP_RIGHT , ;
KS_CTRL_PAD_INS => HB_KP_CTRL_INS , ;
KS_CTRL_PAD_DEL => HB_KP_CTRL_DEL , ;
KS_CTRL_PAD_HOME => HB_KP_CTRL_HOME , ;
KS_CTRL_PAD_END => HB_KP_CTRL_END , ;
KS_CTRL_PAD_PGUP => HB_KP_CTRL_PG_UP , ;
KS_CTRL_PAD_PGDN => HB_KP_CTRL_PG_DN , ;
KS_CTRL_PAD_UP => HB_KP_CTRL_UP , ;
KS_CTRL_PAD_LEFT => HB_KP_CTRL_LEFT , ;
KS_CTRL_PAD_DOWN => HB_KP_CTRL_DOWN , ;
KS_CTRL_PAD_RIGHT => HB_KP_CTRL_RIGHT , ;
KS_PAD_DIV => KP_ALT_SLASH , ;
KS_PAD_MUL => KP_ALT_ASTERISK , ;
KS_PAD_MINUS => KP_ALT_MINUS , ;
KS_PAD_PLUS => KP_ALT_PLUS , ;
KS_CTRL_PAD_DIV => KP_CTRL_SLASH , ;
KS_CTRL_PAD_MUL => KP_CTRL_ASTERISK , ;
KS_CTRL_PAD_MINUS => KP_CTRL_MINUS , ;
KS_CTRL_PAD_PLUS => KP_CTRL_PLUS , ;
KS_ALT_PAD_DIV => HB_KP_ALT_SLASH , ;
KS_ALT_PAD_MUL => HB_KP_ALT_STAR , ;
KS_ALT_PAD_MINUS => HB_KP_ALT_MINUS , ;
KS_ALT_PAD_PLUS => HB_KP_ALT_PLUS , ;
KS_PAD_1 => 0 , ; /* no Harbour equivalent */
KS_PAD_2 => 0 , ; /* no Harbour equivalent */
KS_PAD_3 => 0 , ; /* no Harbour equivalent */
KS_PAD_4 => 0 , ; /* no Harbour equivalent */
KS_PAD_5 => 0 , ; /* no Harbour equivalent */
KS_PAD_6 => 0 , ; /* no Harbour equivalent */
KS_PAD_7 => 0 , ; /* no Harbour equivalent */
KS_PAD_8 => 0 , ; /* no Harbour equivalent */
KS_PAD_9 => 0 , ; /* no Harbour equivalent */
KS_PAD_0 => 0 , ; /* no Harbour equivalent */
KS_PAD_DECIMAL => 0 } /* no Harbour equivalent */
FUNCTION __hbct_key_c_to_n( cKey )

View File

@@ -62,10 +62,10 @@ PROCEDURE Main()
?
// simple tests
? "Simple tests:"
? [ This should be "1000": ] + addascii( "0000", 1, 1 )
? [ This should be "0001": ] + addascii( "0000", 1 )
? [ This should be "BAAA": ] + addascii( "AAAA", -255, 1 )
? [ This should be "AAAB": ] + addascii( "AAAA", -255 )
? ' This should be "1000": ' + addascii( "0000", 1, 1 )
? ' This should be "0001": ' + addascii( "0000", 1 )
? ' This should be "BAAA": ' + addascii( "AAAA", -255, 1 )
? ' This should be "AAAB": ' + addascii( "AAAA", -255 )
// csetref() tests
?
@@ -96,7 +96,7 @@ PROCEDURE Main()
? " return value of addascii([AAAA],257,2,.T.) call('BBAA')..:", addascii( "AAAA", 257, 2, .T. )
? " return value of addascii([AAAA],257,2,.F.) call('ABAA')..:", addascii( "AAAA", 257, 2, .F. )
? " return value of addascii([AAAA],258,,.T.) call('AABC')...:", addascii( "AAAA", 258,, .T. )
? " return value of addascii([ABBA],-257,3,.T.) call('AAAA').:", addascii( "ABBA", -257,3, .T. )
? " return value of addascii([ABBA],-257,3,.T.) call('AAAA').:", addascii( "ABBA", -257, 3, .T. )
? "End test of ADDASCII()"
?

View File

@@ -69,38 +69,38 @@ PROCEDURE Main()
// Some simple tests
? " Simple tests:"
? [ afteratnum("..",cStr) should be "test!",]
? [ and is "] + afteratnum( "..", cStr ) + ["]
? [ afteratnum("..",cStr,2) should be ".is...a...test!",]
? [ and is "] + afteratnum( "..", cStr, 2 ) + ["]
? [ afteratnum("..",cStr,2,2) should be ".a...test!",]
? [ and is "] + afteratnum( "..", cStr, 2, 2 ) + ["]
? ' afteratnum("..",cStr) should be "test!",'
? ' and is "' + afteratnum( "..", cStr ) + '"'
? ' afteratnum("..",cStr,2) should be ".is...a...test!",'
? ' and is "' + afteratnum( "..", cStr, 2 ) + '"'
? ' afteratnum("..",cStr,2,2) should be ".a...test!",'
? ' and is "' + afteratnum( "..", cStr, 2, 2 ) + '"'
?
// Tests with CSetAtMuPa(.T.)
? " Multi-Pass tests"
? " Setting csetatmupa() to .T."
csetatmupa( .T. )
? [ afteratnum("..",cStr) should be "test!",]
? [ and is "] + afteratnum( "..", cStr ) + ["]
? [ afteratnum("..",cStr,2) should be "This...is...a...test!",]
? [ and is "] + afteratnum( "..", cStr, 2 ) + ["]
? [ afteratnum("..",cStr,2,2) should be "is...a...test!",]
? [ and is "] + afteratnum( "..", cStr, 2, 2 ) + ["]
? ' afteratnum("..",cStr) should be "test!",'
? ' and is "' + afteratnum( "..", cStr ) + '"'
? ' afteratnum("..",cStr,2) should be "This...is...a...test!",'
? ' and is "' + afteratnum( "..", cStr, 2 ) + '"'
? ' afteratnum("..",cStr,2,2) should be "is...a...test!",'
? ' and is "' + afteratnum( "..", cStr, 2, 2 ) + '"'
? " Setting csetatmupa() to .F."
csetatmupa( .F. )
?
// Tests mit SetAtlike(1)
? " SetAtLike tests"
? [ Setting setatlike(CT_SETATLIKE_WILDCARD, ".")]
? ' Setting setatlike(CT_SETATLIKE_WILDCARD, ".")'
setatlike( CT_SETATLIKE_WILDCARD, "." )
? [ afteratnum("..",cStr) should be "",]
? [ and is "] + afteratnum( "..", cStr ) + ["]
? [ afteratnum("..",cStr,2,2) should be "s...is...a...test!",]
? [ and is "] + afteratnum( "..", cStr, 2, 2 ) + ["]
? [ afteratnum("..",cStr,2,10) should be ".a...test!",]
? [ and is "] + afteratnum( "..", cStr, 2, 10 ) + ["]
? ' afteratnum("..",cStr) should be "",'
? ' and is "' + afteratnum( "..", cStr ) + '"'
? ' afteratnum("..",cStr,2,2) should be "s...is...a...test!",'
? ' and is "' + afteratnum( "..", cStr, 2, 2 ) + '"'
? ' afteratnum("..",cStr,2,10) should be ".a...test!",'
? ' and is "' + afteratnum( "..", cStr, 2, 10 ) + '"'
?
? "End test of AFTERATNUM()"

View File

@@ -59,9 +59,9 @@ PROCEDURE Main()
? "Begin test of ASCIISUM()"
?
? [ asciisum(replicate("A", 10000)) == 650000 ? --> ] + Str( asciisum( Replicate( "A", 10000 ) ) )
? [ asciisum("0123456789") == 525 ? --> ] + Str( asciisum( "0123456789" ) )
? [ asciisum(NIL) == 0 ? --> ] + Str( asciisum( NIL ) )
? ' asciisum(replicate("A", 10000)) == 650000 ? --> ' + Str( asciisum( Replicate( "A", 10000 ) ) )
? ' asciisum("0123456789") == 525 ? --> ' + Str( asciisum( "0123456789" ) )
? ' asciisum(NIL) == 0 ? --> ' + Str( asciisum( NIL ) )
?
? "End test of ASCIISUM()"

View File

@@ -59,9 +59,9 @@ PROCEDURE Main()
? "Begin test of ASCPOS()"
?
? [ ascpos("0123456789") == 57 ? --> ] + Str( ascpos( "0123456789" ) )
? [ ascpos("0123456789",1) == 48 ? --> ] + Str( ascpos( "0123456789", 1 ) )
? [ ascpos("0123456789",11) == 0 ? --> ] + Str( ascpos( "0123456789", 11 ) )
? ' ascpos("0123456789") == 57 ? --> ' + Str( ascpos( "0123456789" ) )
? ' ascpos("0123456789",1) == 48 ? --> ' + Str( ascpos( "0123456789", 1 ) )
? ' ascpos("0123456789",11) == 0 ? --> ' + Str( ascpos( "0123456789", 11 ) )
?
? "End test of ASCPOS()"

View File

@@ -69,38 +69,38 @@ PROCEDURE Main()
// Some simple tests
? " Simple tests:"
? [ atnum("..",cStr) should be 18,]
? [ and is ], atnum( "..", cStr )
? [ atnum("..",cStr,2) should be 8,]
? [ and is ], atnum( "..", cStr, 2 )
? [ atnum("..",cStr,2,2) should be 13,]
? [ and is ], atnum( "..", cStr, 2, 2 )
? ' atnum("..",cStr) should be 18,'
? ' and is ', atnum( "..", cStr )
? ' atnum("..",cStr,2) should be 8,'
? ' and is ', atnum( "..", cStr, 2 )
? ' atnum("..",cStr,2,2) should be 13,'
? ' and is ', atnum( "..", cStr, 2, 2 )
?
// Tests with CSetAtMuPa(.T.)
? " Multi-Pass tests"
? " Setting csetatmupa() to .T."
csetatmupa( .T. )
? [ atnum("..",cStr) should be 18,]
? [ and is ], atnum( "..", cStr )
? [ atnum("..",cStr,2) should be 2,]
? [ and is ], atnum( "..", cStr, 2 )
? [ atnum("..",cStr,2,2) should be 9,]
? [ and is ], atnum( "..", cStr, 2, 2 )
? ' atnum("..",cStr) should be 18,'
? ' and is ', atnum( "..", cStr )
? ' atnum("..",cStr,2) should be 2,'
? ' and is ', atnum( "..", cStr, 2 )
? ' atnum("..",cStr,2,2) should be 9,'
? ' and is ', atnum( "..", cStr, 2, 2 )
? " Setting csetatmupa() to .F."
csetatmupa( .F. )
?
// Tests mit SetAtlike(1)
? " SetAtLike tests"
? [ Setting setatlike(CT_SETATLIKE_WILDCARD, ".")]
? ' Setting setatlike(CT_SETATLIKE_WILDCARD, ".")'
setatlike( CT_SETATLIKE_WILDCARD, "." )
? [ atnum("..",cStr) should be 23,]
? [ and is ], atnum( "..", cStr )
? [ atnum("..",cStr,2,2) should be 5,]
? [ and is ], atnum( "..", cStr, 2, 2 )
? [ atnum("..",cStr,2,10) should be 13,]
? [ and is ], atnum( "..", cStr, 2, 10 )
? ' atnum("..",cStr) should be 23,'
? ' and is ', atnum( "..", cStr )
? ' atnum("..",cStr,2,2) should be 5,'
? ' and is ', atnum( "..", cStr, 2, 2 )
? ' atnum("..",cStr,2,10) should be 13,'
? ' and is ', atnum( "..", cStr, 2, 10 )
?
? "End test of ATNUM()"

View File

@@ -62,12 +62,12 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ atrepl("ABC", "ABCDABCDABC", "xx") == "xxDxxDxx" ? --> "] + atrepl( "ABC", "ABCDABCDABC", "xx" ) + ["]
? [ atrepl("ABC", "ABCDABC", "ZYXW") == "ZYXWDZYXW" ? --> "] + atrepl( "ABC", "ABCDABC", "ZYXW" ) + ["]
? [ atrepl("ABC", "ABCDABCDABC", "xx", 2) == "xxDxxDABC" ? --> "] + atrepl( "ABC", "ABCDABCDABC", "xx", 2 ) + ["]
? [ atrepl("ABC", "ABCDABCDABC", "xx", 2, .T.) == "ABCDxxDABC" ? --> "] + atrepl( "ABC", "ABCDABCDABC", "xx", 2, .T. ) + ["]
? [ atrepl("ABC", "ABCDABCDABC", "xx", 2, .T., 1) == "ABCDABCDxx" ? ]
? [ --> "] + atrepl( "ABC", "ABCDABCDABC", "xx", 2, .T., 1 ) + ["]
? ' atrepl("ABC", "ABCDABCDABC", "xx") == "xxDxxDxx" ? --> "' + atrepl( "ABC", "ABCDABCDABC", "xx" ) + '"'
? ' atrepl("ABC", "ABCDABC", "ZYXW") == "ZYXWDZYXW" ? --> "' + atrepl( "ABC", "ABCDABC", "ZYXW" ) + '"'
? ' atrepl("ABC", "ABCDABCDABC", "xx", 2) == "xxDxxDABC" ? --> "' + atrepl( "ABC", "ABCDABCDABC", "xx", 2 ) + '"'
? ' atrepl("ABC", "ABCDABCDABC", "xx", 2, .T.) == "ABCDxxDABC" ? --> "' + atrepl( "ABC", "ABCDABCDABC", "xx", 2, .T. ) + '"'
? ' atrepl("ABC", "ABCDABCDABC", "xx", 2, .T., 1) == "ABCDABCDxx" ? '
? ' --> "' + atrepl( "ABC", "ABCDABCDABC", "xx", 2, .T., 1 ) + '"'
? "End test of ATREPL()"
?

View File

@@ -53,7 +53,7 @@
*/
#ifndef __HARBOUR__
#define hb_ntos( n ) LTrim( Str( n ) )
#define hb_ntos( n ) LTrim( Str( n ) )
#endif
PROCEDURE Main()
@@ -68,17 +68,17 @@ PROCEDURE Main()
// Some simple tests
? " Simple tests:"
? [ attoken("Hello, World!") == 8 ? ---------> ] + Str( attoken( "Hello, World!" ) )
? [ attoken("Hello, World!",,2) == 8 ? ------> ] + Str( attoken( "Hello, World!",, 2 ) )
? [ attoken("Hello, World!",,2,1) == 7 ? ----> ] + Str( attoken( "Hello, World!",, 2, 1 ) )
? [ attoken("Hello, World!"," ",2,1) == 8 ? -> ] + Str( attoken( "Hello, World!", " ", 2, 1 ) )
? ' attoken("Hello, World!") == 8 ? ---------> ' + Str( attoken( "Hello, World!" ) )
? ' attoken("Hello, World!",,2) == 8 ? ------> ' + Str( attoken( "Hello, World!",, 2 ) )
? ' attoken("Hello, World!",,2,1) == 7 ? ----> ' + Str( attoken( "Hello, World!",, 2, 1 ) )
? ' attoken("Hello, World!"," ",2,1) == 8 ? -> ' + Str( attoken( "Hello, World!", " ", 2, 1 ) )
?
? [ Tokenizing a string with skip width == 1 and ".!" as tokenizer list:]
? ' Tokenizing a string with skip width == 1 and ".!" as tokenizer list:'
? " Value of cStr is:" + Chr( 34 ) + cStr + Chr( 34 )
?
FOR ni := 1 TO numtoken( cStr, ".!", 1 )
? [ Token #] + hb_ntos( ni ) + [("] + token( cStr, ".!", ni, 1 ) + [")]
? ' Token #' + hb_ntos( ni ) + '("' + token( cStr, ".!", ni, 1 ) + '")'
? " starts at pos " + Str( npos := attoken( cStr, ".!", ni, 1 ), 3 ) + ;
" and is " + iif( SubStr( cStr, npos, 1 ) $ ".!", "", "not " ) + "an empty token."
NEXT

View File

@@ -69,38 +69,38 @@ PROCEDURE Main()
// Some simple tests
? " Simple tests:"
? [ beforatnum("..",cStr) should be "...This...is...a.",]
? [ and is "] + beforatnum( "..", cStr ) + ["]
? [ beforatnum("..",cStr,2) should be "...This",]
? [ and is "] + beforatnum( "..", cStr, 2 ) + ["]
? [ beforatnum("..",cStr,2,2) should be "...This...is",]
? [ and is "] + beforatnum( "..", cStr, 2, 2 ) + ["]
? ' beforatnum("..",cStr) should be "...This...is...a.",'
? ' and is "' + beforatnum( "..", cStr ) + '"'
? ' beforatnum("..",cStr,2) should be "...This",'
? ' and is "' + beforatnum( "..", cStr, 2 ) + '"'
? ' beforatnum("..",cStr,2,2) should be "...This...is",'
? ' and is "' + beforatnum( "..", cStr, 2, 2 ) + '"'
?
// Tests with CSetAtMuPa(.T.)
? " Multi-Pass tests"
? " Setting csetatmupa() to .T."
csetatmupa( .T. )
? [ beforatnum("..",cStr) should be "...This...is...a.",]
? [ and is "] + beforatnum( "..", cStr ) + ["]
? [ beforatnum("..",cStr,2) should be ".",]
? [ and is "] + beforatnum( "..", cStr, 2 ) + ["]
? [ beforatnum("..",cStr,2,2) should be "...This.",]
? [ and is "] + beforatnum( "..", cStr, 2, 2 ) + ["]
? ' beforatnum("..",cStr) should be "...This...is...a.",'
? ' and is "' + beforatnum( "..", cStr ) + '"'
? ' beforatnum("..",cStr,2) should be ".",'
? ' and is "' + beforatnum( "..", cStr, 2 ) + '"'
? ' beforatnum("..",cStr,2,2) should be "...This.",'
? ' and is "' + beforatnum( "..", cStr, 2, 2 ) + '"'
? " Setting csetatmupa() to .F."
csetatmupa( .F. )
?
// Tests mit SetAtlike(1)
? " SetAtLike tests"
? [ Setting setatlike(CT_SETATLIKE_WILDCARD, ".")]
? ' Setting setatlike(CT_SETATLIKE_WILDCARD, ".")'
setatlike( CT_SETATLIKE_WILDCARD, "." )
? [ beforatnum("..",cStr) should be "...This...is...a...tes",]
? [ and is "] + beforatnum( "..", cStr ) + ["]
? [ beforatnum("..",cStr,2,2) should be "...T",]
? [ and is "] + beforatnum( "..", cStr, 2, 2 ) + ["]
? [ beforatnum("..",cStr,2,10) should be "...This...is",]
? [ and is "] + beforatnum( "..", cStr, 2, 10 ) + ["]
? ' beforatnum("..",cStr) should be "...This...is...a...tes",'
? ' and is "' + beforatnum( "..", cStr ) + '"'
? ' beforatnum("..",cStr,2,2) should be "...T",'
? ' and is "' + beforatnum( "..", cStr, 2, 2 ) + '"'
? ' beforatnum("..",cStr,2,10) should be "...This...is",'
? ' and is "' + beforatnum( "..", cStr, 2, 10 ) + '"'
?
? "End test of BEFORATNUM()"

View File

@@ -61,10 +61,10 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ charadd("012345678", chr(1)) == "123456789" ? -> "] + charadd( "012345678", Chr( 1 ) ) + ["]
? [ charadd("012345678", chr(1)+chr(2)) == "133557799" ? -> "] + charadd( "012345678", Chr( 1 ) + Chr( 2 ) ) + ["]
? [ charadd("123456789", chr(255)) == "012345678" ? -> "] + charadd( "123456789", Chr( 255 ) ) + ["]
? [ charadd("123456789", chr(255)+chr(254)) == "002244668" ? -> "] + charadd( "123456789", Chr( 255 ) + Chr( 254 ) ) + ["]
? ' charadd("012345678", chr(1)) == "123456789" ? -> "' + charadd( "012345678", Chr( 1 ) ) + '"'
? ' charadd("012345678", chr(1)+chr(2)) == "133557799" ? -> "' + charadd( "012345678", Chr( 1 ) + Chr( 2 ) ) + '"'
? ' charadd("123456789", chr(255)) == "012345678" ? -> "' + charadd( "123456789", Chr( 255 ) ) + '"'
? ' charadd("123456789", chr(255)+chr(254)) == "002244668" ? -> "' + charadd( "123456789", Chr( 255 ) + Chr( 254 ) ) + '"'
? "End test of CHARADD()"
?

View File

@@ -62,8 +62,8 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ charand("012345678", chr(254)) == "002244668" ? --> "] + charand( "012345678", Chr( 254 ) ) + ["]
? [ charand("012345678", chr(254)+chr(252)) == "002044648" ? --> "] + charand( "012345678", Chr( 254 ) + Chr( 252 ) ) + ["]
? ' charand("012345678", chr(254)) == "002244668" ? --> "' + charand( "012345678", Chr( 254 ) ) + '"'
? ' charand("012345678", chr(254)+chr(252)) == "002044648" ? --> "' + charand( "012345678", Chr( 254 ) + Chr( 252 ) ) + '"'
? "End test of CHARAND()"
?

View File

@@ -61,9 +61,9 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ chareven(" 1 2 3 4 5") == "12345" ? --> "] + chareven( " 1 2 3 4 5" ) + ["]
? [ chareven(" 1 2 3 4 ") == "1234" ? --> "] + chareven( " 1 2 3 4 " ) + ["]
? [ chareven(" ") == "" ? --> "] + chareven( " " ) + ["]
? ' chareven(" 1 2 3 4 5") == "12345" ? --> "' + chareven( " 1 2 3 4 5" ) + '"'
? ' chareven(" 1 2 3 4 ") == "1234" ? --> "' + chareven( " 1 2 3 4 " ) + '"'
? ' chareven(" ") == "" ? --> "' + chareven( " " ) + '"'
? "End test of CHAREVEN()"
?

View File

@@ -63,10 +63,10 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ charhist("Hello World !")] + "[109] == 3 ? --> ", charhist( "Hello World !" )[ 109 ]
? [ aeval(charhist("Hello World !"), {| x | nTotal += x } ) ]
? ' charhist("Hello World !")' + "'109' == 3 ? --> ", charhist( "Hello World !" )' 109 '
? ' aeval(charhist("Hello World !"), {| x | nTotal += x } ) '
AEval( charhist( "Hello World !" ), {| x | nTotal += x } )
? [ ==> nTotal == len("Hello World !") ? --> ], nTotal == Len( "Hello World !" )
? ' ==> nTotal == len("Hello World !") ? --> ', nTotal == Len( "Hello World !" )
? "End test of CHARHIST()"
?

View File

@@ -61,8 +61,8 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ charlist("Hello World !") == "Helo Wrd!" ? -> "] + charlist( "Hello World !" ) + ["]
? [ charlist(NIL) == "" ? -> "] + charlist( NIL ) + ["]
? ' charlist("Hello World !") == "Helo Wrd!" ? -> "' + charlist( "Hello World !" ) + '"'
? ' charlist(NIL) == "" ? -> "' + charlist( NIL ) + '"'
? "End test of CHARLIST()"
?

View File

@@ -61,9 +61,9 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ charmirr("racecar") == "racecar" ? ----------> "] + charmirr( "racecar" ) + ["]
? [ charmirr("racecar ", .T.) == "racecar " ? -> "] + charmirr( "racecar ", .T. ) + ["]
? [ charmirr("racecar ", .F.) == " racecar" ? -> "] + charmirr( "racecar ", .F. ) + ["]
? ' charmirr("racecar") == "racecar" ? ----------> "' + charmirr( "racecar" ) + '"'
? ' charmirr("racecar ", .T.) == "racecar " ? -> "' + charmirr( "racecar ", .T. ) + '"'
? ' charmirr("racecar ", .F.) == " racecar" ? -> "' + charmirr( "racecar ", .F. ) + '"'
? "End test of CHARMIRR()"
?

View File

@@ -61,11 +61,11 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ charmix("ABC", "123") == "A1B2C3" ? --> "] + charmix( "ABC", "123" ) + ["]
? [ charmix("ABCDE", "12") == "A1B2C1D2E1" ? --> "] + charmix( "ABCDE", "12" ) + ["]
? [ charmix("AB", "12345") == "A1B2" ? --> "] + charmix( "AB", "12345" ) + ["]
? [ charmix("HELLO", " ") == "H E L L O " ? --> "] + charmix( "HELLO", " " ) + ["]
? [ charmix("HELLO", "") == "HELLO" ? --> "] + charmix( "HELLO", "" ) + ["]
? ' charmix("ABC", "123") == "A1B2C3" ? --> "' + charmix( "ABC", "123" ) + '"'
? ' charmix("ABCDE", "12") == "A1B2C1D2E1" ? --> "' + charmix( "ABCDE", "12" ) + '"'
? ' charmix("AB", "12345") == "A1B2" ? --> "' + charmix( "AB", "12345" ) + '"'
? ' charmix("HELLO", " ") == "H E L L O " ? --> "' + charmix( "HELLO", " " ) + '"'
? ' charmix("HELLO", "") == "HELLO" ? --> "' + charmix( "HELLO", "" ) + '"'
?
? "End test of CHARMIX()"

View File

@@ -62,8 +62,8 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ charnolist(charnolist("Hello World !")) == " !HWdelor" ? -> "] + charnolist( charnolist( "Hello World !" ) ) + ["]
? [ charnolist(charnolist(NIL)) == "" ? -> "] + charnolist( charnolist( NIL ) ) + ["]
? ' charnolist(charnolist("Hello World !")) == " !HWdelor" ? -> "' + charnolist( charnolist( "Hello World !" ) ) + '"'
? ' charnolist(charnolist(NIL)) == "" ? -> "' + charnolist( charnolist( NIL ) ) + '"'
? "End test of CHARNOLIST()"
?

View File

@@ -53,7 +53,7 @@
*/
#ifndef __HARBOUR__
#define hb_ntos( n ) LTrim( Str( n ) )
#define hb_ntos( n ) LTrim( Str( n ) )
#endif
PROCEDURE Main()
@@ -68,10 +68,10 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ charnot(chr(85)+chr(128)+chr(170)+chr(1)) == ]
? [ chr(170)+chr(127)+chr(85)+chr(254) ? -->]
? ' charnot(chr(85)+chr(128)+chr(170)+chr(1)) == '
? ' chr(170)+chr(127)+chr(85)+chr(254) ? -->'
? [ ]
? ' '
cStr := charnot( Chr( 85 ) + Chr( 128 ) + Chr( 170 ) + Chr( 1 ) )
FOR ni := 1 TO Len( cStr )
?? "chr(" + hb_ntos( Asc( SubStr( cStr, ni, 1 ) ) ) + ")"
@@ -81,8 +81,8 @@ PROCEDURE Main()
NEXT
?
? [ charnot(charnot("This is a test!")) == "This is a test!" ?]
? [ --> "] + charnot( charnot( "This is a test!" ) ) + ["]
? ' charnot(charnot("This is a test!")) == "This is a test!" ?'
? ' --> "' + charnot( charnot( "This is a test!" ) ) + '"'
?
? "End test of CHARNOT()"

View File

@@ -61,8 +61,8 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ charodd("1A2B3C4D5E") == "12345" ? --> "] + charodd( "1A2B3C4D5E" ) + ["]
? [ charodd("1A2B3C4D5") == "12345" ? --> "] + charodd( "1A2B3C4D5" ) + ["]
? ' charodd("1A2B3C4D5E") == "12345" ? --> "' + charodd( "1A2B3C4D5E" ) + '"'
? ' charodd("1A2B3C4D5") == "12345" ? --> "' + charodd( "1A2B3C4D5" ) + '"'
? "End test of CHARODD()"
?

View File

@@ -61,11 +61,11 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ charone("112333a123") == "123a123"? --> "] + charone( "112333a123" ) + ["]
? [ charone("122333a123") == "123a123"? --> "] + charone( "122333a123" ) + ["]
? [ charone("A B CCCD") == "A B CD"? ---> "] + charone( "A B CCCD" ) + ["]
? [ charone(" ", "A B A B") == "A B A B"? --> "] + charone( " ", "A B A B" ) + ["]
? [ charone("o", "122oooB12o") == "122oB12o"? -> "] + charone( "o", "122oooB12o" ) + ["]
? ' charone("112333a123") == "123a123"? --> "' + charone( "112333a123" ) + '"'
? ' charone("122333a123") == "123a123"? --> "' + charone( "122333a123" ) + '"'
? ' charone("A B CCCD") == "A B CD"? ---> "' + charone( "A B CCCD" ) + '"'
? ' charone(" ", "A B A B") == "A B A B"? --> "' + charone( " ", "A B A B" ) + '"'
? ' charone("o", "122oooB12o") == "122oB12o"? -> "' + charone( "o", "122oooB12o" ) + '"'
?
? "End test of CHARONE()"

View File

@@ -61,8 +61,8 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ charonly("0123456789", "0211 - 38 99 77") == "0211389977" ? --> "] + charonly( "0123456789", "0211 - 38 99 77" ) + ["]
? [ charonly("0123456789", "0211/ 389 977") == "0211389977" ? --> "] + charonly( "0123456789", "0211/ 389 977" ) + ["]
? ' charonly("0123456789", "0211 - 38 99 77") == "0211389977" ? --> "' + charonly( "0123456789", "0211 - 38 99 77" ) + '"'
? ' charonly("0123456789", "0211/ 389 977") == "0211389977" ? --> "' + charonly( "0123456789", "0211/ 389 977" ) + '"'
?
? "End test of CHARONLY()"

Some files were not shown because too many files have changed in this diff Show More