2012-11-10 03:43 UTC+0100 Viktor Szakats (harbour syenar.net)

- contrib/gtwvg/gtwvg.c
  + contrib/gtwvg/gtwvgd.c
  - contrib/gtwvg/wvggui.h
  + contrib/gtwvg/gtwgu.h
  - contrib/gtwvg/wvggui.c
  + contrib/gtwvg/gtwgud.c
  * contrib/gtwvg/gtwvg.hbp
  * contrib/gtwvg/gtwvg.hbx
    ! fixed object name collision between compiled gtwvw.hbx
      and gtwvw.c driver code.
    + enabled gtwvg build in dynamic (dll) mode.
    + include HB_GT_WBG and HB_GT_WGU in gtwvg.hbx
    * renamed WGU driver sources to have a consistent
      name with GTWVG.
    ! fixed GTWVG and GTWVU driver code to not abend
      when hb_winMainArg() return false, but fall back
      just like GTWVT does.

  * contrib/gtwvg/tests/demowvg.prg
  * contrib/gtwvg/tests/demowvg1.prg
  * contrib/gtwvg/tests/demoxbp.prg
    * GT driver request tweaks to make it possible to
      run them as scripts.
    + added #require "gtwvg" so that these now work
      as hbrun scripts.

  * contrib/gtwvg/tests/activex.prg
  * contrib/gtwvg/tests/cuigdlgs.prg
  * contrib/gtwvg/tests/demowvg.prg
    * minor cleanups

  * contrib/gtwvg/tests/hbmk.hbm
  - contrib/gtwvg/tests/demowvg.hbp
    % no longer necessary
    * necessary options moved to hbmk.hbm

  * contrib/gtwvg/tests/cuigdlgs.prg
    ! fix to one of prev mods

  - extras/gtwvw/gtwvw.c
  + extras/gtwvw/gtwvwd.c
  * extras/gtwvw/gtwvw.hbp
    ! fixed object name collision between compiled gtwvw.hbx
      and gtwvw.c driver code.

  * contrib/hbnf/tests/metaph.prg
    % optimized code
This commit is contained in:
Viktor Szakats
2012-11-10 02:48:06 +00:00
parent 873c87b340
commit 6de6e1cadd
16 changed files with 205 additions and 129 deletions

View File

@@ -16,6 +16,55 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-11-10 03:43 UTC+0100 Viktor Szakats (harbour syenar.net)
- contrib/gtwvg/gtwvg.c
+ contrib/gtwvg/gtwvgd.c
- contrib/gtwvg/wvggui.h
+ contrib/gtwvg/gtwgu.h
- contrib/gtwvg/wvggui.c
+ contrib/gtwvg/gtwgud.c
* contrib/gtwvg/gtwvg.hbp
* contrib/gtwvg/gtwvg.hbx
! fixed object name collision between compiled gtwvw.hbx
and gtwvw.c driver code.
+ enabled gtwvg build in dynamic (dll) mode.
+ include HB_GT_WBG and HB_GT_WGU in gtwvg.hbx
* renamed WGU driver sources to have a consistent
name with GTWVG.
! fixed GTWVG and GTWVU driver code to not abend
when hb_winMainArg() return false, but fall back
just like GTWVT does.
* contrib/gtwvg/tests/demowvg.prg
* contrib/gtwvg/tests/demowvg1.prg
* contrib/gtwvg/tests/demoxbp.prg
* GT driver request tweaks to make it possible to
run them as scripts.
+ added #require "gtwvg" so that these now work
as hbrun scripts.
* contrib/gtwvg/tests/activex.prg
* contrib/gtwvg/tests/cuigdlgs.prg
* contrib/gtwvg/tests/demowvg.prg
* minor cleanups
* contrib/gtwvg/tests/hbmk.hbm
- contrib/gtwvg/tests/demowvg.hbp
% no longer necessary
* necessary options moved to hbmk.hbm
* contrib/gtwvg/tests/cuigdlgs.prg
! fix to one of prev mods
- extras/gtwvw/gtwvw.c
+ extras/gtwvw/gtwvwd.c
* extras/gtwvw/gtwvw.hbp
! fixed object name collision between compiled gtwvw.hbx
and gtwvw.c driver code.
* contrib/hbnf/tests/metaph.prg
% optimized code
2012-11-10 02:36 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/gtwvg/*.prg
* class declaration formatting cleanups (fixed wrongly

View File

@@ -82,7 +82,7 @@
*
*/
#include "wvggui.h"
#include "gtwgu.h"
static int s_GtId;
static HB_GT_FUNCS SuperTable;
@@ -1241,11 +1241,14 @@ static void hb_gt_wvt_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_Init(%p,%p,%p,%p)", pGT, ( void * ) ( HB_PTRDIFF ) hFilenoStdin, ( void * ) ( HB_PTRDIFF ) hFilenoStdout, ( void * ) ( HB_PTRDIFF ) hFilenoStderr ) );
if( ! hb_winmainArgGet( &hInstance, NULL, &iCmdShow ) )
hb_errInternal( 10001, "It's not a GUI program", NULL, NULL );
{
hInstance = GetModuleHandle( NULL );
iCmdShow = 1;
}
pWVT = hb_gt_wvt_New( pGT, ( HINSTANCE ) hInstance, iCmdShow );
if( ! pWVT )
hb_errInternal( 10001, "Maximum number of WVT windows reached, cannot create another one", NULL, NULL );
hb_errInternal( 10001, "Maximum number of WGU windows reached, cannot create another one", NULL, NULL );
HB_GTLOCAL( pGT ) = ( void * ) pWVT;

View File

@@ -10,17 +10,18 @@
-w3 -es2
-winuni
-stop{!win|hbdyn}
-stop{!win}
hbwin.hbc
# Optimize build time and make sure we build even with this option
-cflag=-DWIN32_LEAN_AND_MEAN
gtwvg.c
gtwvgd.c
gtwgud.c
wvgcore.c
wvgcuig.c
wvggui.c
wvgutils.c
wvgwin.c
wvgwing.c

View File

@@ -1,12 +1,10 @@
/* --------------------------------------------------------------------
* NOTE: Following comments are control commands for the generator.
* Do not edit them unless you know what you are doing.
* NOTE: You can add manual override which functions to include or
* exclude from automatically generated EXTERNAL/DYNAMIC list.
* Syntax: // HB_FUNC_INCLUDE <func>
* // HB_FUNC_EXCLUDE <func>
*/
// HB_FUNC_EXCLUDE HB_GT_*
/* --------------------------------------------------------------------
* WARNING: Automatically generated code below. DO NOT EDIT!
* Regenerate using hbmk2 '-hbx=' option.
@@ -23,6 +21,8 @@
#command DYNAMIC <fncs,...> => EXTERNAL <fncs>
#endif
DYNAMIC HB_GT_WGU
DYNAMIC HB_GT_WVG
DYNAMIC TBrowseWvg
DYNAMIC Wvg3State
DYNAMIC WvgActiveXControl

View File

@@ -2782,11 +2782,14 @@ static void hb_gt_wvt_Init( PHB_GT pGT, HB_FHANDLE hFilenoStdin, HB_FHANDLE hFil
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_Init(%p,%p,%p,%p)", pGT, ( void * ) ( HB_PTRDIFF ) hFilenoStdin, ( void * ) ( HB_PTRDIFF ) hFilenoStdout, ( void * ) ( HB_PTRDIFF ) hFilenoStderr ) );
if( ! hb_winmainArgGet( &hInstance, NULL, &iCmdShow ) )
hb_errInternal( 10001, "It's not a GUI program", NULL, NULL );
{
hInstance = GetModuleHandle( NULL );
iCmdShow = 1;
}
pWVT = hb_gt_wvt_New( pGT, ( HINSTANCE ) hInstance, iCmdShow );
if( ! pWVT )
hb_errInternal( 10001, "Maximum number of WVT windows reached, cannot create another one", NULL, NULL );
hb_errInternal( 10001, "Maximum number of WVG windows reached, cannot create another one", NULL, NULL );
HB_GTLOCAL( pGT ) = ( void * ) pWVT;

View File

@@ -432,7 +432,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"
@@ -453,7 +453,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"
@@ -468,7 +468,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"
@@ -501,7 +501,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"
@@ -519,7 +519,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"
@@ -532,7 +532,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"

View File

@@ -12,7 +12,7 @@
#include "hbgtwvg.ch"
#include "wvgparts.ch"
// Simplified Console with GUI Look
// Simplified Console with GUI Look
PROCEDURE ExecGCUI()
@@ -99,7 +99,7 @@ PROCEDURE GCUIConsole( oCrt )
// Issue the read
READ
My_Alert( "How did you like the "Alert" replacement?", { "WOW", "OK", "OOps" } )
My_Alert( "How did you like the 'Alert' replacement?", { "WOW", "OK", "OOps" } )
RETURN

View File

@@ -1,20 +0,0 @@
#
# $Id$
#
-inc
-w3 -es2
-mt
-gtwvg
demowvg.prg
wvtcls.prg
tbrowser.prg
utils.prg
dyndlgs.prg
modal.prg
cuigdlgs.prg
xbp.prg
activex.prg

View File

@@ -18,14 +18,16 @@
//
// Thanks Peter Rees! You have laid the foundation!
#require "gtwvg"
#include "inkey.ch"
#include "wvtwin.ch"
#include "hbgtinfo.ch"
#include "hbgtwvg.ch"
#include "wvgparts.ch"
REQUEST DbfCdx
REQUEST DbfNtx
REQUEST DBFCDX
REQUEST DBFNTX
#define IMAGE_VOUCH hb_dirBase() + "vouch1.bmp"
#define IMAGE_BROWSE hb_dirBase() + "v_browse.ico"
@@ -85,6 +87,10 @@ PROCEDURE Main()
LOCAL oLastMenu
LOCAL oError := ErrorBlock( {| o | MyError( o ) } )
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVG" )
#endif
SET DATE ANSI
SET CENTURY ON
@@ -180,14 +186,6 @@ PROCEDURE Main()
RETURN
FUNCTION hb_GTSYS()
REQUEST HB_GT_WVG_DEFAULT
REQUEST HB_GT_WVT
REQUEST HB_GT_WGU
RETURN NIL
PROCEDURE WvtConsoleGets( nMode )
hb_default( @nMode, 0 )
@@ -594,3 +592,24 @@ FUNCTION BuildButtons()
oXbp:toolTipText := "Flat Button . Lines: press ESC when finished."
RETURN NIL
#if ! defined( __HBSCRIPT__HBSHELL )
FUNCTION hb_GTSYS()
REQUEST HB_GT_WVG_DEFAULT
REQUEST HB_GT_WVT
REQUEST HB_GT_WGU
RETURN NIL
#endif
SET PROCEDURE TO "activex.prg"
SET PROCEDURE TO "cuigdlgs.prg"
SET PROCEDURE TO "dyndlgs.prg"
SET PROCEDURE TO "modal.prg"
SET PROCEDURE TO "tbrowser.prg"
SET PROCEDURE TO "utils.prg"
SET PROCEDURE TO "wvtcls.prg"
SET PROCEDURE TO "xbp.prg"

View File

@@ -6,6 +6,8 @@
//
// Pritpal Bedi <bedipritpal@hotmail.com>
#require "gtwvg"
#include "inkey.ch"
#include "wvtwin.ch"
#include "hbgtinfo.ch"
@@ -25,6 +27,10 @@ PROCEDURE Main()
LOCAL aPaint
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVG" )
#endif
SET DATE ANSI
Set( _SET_EVENTMASK, INKEY_ALL + HB_INKEY_GTEVENT )
@@ -103,16 +109,6 @@ STATIC FUNCTION ExecForm( aPaint )
RETURN NIL
FUNCTION hb_GTSYS()
REQUEST HB_GT_WVG_DEFAULT
REQUEST HB_GT_WVT
REQUEST HB_GT_WGU
RETURN NIL
FUNCTION SetGT( nIndex, pGT )
LOCAL oldGT
@@ -198,3 +194,15 @@ FUNCTION DoModalDialog()
WvtSetPaint( aPnt )
RETURN NIL
#if ! defined( __HBSCRIPT__HBSHELL )
FUNCTION hb_GTSYS()
REQUEST HB_GT_WVG_DEFAULT
REQUEST HB_GT_WVT
REQUEST HB_GT_WGU
RETURN NIL
#endif

View File

@@ -10,6 +10,8 @@
// Pritpal Bedi <pritpal@vouchcac.com>
// 08Dec2008
#require "gtwvg"
#include "inkey.ch"
#include "wvtwin.ch"
#include "hbgtinfo.ch"
@@ -25,6 +27,10 @@ PROCEDURE Main()
LOCAL aState := { "not selected", "selected", "undefined" }
LOCAL aParts := {}
#if defined( __HBSCRIPT__HBSHELL ) .AND. defined( __PLATFORM__WINDOWS )
hbshell_gtSelect( "GTWVG" )
#endif
// --------------------------- Dialog -------------------------------\\
oCrt := WvgDialog():new( , , { 30, 30 }, { 900, 600 }, , .T. )
oCrt:closable := .T.
@@ -418,6 +424,8 @@ STATIC FUNCTION ExeFontDialog( oCrt )
RETURN NIL
#if ! defined( __HBSCRIPT__HBSHELL )
FUNCTION hb_GTSYS()
REQUEST HB_GT_GUI_DEFAULT
@@ -426,3 +434,5 @@ FUNCTION hb_GTSYS()
REQUEST HB_GT_WGU
RETURN NIL
#endif

View File

@@ -5,3 +5,6 @@
gtwvg.hbc
-w3 -es2
-mt
-gtwvg

View File

@@ -6,82 +6,81 @@
PROCEDURE Main()
LOCAL aNames := {}
// Demo will create an array of names and display in 3 columns
// _ftRow() and _ftCol() will calculate the screen co-ordinates
// by evaluating the element number
LOCAL aNames := { ;
"Adams", ;
"Addams", ;
"Atoms", ;
"Adamson", ;
"Cajun", ;
"Cagen", ;
"Cochy", ;
"Cocci", ;
"Smith", ;
"Smythe", ;
"Naylor", ;
"Nailer", ;
"Holberry", ;
"Wholebary", ;
"Jackson", ;
"Jekksen", ;
"The Source", ;
"The Sores", ;
"Jones", ;
"Johns", ;
"Lennon", ;
"Lenin", ;
"Fischer", ;
"Fisher", ;
"O'Donnell", ;
"O Donald", ;
"Pugh", ;
"Pew", ;
"Heimendinger", ;
"Hymendinker", ;
"Knight", ;
"Nite", ;
"Lamb", ;
"Lamb Chops", ;
"Stephens", ;
"Stevens", ;
"Neilson", ;
"Nelson", ;
"Tchaikovski", ;
"Chikofski", ;
"Caton", ;
"Wright", ;
"Write", ;
"Right", ;
"Manual", ;
"Now", ;
"Wheatabix", ;
"Science", ;
"Cinzano", ;
"Lucy", ;
"Reece", ;
"Righetti", ;
"Oppermann", ;
"Bookkeeper", ;
"McGill", ;
"Magic", ;
"McLean", ;
"McLane", ;
"Maclean", ;
"Exxon" }
Set( _SET_SCOREBOARD, .F. )
SetColor( "W/B" )
CLS
// Demo will create an array of names and display in 3 columns
// _ftRow() and _ftCol() will calculate the screen co-ordinates
// by evaluating the element number
AAdd( aNames, "Adams" )
AAdd( aNames, "Addams" )
AAdd( aNames, "Atoms" )
AAdd( aNames, "Adamson" )
AAdd( aNames, "Cajun" )
AAdd( aNames, "Cagen" )
AAdd( aNames, "Cochy" )
AAdd( aNames, "Cocci" )
AAdd( aNames, "Smith" )
AAdd( aNames, "Smythe" )
AAdd( aNames, "Naylor" )
AAdd( aNames, "Nailer" )
AAdd( aNames, "Holberry" )
AAdd( aNames, "Wholebary" )
AAdd( aNames, "Jackson" )
AAdd( aNames, "Jekksen" )
AAdd( aNames, "The Source" )
AAdd( aNames, "The Sores" )
AAdd( aNames, "Jones" )
AAdd( aNames, "Johns" )
AAdd( aNames, "Lennon" )
AAdd( aNames, "Lenin" )
AAdd( aNames, "Fischer" )
AAdd( aNames, "Fisher" )
AAdd( aNames, "O'Donnell" )
AAdd( aNames, "O Donald" )
AAdd( aNames, "Pugh" )
AAdd( aNames, "Pew" )
AAdd( aNames, "Heimendinger" )
AAdd( aNames, "Hymendinker" )
AAdd( aNames, "Knight" )
AAdd( aNames, "Nite" )
AAdd( aNames, "Lamb" )
AAdd( aNames, "Lamb Chops" )
AAdd( aNames, "Stephens" )
AAdd( aNames, "Stevens" )
AAdd( aNames, "Neilson" )
AAdd( aNames, "Nelson" )
AAdd( aNames, "Tchaikovski" )
AAdd( aNames, "Chikofski" )
AAdd( aNames, "Caton" )
AAdd( aNames, "Wright" )
AAdd( aNames, "Write" )
AAdd( aNames, "Right" )
AAdd( aNames, "Manual" )
AAdd( aNames, "Now" )
AAdd( aNames, "Wheatabix" )
AAdd( aNames, "Science" )
AAdd( aNames, "Cinzano" )
AAdd( aNames, "Lucy" )
AAdd( aNames, "Reece" )
AAdd( aNames, "Righetti" )
AAdd( aNames, "Oppermann" )
AAdd( aNames, "Bookkeeper" )
AAdd( aNames, "McGill" )
AAdd( aNames, "Magic" )
AAdd( aNames, "McLean" )
AAdd( aNames, "McLane" )
AAdd( aNames, "Maclean" )
AAdd( aNames, "Exxon" )
// display names and metaphones in 3 columns on screen
AEval( aNames, ;
{| cName, nElem | ;
SetPos( _ftRow( nElem ), _ftCol( nElem ) ), ;
QQOut( PadR( cName, 18, "." ) + ft_Metaph( cName ) ) ;
SetPos( _ftRow( nElem ), _ftCol( nElem ) ), ;
QQOut( PadR( cName, 18, "." ) + ft_Metaph( cName ) ) ;
} )
SetPos( 21, 0 )

View File

@@ -17,7 +17,8 @@
gtwvw.hbx
gtwvw.c
gtwvwd.c
wvwcheck.c
wvwdraw.c
wvwedit.c