diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3325fa2c22..8a4f69d2aa 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,20 @@ The license applies to all entries newer than 2009-04-28. */ +2012-11-10 01:40 UTC+0100 Viktor Szakats (harbour syenar.net) + * contrib/gtwvg/tests/activex.prg + * contrib/gtwvg/tests/cuigdlgs.prg + * contrib/gtwvg/tests/demowvg.prg + * contrib/gtwvg/tests/demowvg1.prg + * contrib/gtwvg/tests/demoxbp.prg + * contrib/gtwvg/tests/dyndlgs.prg + * contrib/gtwvg/tests/modal.prg + * contrib/gtwvg/tests/tbrowser.prg + * contrib/gtwvg/tests/utils.prg + * contrib/gtwvg/tests/wvtcls.prg + * contrib/gtwvg/tests/xbp.prg + * deleted empty comments + 2012-11-10 01:04 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/gtwvg/crt.prg * contrib/gtwvg/paint.prg diff --git a/harbour/contrib/gtwvg/tests/activex.prg b/harbour/contrib/gtwvg/tests/activex.prg index 2a67f6feeb..77c2c4147d 100644 --- a/harbour/contrib/gtwvg/tests/activex.prg +++ b/harbour/contrib/gtwvg/tests/activex.prg @@ -6,17 +6,13 @@ * Pritpal Bedi */ -// - #include "inkey.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" #include "wvgparts.ch" -// // The function has to be called via hb_threadStart( {|| ExecuteActiveX( nActiveX ) } ) -// FUNCTION ExecuteActiveX( nActiveX, xParam ) @@ -241,8 +237,6 @@ FUNCTION ExecuteActiveX( nActiveX, xParam ) RETURN NIL -// - STATIC FUNCTION ResizeDialog( oCrt, oTBar, oSBar, oStatic, oCom, oTree ) LOCAL aCrt, aTBar, aSBar @@ -271,8 +265,6 @@ STATIC FUNCTION ResizeDialog( oCrt, oTBar, oSBar, oStatic, oCom, oTree ) RETURN 1 -// - STATIC FUNCTION ActiveXBuildMenu( oCrt, oStatic, oStatic2 ) LOCAL oMenuBar, oSubMenu @@ -310,8 +302,6 @@ STATIC FUNCTION ActiveXBuildMenu( oCrt, oStatic, oStatic2 ) RETURN NIL -// - STATIC FUNCTION BuildActiveXControl( nActiveX, oDA ) LOCAL oCom @@ -377,8 +367,6 @@ STATIC FUNCTION BuildActiveXControl( nActiveX, oDA ) RETURN oCom -// - STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam ) LOCAL nKey, sData @@ -386,7 +374,6 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam ) STATIC s_nTurn := 0 // After :CREATE() Messages - // IF nActiveX == 1 hb_gtInfo( HB_GTI_WINTITLE, iif( Empty( xParam ), "http://hbide.vouch.info", xParam ) ) oCom:AddressBar := .T. @@ -595,8 +582,6 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam ) RETURN NIL -// - STATIC FUNCTION ConfigureRMChart( RMChart ) LOCAL oRegion @@ -640,8 +625,6 @@ STATIC FUNCTION ConfigureRMChart( RMChart ) RETURN NIL -// - STATIC FUNCTION MyFunction( nMode ) #define MUSIC_WAITON { 800, 1600 } @@ -671,5 +654,3 @@ STATIC FUNCTION MyFunction( nMode ) ENDCASE RETURN NIL - -// diff --git a/harbour/contrib/gtwvg/tests/cuigdlgs.prg b/harbour/contrib/gtwvg/tests/cuigdlgs.prg index 675e9d9b1a..db776bf00b 100644 --- a/harbour/contrib/gtwvg/tests/cuigdlgs.prg +++ b/harbour/contrib/gtwvg/tests/cuigdlgs.prg @@ -6,19 +6,13 @@ * Pritpal Bedi */ -// - #include "inkey.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" #include "wvgparts.ch" -// -// // Simplified Console with GUI Look -// -// PROCEDURE ExecGCUI() @@ -32,8 +26,6 @@ PROCEDURE ExecGCUI() RETURN -// - #xtranslate Alert( => MyAlert( PROCEDURE GCUIConsole( oCrt ) @@ -81,25 +73,24 @@ PROCEDURE GCUIConsole( oCrt ) WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 0, 0, 0 ) ), .T. } // The only additional calls to render your console GUI - // // The GETLIST : This can be embedded via @ GET preprocessor command AEval( GetList, {| oGet | Wvg_BoxGet( oGet:Row, oGet:Col, Len( Transform( oGet:VarGet(), oGet:Picture ) ) ) } ) - // + hBoxR := Wvg_BoxRaised( 1, 2, 18, 49, { -5, -5, 5, 5 } ) - // + Wvg_BoxRecessed( 1, 2, 18, 49 ) - // + // Wvg_BoxGroup( 2, 4, 17, 47 ) - // + Wvg_BoxGroupRaised( 2, 4, 17, 47, { -7, -7, 7, 7 } ) - // + hTxt := Wvg_TextBox( 3, 57, 16, 75, { 10, 10, -10, -10 }, "This is first TextBox Line!", 2, 2 ) - // + Wvg_Image( 15, 36, 16, 42, { -3, -3, 3, 3 }, GOBJ_IMAGESOURCE_FILE, GetResource( "Vouch1.bmp" ) ) Wvg_BoxRaised( 15, 36, 16, 42, { -2, -2, 2, 2 } ) - // + Wvg_ShadedRect( 1, 54, 18, 79, { -5, -5, 5, 5 }, 0, { 65000, 21000, 7000, 56000 }, { 255, 32255, 16000, 32500 } ) - // + Wvg_BoxRaised( 1, 54, 18, 79, { -5, -5, 5, 5 } ) // Instruct GT to Repaint the Screen with GUI elements. @@ -112,8 +103,6 @@ PROCEDURE GCUIConsole( oCrt ) RETURN -// - STATIC FUNCTION FetchText( nMode ) LOCAL cText @@ -133,5 +122,3 @@ STATIC FUNCTION FetchText( nMode ) ENDCASE RETURN cText - -// diff --git a/harbour/contrib/gtwvg/tests/demowvg.prg b/harbour/contrib/gtwvg/tests/demowvg.prg index e8c454bc11..7142d7c70b 100644 --- a/harbour/contrib/gtwvg/tests/demowvg.prg +++ b/harbour/contrib/gtwvg/tests/demowvg.prg @@ -2,10 +2,6 @@ * $Id$ */ -// -// -// -// // GTWVT Console GUI Interface // // Pritpal Bedi @@ -21,9 +17,6 @@ // you all will cooperate to enhance it further. // // Thanks Peter Rees! You have laid the foundation! -// -// -// #include "inkey.ch" #include "wvtwin.ch" @@ -31,13 +24,9 @@ #include "hbgtwvg.ch" #include "wvgparts.ch" -// - REQUEST DbfCdx REQUEST DbfNtx -// - #define IMAGE_VOUCH hb_dirBase() + "vouch1.bmp" #define IMAGE_BROWSE hb_dirBase() + "v_browse.ico" #define IMAGE_VR hb_dirBase() + "vr_1.ico" @@ -47,26 +36,18 @@ REQUEST DbfNtx #define OBJ_TYPE_BUTTON 1 -// - #ifndef __SQL__ ANNOUNCE Hb_NoStartUpWindow #endif -// - MEMVAR cCdxExp, First, Last, City -// - THREAD STATIC t_wvtScreen := {} #ifdef __XCC__ STATIC s_paint_ := { { "", {} } } #endif -// - EXIT PROCEDURE CleanHandles() LOCAL obj @@ -82,8 +63,6 @@ EXIT PROCEDURE CleanHandles() RETURN -// - PROCEDURE Main() LOCAL aLastPaint, clr, scr, pGT @@ -187,7 +166,6 @@ PROCEDURE Main() READ // Restore Environment - // WvtSetBlocks( aLastPaint ) WvtSetObjects( aObjects ) SetColor( clr ) @@ -202,8 +180,6 @@ PROCEDURE Main() RETURN -// - FUNCTION hb_GTSYS() REQUEST HB_GT_WVG_DEFAULT @@ -212,8 +188,6 @@ FUNCTION hb_GTSYS() RETURN NIL -// - PROCEDURE WvtConsoleGets( nMode ) hb_default( @nMode, 0 ) @@ -227,8 +201,6 @@ PROCEDURE WvtConsoleGets( nMode ) RETURN -// - PROCEDURE WvtNextGetsConsole() LOCAL dDate := SToD() @@ -263,8 +235,6 @@ PROCEDURE WvtNextGetsConsole() RETURN -// - PROCEDURE WvtNextGets() IF hb_mtvm() @@ -276,8 +246,6 @@ PROCEDURE WvtNextGets() RETURN -// - PROCEDURE WvtNextGets_X() LOCAL aLastPaint, clr @@ -302,7 +270,6 @@ PROCEDURE WvtNextGets_X() // Change the values of pallatte arbitrarily though yu can fine tune // these values with realistic values. - // aNewPalette[ 8 ] := aNewPalette[ 8 ] + ( 100000 * ++s_nPalletMultiplier ) Wvt_SetPalette( aNewPalette ) @@ -346,7 +313,6 @@ PROCEDURE WvtNextGets_X() READ // Restore Environment - // Wvt_SetPalette( aPalette ) WvtSetObjects( aObjects ) WvtSetBlocks( aLastPaint ) @@ -358,8 +324,6 @@ PROCEDURE WvtNextGets_X() RETURN -// - FUNCTION WvtPartialScreen() LOCAL scr := SaveScreen( 7, 20, 15, 60 ) @@ -402,8 +366,6 @@ FUNCTION WvtPartialScreen() RETURN NIL -// - FUNCTION WvtLines() LOCAL scr := SaveScreen( 0, 0, MaxRow(), MaxCol() ) @@ -453,7 +415,6 @@ FUNCTION WvtLines() ENDDO // Restore Environments - // SetColor( clr ) WvtSetBlocks( aLastPaint ) @@ -464,8 +425,6 @@ FUNCTION WvtLines() RETURN NIL -// - FUNCTION BuildMainMenu() LOCAL oMenu @@ -543,8 +502,6 @@ FUNCTION BuildMainMenu() RETURN oMenu /* The last submenu item */ -// - STATIC FUNCTION GoogleMap() LOCAL mfrom1, mto1, mfrom2, mto2, mfrom3, mto3, mweb @@ -585,8 +542,6 @@ STATIC FUNCTION GoogleMap() RETURN NIL -// - FUNCTION BuildButtons() LOCAL oXbp @@ -639,5 +594,3 @@ FUNCTION BuildButtons() oXbp:toolTipText := "Flat Button . Lines: press ESC when finished." RETURN NIL - -// diff --git a/harbour/contrib/gtwvg/tests/demowvg1.prg b/harbour/contrib/gtwvg/tests/demowvg1.prg index 24882ebd1e..820779aa73 100644 --- a/harbour/contrib/gtwvg/tests/demowvg1.prg +++ b/harbour/contrib/gtwvg/tests/demowvg1.prg @@ -2,13 +2,9 @@ * $Id$ */ -// -// // GTWVT Console GUI Interface // // Pritpal Bedi -// -// #include "inkey.ch" #include "wvtwin.ch" @@ -16,8 +12,6 @@ #include "hbgtwvg.ch" #include "wvgparts.ch" -// - #define IMAGE_VOUCH hb_dirBase() + "vouch1.bmp" #define IMAGE_BROWSE hb_dirBase() + "v_browse.ico" #define IMAGE_VR hb_dirBase() + "vr_1.ico" @@ -25,12 +19,8 @@ #define IMAGE_TOOLS hb_dirBase() + "v_tools.ico" #define IMAGE_HELP hb_dirBase() + "v_notes.ico" -// - MEMVAR GetList -// - PROCEDURE Main() LOCAL aPaint @@ -66,7 +56,6 @@ PROCEDURE Main() RETURN -// /* This function must be linked with the application */ FUNCTION Wvt_Paint() @@ -75,8 +64,6 @@ FUNCTION Wvt_Paint() RETURN NIL -// - STATIC FUNCTION ExecForm( aPaint ) LOCAL cColor := SetColor() @@ -116,8 +103,6 @@ STATIC FUNCTION ExecForm( aPaint ) RETURN NIL -// - FUNCTION hb_GTSYS() REQUEST HB_GT_WVG_DEFAULT @@ -128,8 +113,6 @@ REQUEST HB_GT_WGU RETURN NIL -// - FUNCTION SetGT( nIndex, pGT ) LOCAL oldGT @@ -142,8 +125,6 @@ FUNCTION SetGT( nIndex, pGT ) RETURN oldGT -// - STATIC FUNCTION MyChoice( aChoices ) LOCAL scr, clr, nChoice @@ -160,26 +141,19 @@ STATIC FUNCTION MyChoice( aChoices ) RETURN nChoice -// - FUNCTION rgb( r, g, b ) RETURN r + ( g * 256 ) + ( b * 256 * 256 ) -// - FUNCTION DispStatusMsg( cMsg ) ClearStatusMsg() /* NOTE: The GUI function used as such is not subject to autopainting */ - // Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, rgb( 198, 198, 198 ), "Arial", 18, , 900 ) RETURN .T. -// - FUNCTION ClearStatusMsg() LOCAL nRow := Row() @@ -190,8 +164,6 @@ FUNCTION ClearStatusMsg() RETURN .T. -// - FUNCTION DoModalDialog() LOCAL oCrt, nSel @@ -226,5 +198,3 @@ FUNCTION DoModalDialog() WvtSetPaint( aPnt ) RETURN NIL - -// diff --git a/harbour/contrib/gtwvg/tests/demoxbp.prg b/harbour/contrib/gtwvg/tests/demoxbp.prg index 4a0b446db3..440c6cfd87 100644 --- a/harbour/contrib/gtwvg/tests/demoxbp.prg +++ b/harbour/contrib/gtwvg/tests/demoxbp.prg @@ -2,10 +2,6 @@ * $Id$ */ -// -// -// -// // EnOnkar // ( The Lord is ONE ) // . @@ -13,10 +9,6 @@ // // Pritpal Bedi // 08Dec2008 -// -// -// -// #include "inkey.ch" #include "wvtwin.ch" @@ -24,8 +16,6 @@ #include "hbgtwvg.ch" #include "wvgparts.ch" -// - PROCEDURE Main() LOCAL oCrt, oTBar, oSBar, oStatic, oCom, oXbp, oTree, oItem1, oItem2 @@ -267,8 +257,6 @@ PROCEDURE Main() RETURN -// - STATIC FUNCTION ResizeDialogXbp( oCrt, oTBar, oSBar, oStatic, oCom, oTree, oAddr ) LOCAL aCrt, aTBar, aSBar @@ -296,8 +284,6 @@ STATIC FUNCTION ResizeDialogXbp( oCrt, oTBar, oSBar, oStatic, oCom, oTree, oAddr RETURN 1 -// - STATIC FUNCTION ActiveXBuildMenuXbp( oCrt, oStatic, oStatic2 ) LOCAL oMenuBar, oSubMenu @@ -338,8 +324,6 @@ STATIC FUNCTION ActiveXBuildMenuXbp( oCrt, oStatic, oStatic2 ) RETURN NIL -// - STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt ) LOCAL oTBar @@ -372,8 +356,6 @@ STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt ) RETURN oTBar -// - STATIC FUNCTION MyFunctionXbp( nMode ) #define MUSIC_WAITON {800, 1600} @@ -404,8 +386,6 @@ STATIC FUNCTION MyFunctionXbp( nMode ) RETURN NIL -// - STATIC FUNCTION ExeFontDialog( oCrt ) LOCAL oFontDlg, oWvgFont @@ -438,8 +418,6 @@ STATIC FUNCTION ExeFontDialog( oCrt ) RETURN NIL -// - FUNCTION hb_GTSYS() REQUEST HB_GT_GUI_DEFAULT @@ -448,5 +426,3 @@ FUNCTION hb_GTSYS() REQUEST HB_GT_WGU RETURN NIL - -// diff --git a/harbour/contrib/gtwvg/tests/dyndlgs.prg b/harbour/contrib/gtwvg/tests/dyndlgs.prg index 2782e1b28f..de0dcd7771 100644 --- a/harbour/contrib/gtwvg/tests/dyndlgs.prg +++ b/harbour/contrib/gtwvg/tests/dyndlgs.prg @@ -6,16 +6,12 @@ * Pritpal Bedi */ -// - #include "inkey.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" #include "wvgparts.ch" -// - #define ID_BTN_OK 1 #define ID_MLE 10 #define ID_CHK_SATIS 11 @@ -36,12 +32,8 @@ #define ID_MNU_FILE 201 #define ID_MNU_CONTROL 202 -// - THREAD STATIC t_aSlides := {} -// - FUNCTION DynWinDialog( nInfo ) LOCAL hDlg, aDlg, nStyle, cDlgIcon, cDlgProc, lOnTop, hMenu @@ -56,13 +48,11 @@ FUNCTION DynWinDialog( nInfo ) iif( nInfo % 2 == 0, "Modeless", "Modal" ), " Dialog !", nStyle ) // Multi line edit control - // nStyle := WS_CHILD + WS_VISIBLE + WS_TABSTOP + ES_AUTOVSCROLL + ES_MULTILINE + ; ES_WANTRETURN + WS_BORDER + WS_VSCROLL aDlg := Wvt_AddDlgItem( aDlg, 1, 2, 15, 35, {}, ID_MLE , "EDIT" , nStyle, /* cText, nHelpId, nExStyle */ ) // Two Horz and Vert Lines - // nStyle := WS_CHILD + WS_VISIBLE + SS_ETCHEDVERT aDlg := Wvt_AddDlgItem( aDlg, 1, 39, 16, 1, {}, 111 , "STATIC" , nStyle ) nStyle := WS_CHILD + WS_VISIBLE + SS_ETCHEDHORZ @@ -122,12 +112,10 @@ FUNCTION DynWinDialog( nInfo ) IF nInfo == 2 // Modal Dialog - // //hDlg := Wvt_DialogBox( aDlg, bDlgProc, Wvt_GetWindowHandle() ) hDlg := Wvt_DialogBox( aDlg, cDlgProc, Wvt_GetWindowHandle() ) ELSE // Modeless Dialog - // hDlg := Wvt_CreateDialog( aDlg, lOnTop, cDlgProc, cDlgIcon, /*nTimerTicks*/, hMenu ) // Using Function name. @@ -136,8 +124,6 @@ FUNCTION DynWinDialog( nInfo ) RETURN hDlg -// - FUNCTION DynDlgProc( hDlg, nMsg, wParam, lParam ) LOCAL lClicked, cPrompt, nIndex, hFont, aHFonts @@ -265,7 +251,6 @@ FUNCTION DynDlgProc( hDlg, nMsg, wParam, lParam ) CASE WM_DESTROY // Do whatevert you want to do with cText // Each box will retrieve its own text. - // /* cText := */ Wvg_GetDlgItemText( hDlg, ID_MLE ) EXIT @@ -273,8 +258,6 @@ FUNCTION DynDlgProc( hDlg, nMsg, wParam, lParam ) RETURN 0 -// - STATIC FUNCTION GetEditText() LOCAL cText := "" @@ -306,8 +289,6 @@ STATIC FUNCTION GetEditText() RETURN cText -// - FUNCTION DlgSlideShow() LOCAL hDlg, aDlg, nStyle @@ -322,8 +303,6 @@ FUNCTION DlgSlideShow() RETURN hDlg -// - FUNCTION DlgSlideShowProc( hDlg, nMsg, wParam, lParam ) THREAD STATIC t_nSlide := 1 @@ -353,8 +332,6 @@ FUNCTION DlgSlideShowProc( hDlg, nMsg, wParam, lParam ) RETURN 0 -// - FUNCTION DrawSlide( hDlg, nSlide ) LOCAL hDC, aRect @@ -369,5 +346,3 @@ FUNCTION DrawSlide( hDlg, nSlide ) Wvg_ReleaseDC( hDlg, hDC ) RETURN NIL - -// diff --git a/harbour/contrib/gtwvg/tests/modal.prg b/harbour/contrib/gtwvg/tests/modal.prg index f116811887..8d5ae0860c 100644 --- a/harbour/contrib/gtwvg/tests/modal.prg +++ b/harbour/contrib/gtwvg/tests/modal.prg @@ -1,20 +1,17 @@ /* * $Id$ */ + /* * Pritpal Bedi */ -// - #include "inkey.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" #include "wvgparts.ch" -// - #xuntranslate alert( => FUNCTION MyAlert( cMsg, aOpt ) @@ -39,14 +36,10 @@ FUNCTION MyAlert( cMsg, aOpt ) #xtranslate Alert( => MyAlert( -// - FUNCTION My_Alert( cMessage, aOptions, cCaption, nInit, nTime ) RETURN DialogAlert( cCaption, cMessage, aOptions, nInit, , , nTime ) -// - #xuntranslate alert( => FUNCTION Just_Alert( cMsg, aOpt ) @@ -55,8 +48,6 @@ FUNCTION Just_Alert( cMsg, aOpt ) #xtranslate Alert( => MyAlert( -// - #define DLG_CLR_MOUSE 1 #define DLG_CLR_CAPT 2 #define DLG_CLR_TEXT 3 @@ -89,8 +80,6 @@ FUNCTION Just_Alert( cMsg, aOpt ) <.lModal.>, <.lRowCols.>, <.lHidden.>, <.lCenter.>, ; , , <.lNoTitleBar.> ) -// - FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime ) LOCAL nLinesRqd, nColRqd, nLeft, nBottom, nRight, oCrt @@ -150,7 +139,6 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime ) NEXT // Create a new Window - // B_CRT nTop, nLeft, nBottom - 1, nRight MODAL ICON "dia_excl.ico" TITLE " " + cCaption INTO oCrt nTop := -1 @@ -185,7 +173,6 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime ) ENDIF // display buttons - // FOR i := 1 TO Len( aButtons_ ) SetColor( pal_[ DLG_CLR_BTN ] ) @ nBtnRow, nBtnCol_[ i ] SAY " " + aButtons_[ i ] + " " @@ -281,8 +268,6 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime ) RETURN sel -// - FUNCTION CreateOCrt( nT, nL, nB, nR, cTitle, xIcon, lModal, lRowCols, lHidden, ; lCenter, nRow, nCol, lNoTitleBar ) @@ -325,8 +310,6 @@ FUNCTION CreateOCrt( nT, nL, nB, nR, cTitle, xIcon, lModal, lRowCols, lHidden, ; RETURN oCrt -// - FUNCTION DoModalWindow() LOCAL oCrt, nSel, pGT @@ -354,7 +337,6 @@ FUNCTION DoModalWindow() pGT := SetGT( 3, hb_gtSelect() ) // Here goes the Clipper Code - // SetColor( "N/W" ) CLS DO WHILE .T. @@ -372,5 +354,3 @@ FUNCTION DoModalWindow() WvtSetBlocks( aLastPaint ) RETURN NIL - -// diff --git a/harbour/contrib/gtwvg/tests/tbrowser.prg b/harbour/contrib/gtwvg/tests/tbrowser.prg index fcabc15cf0..376dc0d00c 100644 --- a/harbour/contrib/gtwvg/tests/tbrowser.prg +++ b/harbour/contrib/gtwvg/tests/tbrowser.prg @@ -12,16 +12,12 @@ * Pritpal Bedi */ -// - #include "inkey.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" #include "wvgparts.ch" -// - #define K_MOVING 1001 #define K_SBLINEUP 1051 @@ -37,8 +33,6 @@ #define K_SBTHUMBTRACKVERT 1059 #define K_SBTHUMBTRACKHORZ 1060 -// - FUNCTION WvtMyBrowse() IF hb_mtvm() @@ -57,8 +51,6 @@ FUNCTION WvtMyBrowse() RETURN NIL -// - FUNCTION ExecBrowser( oCrt ) LOCAL nKey, bBlock, oBrowse, aLastPaint, i, pGT @@ -230,8 +222,6 @@ FUNCTION ExecBrowser( oCrt ) RETURN NIL -// - STATIC FUNCTION BrwHandleResize( oCrt, oBrw, oVBar, oHBar, oCom, oSLE, oLBx, oTre, oChk, aNvg, oIdx, lActiveX, cFileDbf ) HB_SYMBOL_UNUSED( oSle ) @@ -276,8 +266,6 @@ STATIC FUNCTION BrwHandleResize( oCrt, oBrw, oVBar, oHBar, oCom, oSLE, oLBx, oTr RETURN .T. -// - STATIC FUNCTION BrwShowColumn( oBrw, cHeading ) LOCAL i, j, nCur @@ -302,8 +290,6 @@ STATIC FUNCTION BrwShowColumn( oBrw, cHeading ) RETURN NIL -// - STATIC FUNCTION BrwBuildTree( oCrt /*, oBrw*/ ) LOCAL oTree, oItem1, oItem2 @@ -335,8 +321,6 @@ STATIC FUNCTION BrwBuildTree( oCrt /*, oBrw*/ ) RETURN oTree -// - STATIC FUNCTION BrwBuildActiveX( oCrt, oBrw ) LOCAL oCom @@ -351,8 +335,6 @@ STATIC FUNCTION BrwBuildActiveX( oCrt, oBrw ) RETURN oCom -// - STATIC FUNCTION BrwBuildListBox( oCrt, oBrw ) LOCAL oXbp, i @@ -370,8 +352,6 @@ STATIC FUNCTION BrwBuildListBox( oCrt, oBrw ) RETURN oXbp -// - STATIC FUNCTION BrwSetThisOrder( oBrw, nOrd ) dbSetOrder( nOrd ) @@ -380,8 +360,6 @@ STATIC FUNCTION BrwSetThisOrder( oBrw, nOrd ) RETURN NIL -// - STATIC FUNCTION BrwBuildListBoxIdx( oCrt, oBrw ) LOCAL oXbp, i, cKey, aIdx := {} @@ -407,8 +385,6 @@ STATIC FUNCTION BrwBuildListBoxIdx( oCrt, oBrw ) RETURN oXbp -// - STATIC FUNCTION BrwBuildSLE( oCrt, oBrw ) LOCAL oXbp @@ -430,8 +406,6 @@ STATIC FUNCTION BrwBuildSLE( oCrt, oBrw ) RETURN oXbp -// - STATIC FUNCTION BrwBuildNvg( oCrt, oBrw, oCom ) LOCAL oLbl, oXbp @@ -457,8 +431,6 @@ STATIC FUNCTION BrwBuildNvg( oCrt, oBrw, oCom ) RETURN { oLbl, oXbp } -// - STATIC FUNCTION BrwBuildCheckBox( oCrt, oBrw, lActiveX ) LOCAL oXbp @@ -477,8 +449,6 @@ STATIC FUNCTION BrwBuildCheckBox( oCrt, oBrw, lActiveX ) RETURN oXbp -// - STATIC FUNCTION BrwReposButtons( oCrt ) LOCAL oXbp, nOff, nTtl, nG, i @@ -501,8 +471,6 @@ STATIC FUNCTION BrwReposButtons( oCrt ) RETURN NIL -// - STATIC FUNCTION BrwBuildButtons( oCrt, oBrw ) LOCAL oPB, nOff, nTtl, nG, i @@ -542,8 +510,6 @@ STATIC FUNCTION BrwBuildButtons( oCrt, oBrw ) RETURN NIL -// - FUNCTION Vou_BrwAddScrollBars( oCrt, oBrw, oVBar, oHBar ) oHBar := WvgScrollBar():new( oCrt, , { {|| -( oBrw:nBottom + 1 ) }, {|| -( oBrw:nLeft ) } }, ; @@ -562,8 +528,6 @@ FUNCTION Vou_BrwAddScrollBars( oCrt, oBrw, oVBar, oHBar ) RETURN NIL -// - STATIC FUNCTION BrwBuildMenu( oCrt ) LOCAL oMenu, oSMenu @@ -594,8 +558,6 @@ STATIC FUNCTION BrwBuildMenu( oCrt ) RETURN oMenu -// - STATIC FUNCTION BrwBuildToolBar( oCrt ) LOCAL oTBar, nRGB := RGB( 172, 172, 172 ) @@ -626,9 +588,7 @@ STATIC FUNCTION BrwBuildToolBar( oCrt ) RETURN oTBar -// -// Key Handelling -// +// Key Handling STATIC FUNCTION BrwHandleKey( oBrowse, nKey, lEnd ) @@ -720,8 +680,6 @@ STATIC FUNCTION BrwHandleKey( oBrowse, nKey, lEnd ) RETURN lRet -// - FUNCTION Vou_NavigateToCell( oBrowse ) LOCAL nCount @@ -765,8 +723,6 @@ FUNCTION Vou_NavigateToCell( oBrowse ) RETURN .F. -// - STATIC FUNCTION DbSkipBlock( n ) LOCAL nSkipped := 0 @@ -786,8 +742,6 @@ STATIC FUNCTION DbSkipBlock( n ) RETURN nSkipped -// - STATIC FUNCTION TBNext() LOCAL nSaveRecNum := RecNo() @@ -805,8 +759,6 @@ STATIC FUNCTION TBNext() RETURN lMoved -// - STATIC FUNCTION TBPrev() LOCAL nSaveRecNum := RecNo() @@ -821,14 +773,10 @@ STATIC FUNCTION TBPrev() RETURN lMoved -// - STATIC FUNCTION VouBlockField( i ) RETURN {|| FieldGet( i ) } -// - STATIC FUNCTION Vou_ExecTBarAction( oBtn ) SWITCH oBtn:caption @@ -850,8 +798,6 @@ STATIC FUNCTION Vou_ExecTBarAction( oBtn ) RETURN NIL -// - FUNCTION Vou_BrwSetVScroll( mp1, oBrowse ) SWITCH mp1[ 2 ] @@ -893,9 +839,7 @@ FUNCTION Vou_BrwSetVScroll( mp1, oBrowse ) RETURN NIL -// -/* For brosers inside WvtDialog() */ -// +/* For brosers inside WvtDialog() */ STATIC FUNCTION BrwOnEvent( oWvtBrw, cPaintID, oBrowse, nKey ) @@ -1004,8 +948,6 @@ STATIC FUNCTION BrwOnEvent( oWvtBrw, cPaintID, oBrowse, nKey ) RETURN lRet -// - FUNCTION ConfigBrowser( aFields, cUseAlias, aTLBR, cDesc, oParent, cColorSpec, nID ) LOCAL info_, oWvtBrw, oBrowse, i, bBlock @@ -1054,5 +996,3 @@ FUNCTION ConfigBrowser( aFields, cUseAlias, aTLBR, cDesc, oParent, cColorSpec, n oWvtBrw:bHandleEvent := {| oWvtBrw, cPaintID, oBrowse, nKey | BrwOnEvent( oWvtBrw, cPaintID, oBrowse, nKey ) } RETURN oWvtBrw - -// diff --git a/harbour/contrib/gtwvg/tests/utils.prg b/harbour/contrib/gtwvg/tests/utils.prg index a3cc31daa6..fa11dd9a9f 100644 --- a/harbour/contrib/gtwvg/tests/utils.prg +++ b/harbour/contrib/gtwvg/tests/utils.prg @@ -6,18 +6,13 @@ * Pritpal Bedi */ -// - #include "inkey.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" #include "wvgparts.ch" -// -// -// WvtSetObjects() array structure -// +// WvtSetObjects() array structure #define WVT_OBJ_TYPE 1 #define WVT_OBJ_ID 2 #define WVT_OBJ_ROW 3 @@ -34,25 +29,19 @@ #define WVT_OBJ_VRBLS 13 -// WVT_OBJ_TYPE Constants -// +// WVT_OBJ_TYPE Constants #define OBJ_TYPE_BUTTON 1 -// WVT_OBJ_STATE -// +// WVT_OBJ_STATE #define OBJ_STATE_HIDE 0 #define OBJ_STATE_DISP 1 #define OBJ_STATE_MOUSEOVER 2 #define OBJ_STATE_BUTTONDOWN 3 #define OBJ_STATE_BUTTONUP 4 -// - THREAD STATIC t_keys_ := {, , , , , , , , , , , , , , , , , , , } THREAD STATIC t_pic_ := {, , , , , , , , , , , , , , , , , , , } -// - FUNCTION WvtSetKeys( lSet ) IF lSet @@ -79,10 +68,8 @@ FUNCTION WvtSetKeys( lSet ) RETURN NIL -// -// Wvt_Paint() must be a FUNCTION in your application -// as it is called when Window gets WM_PAINT message. -// +// Wvt_Paint() must be a FUNCTION in your application +// as it is called when Window gets WM_PAINT message. FUNCTION Wvt_Paint() @@ -94,11 +81,10 @@ FUNCTION Wvt_Paint() RETURN 0 -// -// Wvt_SetFocus() must be a FUNCTION in your application -// needs to process messages sent through WM_SETFOCUS message -// received by the window. -// +// Wvt_SetFocus() must be a FUNCTION in your application +// needs to process messages sent through WM_SETFOCUS message +// received by the window. + #if 0 FUNCTION Wvt_SetFocus() @@ -114,11 +100,10 @@ FUNCTION Wvt_SetFocus() #endif -// -// Wvt_KillFocus() must be a FUNCTION in your application -// needs to process messages sent through WM_KILLFOCUS message -// received by the window. -// +// Wvt_KillFocus() must be a FUNCTION in your application +// needs to process messages sent through WM_KILLFOCUS message +// received by the window. + #if 0 FUNCTION Wvt_KillFocus() @@ -134,12 +119,8 @@ FUNCTION Wvt_KillFocus() #endif -// -// -// Wvt_Mouse() must be present if you want to catch and fire -// mouse call back outside of the inkey() loop. -// -// +// Wvt_Mouse() must be present if you want to catch and fire +// mouse call back outside of the inkey() loop. FUNCTION Wvt_Mouse( nKey, nRow, nCol ) @@ -220,9 +201,7 @@ FUNCTION Wvt_Mouse( nKey, nRow, nCol ) RETURN NIL -// // WvtSetBlocks() is a get/set FUNCTION to be used by Wvt_Paint() -// FUNCTION WvtSetBlocks( a_ ) @@ -238,9 +217,7 @@ FUNCTION WvtSetBlocks( a_ ) RETURN o -// -// WvtSetObjects() is a get/set FUNCTION to be used by Wvt_Mouse() -// +// WvtSetObjects() is a get/set FUNCTION to be used by Wvt_Mouse() FUNCTION WvtSetObjects( aObject ) @@ -268,8 +245,6 @@ FUNCTION WvtSetObjects( aObject ) RETURN oObjects -// - FUNCTION SetMouseCheck( lYes ) LOCAL lOYes @@ -282,8 +257,6 @@ FUNCTION SetMouseCheck( lYes ) RETURN lOYes -// - FUNCTION WvtWindowExpand( nUnits ) STATIC s_nUnits := 18 @@ -294,14 +267,10 @@ FUNCTION WvtWindowExpand( nUnits ) RETURN .T. -// - FUNCTION rgb( r, g, b ) RETURN r + ( g * 256 ) + ( b * 256 * 256 ) -// - FUNCTION VouChoice( aChoices ) LOCAL scr, clr, nChoice @@ -318,16 +287,12 @@ FUNCTION VouChoice( aChoices ) RETURN nChoice -// - FUNCTION Hb_Clear() CLS RETURN .F. -// - FUNCTION MyMenuProcedure( nID ) DO CASE @@ -339,8 +304,6 @@ FUNCTION MyMenuProcedure( nID ) RETURN .T. -// - FUNCTION BuildWvgToolBar( oDA, nActiveX ) LOCAL oTBar @@ -373,8 +336,6 @@ FUNCTION BuildWvgToolBar( oDA, nActiveX ) RETURN oTBar -// - FUNCTION SetGT( nIndex, pGT ) LOCAL oldGT @@ -387,8 +348,6 @@ FUNCTION SetGT( nIndex, pGT ) RETURN oldGT -// - FUNCTION SetFonts( hFont ) LOCAL oldFont @@ -401,8 +360,6 @@ FUNCTION SetFonts( hFont ) RETURN oldFont -// - FUNCTION SetIcons( hIcon ) LOCAL oldIcon @@ -415,8 +372,6 @@ FUNCTION SetIcons( hIcon ) RETURN oldIcon -// - FUNCTION Popups( nID, lDestroy ) LOCAL hPop, hPop1 @@ -486,16 +441,12 @@ FUNCTION Popups( nID, lDestroy ) RETURN Wvt_SetPopupMenu( t_hPop_[ nID ] ) -// - FUNCTION DispStatusMsg( cMsg ) Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, rgb( 198, 198, 198 ), "Arial", 18, , 900 ) RETURN .T. -// - FUNCTION ClearStatusMsg() LOCAL nRow := Row() @@ -507,8 +458,6 @@ FUNCTION ClearStatusMsg() RETURN .T. -// - FUNCTION WvtPictures( nSlot, cFilePic ) IF nSlot != NIL .AND. nSlot <= 20 .AND. hb_FileExists( cFilePic ) @@ -521,8 +470,6 @@ FUNCTION WvtPictures( nSlot, cFilePic ) RETURN NIL -// - FUNCTION WvtExePicture( nTop, nLeft, nBottom, nRight, nSlot, aOffset ) IF t_pic_[ nSlot ] != NIL @@ -531,14 +478,10 @@ FUNCTION WvtExePicture( nTop, nLeft, nBottom, nRight, nSlot, aOffset ) RETURN NIL -// - FUNCTION GetResource( cName ) RETURN hb_DirBase() + cName -// - FUNCTION uiDebug( ... ) LOCAL aP := hb_AParams() @@ -550,8 +493,6 @@ FUNCTION uiDebug( ... ) RETURN NIL -// - FUNCTION MyError( oError ) ? oError:description @@ -565,5 +506,3 @@ FUNCTION MyError( oError ) ENDDO RETURN NIL - -// diff --git a/harbour/contrib/gtwvg/tests/wvtcls.prg b/harbour/contrib/gtwvg/tests/wvtcls.prg index e62f3dbbf9..ec8b3fe4b1 100644 --- a/harbour/contrib/gtwvg/tests/wvtcls.prg +++ b/harbour/contrib/gtwvg/tests/wvtcls.prg @@ -12,16 +12,12 @@ * Pritpal Bedi */ -// - #include "inkey.ch" #include "wvtwin.ch" #include "hbgtinfo.ch" #include "hbgtwvg.ch" #include "wvgparts.ch" -// - FUNCTION DialogWvgClassesOne( nMode ) LOCAL bBlock @@ -47,8 +43,6 @@ FUNCTION DialogWvgClassesOne( nMode ) RETURN NIL -// - STATIC FUNCTION MyDialogOne( oCrt ) LOCAL aObjects := WvtSetBlocks( {} ) @@ -340,8 +334,6 @@ STATIC FUNCTION MyDialogOne( oCrt ) RETURN NIL -// - FUNCTION DialogWvgClassesTwo() LOCAL aObjects := WvtSetBlocks( {} ) @@ -402,8 +394,6 @@ FUNCTION DialogWvgClassesTwo() RETURN NIL -// - STATIC FUNCTION ExeProgBar( oPBar, oPBar1, oPBar2, oPBar3, oPBar4 ) LOCAL i @@ -430,8 +420,6 @@ STATIC FUNCTION ExeProgBar( oPBar, oPBar1, oPBar2, oPBar3, oPBar4 ) RETURN NIL -// - STATIC FUNCTION ExeProgressBar( oPBar, oPBar3 ) LOCAL i @@ -447,5 +435,3 @@ STATIC FUNCTION ExeProgressBar( oPBar, oPBar3 ) oPBar3:DeActivate() RETURN NIL - -// diff --git a/harbour/contrib/gtwvg/tests/xbp.prg b/harbour/contrib/gtwvg/tests/xbp.prg index da306794ce..c5cc34cc54 100644 --- a/harbour/contrib/gtwvg/tests/xbp.prg +++ b/harbour/contrib/gtwvg/tests/xbp.prg @@ -14,15 +14,11 @@ #include "hbgtwvg.ch" #include "wvgparts.ch" -// - #define MUSIC_WAITON {800, 1600} -// // // A Pure Xbase++ Implementation // -// FUNCTION demoxbp() @@ -266,8 +262,6 @@ FUNCTION demoxbp() RETURN NIL -// - STATIC FUNCTION ResizeDialogXbp( oCrt, oTBar, oSBar, oStatic, oCom, oTree, oAddr ) LOCAL aCrt, aTBar, aSBar @@ -295,8 +289,6 @@ STATIC FUNCTION ResizeDialogXbp( oCrt, oTBar, oSBar, oStatic, oCom, oTree, oAddr RETURN 1 -// - STATIC FUNCTION ActiveXBuildMenuXbp( oCrt, oStatic, oStatic2 ) LOCAL oMenuBar, oSubMenu @@ -337,8 +329,6 @@ STATIC FUNCTION ActiveXBuildMenuXbp( oCrt, oStatic, oStatic2 ) RETURN NIL -// - STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt ) LOCAL oTBar @@ -371,8 +361,6 @@ STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt ) RETURN oTBar -// - STATIC FUNCTION MyFunctionXbp( nMode ) DO CASE @@ -401,8 +389,6 @@ STATIC FUNCTION MyFunctionXbp( nMode ) RETURN NIL -// - STATIC FUNCTION ExeFontDialogXbp( oCrt ) LOCAL oFontDlg @@ -432,5 +418,3 @@ STATIC FUNCTION ExeFontDialogXbp( oCrt ) oFontDlg:destroy() RETURN NIL - -//