2011-12-12 11:54 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/gtwvg/wvggenrc.prg
  * contrib/gtwvg/wvglistb.prg
  * contrib/gtwvg/wvgphdlr.prg
  * contrib/gtwvg/wvgsle.prg
  * contrib/gtwvg/wvgwnd.prg
    * Changed: SetAppWindow() => WvgSetAppWindow()
       To facilitate simultaneous use of GTWVG with HBXBP.
    * Fixed: the way an indivisual child was being destroyed.
       It was causing flicker and GUI loss when clicking 
       inside a control. Thanks Zoran for pointer and code example.
 
  * contrib/gtwvg/tests/demowvg.prg
  * contrib/gtwvg/tests/wvgtbrowser.prg
    * Refined: to accomodate above issues.
This commit is contained in:
Pritpal Bedi
2011-12-12 20:02:01 +00:00
parent bd65a75bff
commit c1c3baa7f0
8 changed files with 66 additions and 46 deletions

View File

@@ -16,6 +16,22 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-12-12 11:54 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/gtwvg/wvggenrc.prg
* contrib/gtwvg/wvglistb.prg
* contrib/gtwvg/wvgphdlr.prg
* contrib/gtwvg/wvgsle.prg
* contrib/gtwvg/wvgwnd.prg
* Changed: SetAppWindow() => WvgSetAppWindow()
To facilitate simultaneous use of GTWVG with HBXBP.
* Fixed: the way an indivisual child was being destroyed.
It was causing flicker and GUI loss when clicking
inside a control. Thanks Zoran for pointer and code example.
* contrib/gtwvg/tests/demowvg.prg
* contrib/gtwvg/tests/wvgtbrowser.prg
* Refined: to accomodate above issues.
2011-12-10 13:52 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/gtwvg/tests/wvgtbrowser.prg
+ Extended: the way to anchor tree-view control's row-to to

View File

@@ -454,7 +454,7 @@ function WvtLines()
FUNCTION BuildMainMenu()
LOCAL oMenu
LOCAL g_oMenuBar := SetAppWindow():menuBar()
LOCAL g_oMenuBar := WvgSetAppWindow():menuBar()
oMenu := WvgMenu():new( g_oMenuBar, , .t. ):create()
oMenu:Caption:= "Wvt*Classes"

View File

@@ -411,6 +411,10 @@ STATIC FUNCTION BrwBuildButtons( oCrt, oBrw )
oPB:tooltipText := aPmt[ i ]
nOff += aW[ i ] + nG
IF i == len( aPmt )
oPB:destroy()
ENDIF
NEXT
RETURN NIL

View File

@@ -81,22 +81,17 @@
/*----------------------------------------------------------------------*/
EXIT PROCEDURE KillGTChildren()
LOCAL aChilds, oXbp
IF hb_isObject( s_oCrt ) .AND. __objGetClsName( s_oCrt ) == "WVGCRT" .AND. s_oCrt:isGT
IF ! empty( aChilds := s_oCrt:childList() )
FOR EACH oXbp IN aChilds
oXbp:destroy()
oXbp := NIL
NEXT
ENDIF
s_oCrt:destroy()
s_oCrt := NIL
ENDIF
RETURN
/*----------------------------------------------------------------------*/
FUNCTION SetAppWindow( oCrt )
FUNCTION WvgSetAppWindow( oCrt )
LOCAL ooCrt := s_oCrt
IF empty( oCrt )

View File

@@ -194,7 +194,6 @@ METHOD WvgListBox:handleEvent( nMessage, aNM )
::sendMessage( WM_SIZE, 0, 0 )
CASE nMessage == HB_GTE_COMMAND
uiDebug( "listbox:command", aNM[1], aNM[2], aNM[3], LBN_SELCHANGE, LBN_DBLCLK )
IF aNM[ 1 ] == LBN_SELCHANGE
::nCurSelected := WVG_LBGetCurSel( ::hWnd )+ 1
IF hb_isBlock( ::sl_itemMarked )

View File

@@ -87,6 +87,7 @@ CLASS WvgPartHandler
METHOD handleEvent( hEvent, mp1, mp2 )
METHOD status()
METHOD removeChild( oChild )
METHOD addChild( oWvg )
METHOD childFromName( nNameId )
METHOD childList()
@@ -196,6 +197,17 @@ METHOD WvgPartHandler:childList()
/*----------------------------------------------------------------------*/
METHOD WvgPartHandler:removeChild( oChild )
LOCAL n
IF ( n := ascan( ::aChildren, {|o| o == oChild } ) ) > 0
hb_aDel( ::aChildren, n, .t. )
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD WvgPartHandler:delChild( oWvg )
LOCAL n

View File

@@ -76,12 +76,6 @@
/*----------------------------------------------------------------------*/
#ifndef __DBG_PARTS__
#xtranslate hb_traceLog( [<x,...>] ) =>
#endif
/*----------------------------------------------------------------------*/
CLASS WvgSLE INHERIT WvgWindow, DataRef
DATA align INIT WVGSLE_LEFT
@@ -155,7 +149,7 @@ METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgSL
IF ::autoSize
ENDIF
IF !::editable
IF ! ::editable
::style += ES_READONLY
ENDIF
IF ::unReadable
@@ -188,13 +182,11 @@ METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgSL
METHOD handleEvent( nMessage, aNM ) CLASS WvgSLE
hb_traceLog( " %s:handleEvent( %i )", __objGetClsName( self ), nMessage )
DO CASE
CASE nMessage == HB_GTE_RESIZED
IF ::isParentCrt()
::oParent:setFocus()
::rePosition()
::oParent:sendMessage( WM_SETFOCUS, 0, 0 )
ENDIF
::sendMessage( WM_SIZE, 0, 0 )
@@ -230,31 +222,36 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgSLE
ENDIF
CASE nMessage == HB_GTE_ANY
IF ::IsParentCrt()
DO CASE
CASE aNM[ NMH_code ] == WM_KILLFOCUS
IF hb_isBlock( ::sl_killInputFocus )
eval( ::sl_killInputFocus, NIL, NIL, Self )
ENDIF
DO CASE
CASE aNM[ NMH_code ] == WM_KILLFOCUS
IF hb_isBlock( ::sl_killInputFocus )
eval( ::sl_killInputFocus, NIL, NIL, Self )
ENDIF
CASE aNM[ NMH_code ] == WM_SETFOCUS
IF hb_isBlock( ::sl_setInputFocus )
eval( ::sl_setInputFocus, NIL, NIL, Self )
ENDIF
CASE aNM[ NMH_code ] == WM_SETFOCUS
IF hb_isBlock( ::sl_setInputFocus )
eval( ::sl_setInputFocus, NIL, NIL, Self )
ENDIF
CASE aNM[ NMH_code ] == WM_KEYDOWN
IF aNM[ 2 ] == K_ENTER
CASE aNM[ NMH_code ] == WM_KEYDOWN
IF aNM[ 2 ] == K_ENTER
IF ::isParentCrt()
::oParent:setFocus()
IF hb_isBlock( ::sl_returnPressed )
eval( ::sl_returnPressed, NIL, NIL, Self )
ENDIF
ELSEIF aNM[ 2 ] == VK_TAB
ENDIF
IF hb_isBlock( ::sl_returnPressed )
eval( ::sl_returnPressed, NIL, NIL, Self )
ENDIF
ELSEIF aNM[ 2 ] == VK_TAB
IF ::isParentCrt()
::oParent:setFocus()
RETURN EVENT_HANDELLED
ENDIF
ELSEIF aNM[ 2 ] == 65
uiDebug( "edit",65 )
RETURN EVENT_HANDELLED
ENDIF
ENDCASE
ENDIF
ENDCASE
ENDCASE

View File

@@ -83,10 +83,6 @@
#define __BYSETPROP__
#endif
#ifndef __DBG_PARTS__
#xtranslate hb_traceLog( [<x,...>] ) =>
#endif
/*----------------------------------------------------------------------*/
CLASS WvgWindow INHERIT WvgPartHandler
@@ -314,7 +310,7 @@ METHOD WvgWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF empty( ::oParent )
IF ! ( __objGetClsName( Self ) $ "WVGCRT,WVGDIALOG" )
::oParent := SetAppWindow()
::oParent := WvgSetAppWindow()
ENDIF
ENDIF
@@ -338,9 +334,10 @@ METHOD WvgWindow:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible
/*----------------------------------------------------------------------*/
METHOD WvgWindow:destroy()
#if 0
hb_traceLog( " %s:destroy() WvgWindow()", __objGetClsName( self ) )
#endif
IF ! empty( ::oParent )
::oParent:removeChild( Self )
ENDIF
IF Len( ::aChildren ) > 0
aeval( ::aChildren, {|o| o:destroy() } )