2017-09-11 18:35 UTC Viktor Szakats (vszakats users.noreply.github.com)

* contrib/gtwvg/*.prg
  * contrib/gtwvg/gtwgud.c
  * contrib/gtwvg/gtwvg.hbx
  * contrib/gtwvg/gtwvgd.c
  * contrib/gtwvg/wvgcore.c
  * contrib/gtwvg/wvgcuig.c
    * more sync with 3.4 fork, mostly code-style/whitespace with
      some minor optimizations
This commit is contained in:
Viktor Szakats
2017-09-11 18:35:35 +00:00
parent e00f50079e
commit 2e235ee4d8
34 changed files with 1943 additions and 2273 deletions

View File

@@ -7,6 +7,16 @@
Entries may not always be in chronological/commit order.
See license at the end of file. */
2017-09-11 18:35 UTC Viktor Szakats (vszakats users.noreply.github.com)
* contrib/gtwvg/*.prg
* contrib/gtwvg/gtwgud.c
* contrib/gtwvg/gtwvg.hbx
* contrib/gtwvg/gtwvgd.c
* contrib/gtwvg/wvgcore.c
* contrib/gtwvg/wvgcuig.c
* more sync with 3.4 fork, mostly code-style/whitespace with
some minor optimizations
2017-09-11 13:12 UTC Viktor Szakats (vszakats users.noreply.github.com)
* contrib/gtqtc/gtqtc1.cpp
* contrib/gtwvg/gtwgud.c

View File

@@ -115,49 +115,47 @@ METHOD Wvg3State:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::show()
ENDIF
::editBuffer := Wvg_Button_GetCheck( ::hWnd )
::editBuffer := wvg_Button_GetCheck( ::hWnd )
RETURN Self
METHOD Wvg3State:handleEvent( nMessage, aNM )
hb_traceLog( " %s:handleEvent( %i )", __objGetClsName( self ), nMessage )
hb_traceLog( " %s:handleEvent( %i )", ::ClassName(), nMessage )
DO CASE
CASE nMessage == HB_GTE_COMMAND
IF aNM[ NMH_code ] == BN_CLICKED
::editBuffer := Wvg_Button_GetCheck( ::hWnd )
::editBuffer := wvg_Button_GetCheck( ::hWnd )
IF HB_ISBLOCK( ::sl_lbClick )
Eval( ::sl_lbClick, ::editBuffer, NIL, self )
Eval( ::sl_lbClick, ::editBuffer, , Self )
RETURN 0
ENDIF
ENDIF
CASE nMessage == HB_GTE_CTLCOLOR
CASE nMessage == HB_GTE_CTLCOLOR
IF HB_ISNUMERIC( ::clr_FG )
Wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
ENDIF
IF HB_ISNUMERIC( ::hBrushBG )
Wvg_SetBkMode( aNM[ 1 ], 1 )
wvg_SetBkMode( aNM[ 1 ], 1 )
RETURN ::hBrushBG
ELSE
RETURN Wvg_GetCurrentBrush( aNM[ 1 ] )
RETURN wvg_GetCurrentBrush( aNM[ 1 ] )
ENDIF
ENDCASE
RETURN 1
METHOD Wvg3State:destroy()
METHOD PROCEDURE Wvg3State:destroy()
hb_traceLog( " %s:destroy()", __objGetClsName() )
hb_traceLog( " %s:destroy()", ::ClassName() )
::WvgWindow:destroy()
RETURN NIL
RETURN
METHOD Wvg3State:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -169,7 +167,7 @@ METHOD Wvg3State:setCaption( xCaption )
IF HB_ISSTRING( xCaption )
::caption := xCaption
Wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption )
wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption )
ENDIF
RETURN Self

View File

@@ -175,10 +175,9 @@ METHOD WvgActiveXControl:Create( oParent, oOwner, aPos, aSize, aPresParams, lVis
RETURN Self
PROCEDURE execEvent( nEvent, ... ) CLASS WvgActiveXControl
METHOD PROCEDURE WvgActiveXControl:execEvent( nEvent, ... )
#if 0
LOCAL cEvents := hb_ValToStr( nEvent ) + ", "
LOCAL aEvents := { ... }
@@ -205,7 +204,7 @@ METHOD WvgActiveXControl:handleEvent( nEvent, aNM )
::rePosition()
ENDIF
IF HB_ISBLOCK( ::sl_resize )
Eval( ::sl_resize, NIL, NIL, Self )
Eval( ::sl_resize, , , Self )
ENDIF
EXIT
@@ -219,13 +218,12 @@ METHOD WvgActiveXControl:handleEvent( nEvent, aNM )
METHOD WvgActiveXControl:OnError()
#if 0
hb_traceLog( "HI: " + hb_ValToStr( __GetMessage() ) + " : " + Str( Len( hb_AParams() ) ) )
#endif
RETURN hb_ExecFromArray( ::oOLE, __GetMessage(), hb_AParams() )
METHOD WvgActiveXControl:Destroy()
METHOD PROCEDURE WvgActiveXControl:Destroy()
IF ! Empty( ::oOLE:__hObj )
IF wapi_IsWindow( ::pWnd )
@@ -235,7 +233,7 @@ METHOD WvgActiveXControl:Destroy()
::hWnd := NIL
ENDIF
RETURN NIL
RETURN
METHOD WvgActiveXControl:mapEvent( nEvent, bBlock )
@@ -246,51 +244,37 @@ METHOD WvgActiveXControl:mapEvent( nEvent, bBlock )
RETURN Self
METHOD WvgActiveXControl:inheritPresParams()
LOCAL lSuccess := .T.
RETURN lSuccess
RETURN .T.
METHOD WvgActiveXControl:presParamsChanged()
RETURN Self
METHOD WvgActiveXControl:setInputFocus()
RETURN Self
METHOD WvgActiveXControl:subscribeStdEvents()
RETURN NIL
METHOD WvgActiveXControl:unsubscribeStdEvents()
RETURN Self
METHOD WvgActiveXControl:keyDown()
RETURN Self
METHOD WvgActiveXControl:click()
RETURN Self
METHOD WvgActiveXControl:dblClick()
RETURN Self
METHOD WvgActiveXControl:mouseDown()
RETURN Self
METHOD WvgActiveXControl:mouseUp()
RETURN Self
METHOD WvgActiveXControl:mouseMove()
RETURN Self
METHOD WvgActiveXControl:activate()
RETURN Self

View File

@@ -94,7 +94,7 @@ METHOD WvgBitmap:new()
METHOD WvgBitmap:create( oPScompat )
IF oPScompat == NIL
::hDCComp := Wvg_GetDC()
::hDCComp := wvg_GetDC()
::lDCToDestroy := .T.
ELSE
::hDCComp := oPScompat:hDC
@@ -104,11 +104,11 @@ METHOD WvgBitmap:create( oPScompat )
METHOD WvgBitmap:destroy()
IF ::hBitmap != nil
Wvg_DeleteObject( ::hBitmap )
IF ::hBitmap != NIL
wvg_DeleteObject( ::hBitmap )
ENDIF
IF ::lDCtoDestroy
Wvg_ReleaseDC( ::hDCcompat )
wvg_ReleaseDC( ::hDCcompat )
ENDIF
RETURN Self

View File

@@ -70,8 +70,8 @@ CREATE CLASS WvgCheckBox INHERIT WvgWindow, WvgDataRef
METHOD handleEvent( nMessage, aNM )
#if 0
METHOD editBuffer() INLINE ( Wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED )
METHOD getData() INLINE ( Wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED )
METHOD editBuffer() INLINE wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED
METHOD getData() INLINE wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED
METHOD setData( lCheck ) INLINE ::sendMessage( BM_SETCHECK, iif( lCheck, BST_CHECKED, BST_UNCHECKED ), 0 )
#endif
METHOD setCaption( xCaption )
@@ -112,7 +112,7 @@ METHOD WvgCheckBox:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF ::selection
::sendMessage( BM_SETCHECK, BST_CHECKED, 0 )
ENDIF
::editBuffer := ( Wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED )
::editBuffer := ( wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED )
RETURN Self
@@ -128,12 +128,12 @@ METHOD WvgCheckBox:handleEvent( nMessage, aNM )
CASE nMessage == HB_GTE_COMMAND
IF aNM[ NMH_code ] == BN_CLICKED
::editBuffer := ( Wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED )
::editBuffer := ( wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED )
IF HB_ISBLOCK( ::sl_lbClick )
IF ::isParentCrt()
::oParent:setFocus()
ENDIF
Eval( ::sl_lbClick, ::editBuffer, NIL, Self )
Eval( ::sl_lbClick, ::editBuffer, , Self )
IF ::pointerFocus
::setFocus()
ENDIF
@@ -142,13 +142,13 @@ METHOD WvgCheckBox:handleEvent( nMessage, aNM )
CASE nMessage == HB_GTE_CTLCOLOR
IF HB_ISNUMERIC( ::clr_FG )
Wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
ENDIF
IF HB_ISNUMERIC( ::hBrushBG )
Wvg_SetBkMode( aNM[ 1 ], 1 )
wvg_SetBkMode( aNM[ 1 ], 1 )
RETURN ::hBrushBG
ELSE
RETURN Wvg_GetCurrentBrush( aNM[ 1 ] )
RETURN wvg_GetCurrentBrush( aNM[ 1 ] )
ENDIF
#if 0 /* This should never be reached as parent is processing the events */
@@ -157,9 +157,9 @@ METHOD WvgCheckBox:handleEvent( nMessage, aNM )
IF aNM[ 1 ] == WM_LBUTTONUP
IF HB_ISBLOCK( ::sl_lbClick )
::oParent:setFocus()
::sendMessage( BM_SETCHECK, iif( Wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED, BST_UNCHECKED, BST_CHECKED ), 0 )
::editBuffer := ( Wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED )
Eval( ::sl_lbClick, NIL, NIL, Self )
::sendMessage( BM_SETCHECK, iif( wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED, BST_UNCHECKED, BST_CHECKED ), 0 )
::editBuffer := ( wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED )
Eval( ::sl_lbClick, , , Self )
ENDIF
ENDIF
ENDIF
@@ -169,11 +169,11 @@ METHOD WvgCheckBox:handleEvent( nMessage, aNM )
RETURN EVENT_UNHANDELLED
METHOD WvgCheckBox:destroy()
METHOD PROCEDURE WvgCheckBox:destroy()
::wvgWindow:destroy()
RETURN NIL
RETURN
METHOD WvgCheckBox:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -185,7 +185,7 @@ METHOD WvgCheckBox:setCaption( xCaption )
IF HB_ISSTRING( xCaption )
::caption := xCaption
Wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption )
wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption )
ENDIF
RETURN Self

File diff suppressed because it is too large Load Diff

View File

@@ -70,7 +70,7 @@ CREATE CLASS WvgComboBox INHERIT WvgWindow, WvgDataRef
METHOD destroy()
METHOD handleEvent( nMessage, aNM )
METHOD sendCBMessage( nMsg, wParam, lParam ) INLINE Wvg_SendCBMessage( ::pWnd, nMsg, wParam, lParam )
METHOD sendCBMessage( nMsg, wParam, lParam ) INLINE wvg_SendCBMessage( ::pWnd, nMsg, wParam, lParam )
METHOD listBoxFocus( lFocus )
METHOD listBoxSize()
METHOD sleSize()
@@ -85,8 +85,8 @@ CREATE CLASS WvgComboBox INHERIT WvgWindow, WvgDataRef
VAR oSLE
VAR oListBox
ACCESS XbpSLE INLINE ::oSLE
ACCESS XbpListBox INLINE ::oListBox
ACCESS XbpSLE INLINE ::oSLE
ACCESS XbpListBox INLINE ::oListBox
VAR sl_itemMarked
VAR sl_itemSelected
@@ -118,13 +118,14 @@ METHOD WvgComboBox:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::oParent:AddChild( Self )
IF ::type == WVGCOMBO_DROPDOWNLIST
DO CASE
CASE ::type == WVGCOMBO_DROPDOWNLIST
::style += CBS_DROPDOWNLIST
ELSEIF ::type == WVGCOMBO_SIMPLE
CASE ::type == WVGCOMBO_SIMPLE
::style += CBS_SIMPLE
ELSE
OTHERWISE
::style += CBS_DROPDOWN
ENDIF
ENDCASE
::createControl()
@@ -158,7 +159,7 @@ METHOD WvgComboBox:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisibl
RETURN Self
METHOD WvgComboBox:destroy()
METHOD PROCEDURE WvgComboBox:destroy()
#if 0
IF HB_ISOBJECT( ::oSLE )
@@ -170,7 +171,7 @@ METHOD WvgComboBox:destroy()
#endif
::wvgWindow:destroy()
RETURN NIL
RETURN
METHOD WvgComboBox:handleEvent( nMessage, aNM )
@@ -183,8 +184,9 @@ METHOD WvgComboBox:handleEvent( nMessage, aNM )
::sendMessage( WM_SIZE, 0, 0 )
CASE nMessage == HB_GTE_COMMAND
IF aNM[ 1 ] == CBN_SELCHANGE
::nCurSelected := ::editBuffer := Wvg_LBGetCurSel( ::hWnd ) + 1
DO CASE
CASE aNM[ 1 ] == CBN_SELCHANGE
::nCurSelected := ::editBuffer := wvg_lbGetCurSel( ::hWnd ) + 1
IF ::isParentCrt()
::oParent:setFocus()
ENDIF
@@ -195,7 +197,7 @@ METHOD WvgComboBox:handleEvent( nMessage, aNM )
ENDIF
ENDIF
ELSEIF aNM[ 1 ] == CBN_DBLCLK
CASE aNM[ 1 ] == CBN_DBLCLK
::editBuffer := ::nCurSelected
IF ::isParentCrt()
::oParent:setFocus()
@@ -207,13 +209,13 @@ METHOD WvgComboBox:handleEvent( nMessage, aNM )
ENDIF
ENDIF
ELSEIF aNM[ 1 ] == CBN_KILLFOCUS
CASE aNM[ 1 ] == CBN_KILLFOCUS
::killInputFocus()
ELSEIF aNM[ 1 ] == CBN_SETFOCUS
CASE aNM[ 1 ] == CBN_SETFOCUS
::setInputFocus()
ENDIF
ENDCASE
CASE nMessage == HB_GTE_KEYTOITEM
IF aNM[ 1 ] == K_ENTER
@@ -230,13 +232,13 @@ METHOD WvgComboBox:handleEvent( nMessage, aNM )
CASE nMessage == HB_GTE_CTLCOLOR
IF HB_ISNUMERIC( ::clr_FG )
Wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
ENDIF
IF HB_ISNUMERIC( ::hBrushBG )
Wvg_SetBkMode( aNM[ 1 ], 1 )
wvg_SetBkMode( aNM[ 1 ], 1 )
RETURN ::hBrushBG
ELSE
RETURN Wvg_GetCurrentBrush( aNM[ 1 ] )
RETURN wvg_GetCurrentBrush( aNM[ 1 ] )
ENDIF
ENDCASE
@@ -291,7 +293,7 @@ METHOD WvgComboBox:itemMarked( ... )
IF Len( a_ ) == 1 .AND. HB_ISBLOCK( a_[ 1 ] )
::sl_itemMarked := a_[ 1 ]
ELSEIF Len( a_ ) >= 0 .AND. HB_ISBLOCK( ::sl_itemMarked )
Eval( ::sl_itemMarked, NIL, NIL, Self )
Eval( ::sl_itemMarked, , , Self )
ENDIF
RETURN Self
@@ -303,7 +305,7 @@ METHOD WvgComboBox:itemSelected( ... )
IF Len( a_ ) == 1 .AND. HB_ISBLOCK( a_[ 1 ] )
::sl_itemSelected := a_[ 1 ]
ELSEIF Len( a_ ) >= 0 .AND. HB_ISBLOCK( ::sl_itemSelected )
Eval( ::sl_itemSelected, NIL, NIL, Self )
Eval( ::sl_itemSelected, , , Self )
ENDIF
RETURN Self

View File

@@ -61,44 +61,44 @@ CREATE CLASS WvgCrt INHERIT WvgWindow, WvgPartHandler
VAR oMenu
/* CONFIGURATION */
VAR alwaysOnTop INIT .F. /* Determines whether the dialog can be covered by other windows */
VAR border INIT 0 /* Border type for the XbpCrt window */
VAR clipChildren INIT .F.
VAR closable INIT .T.
VAR fontHeight INIT 16
VAR fontWidth INIT 10
VAR fontName INIT "Courier New"
VAR gridMove INIT .F.
VAR icon INIT 0
VAR minMax INIT .T.
VAR sysMenu INIT .T.
VAR taskList INIT .T.
VAR title INIT " "
VAR titleBar INIT .T.
VAR visible INIT .T.
VAR alwaysOnTop INIT .F. /* Determines whether the dialog can be covered by other windows */
VAR border INIT 0 /* Border type for the XbpCrt window */
VAR clipChildren INIT .F.
VAR closable INIT .T.
VAR fontHeight INIT 16
VAR fontWidth INIT 10
VAR fontName INIT "Courier New"
VAR gridMove INIT .F.
VAR icon INIT 0
VAR minMax INIT .T.
VAR sysMenu INIT .T.
VAR taskList INIT .T.
VAR title INIT " "
VAR titleBar INIT .T.
VAR visible INIT .T.
VAR autoFocus INIT .T.
VAR autoMark INIT .T.
VAR dropFont INIT .T.
VAR dropZone INIT .F.
VAR helpLink INIT NIL
VAR maxCol INIT 79
VAR maxRow INIT 24
VAR mouseMode INIT 1 /* Determines whether mouse coordinates are given as graphics or text coordinates.*/
VAR modalResult INIT NIL /* Specifies the result of a modal dialog. */
VAR aSyncFlush INIT .F. /* Determines the display behavior of text-mode output. */
VAR tooltipText INIT ""
VAR useShortCuts INIT .F. /* Enables shortcut keys for the system menu */
VAR xSize INIT 640 READONLY
VAR ySize INIT 400 READONLY
VAR autoFocus INIT .T.
VAR autoMark INIT .T.
VAR dropFont INIT .T.
VAR dropZone INIT .F.
VAR helpLink
VAR maxCol INIT 79
VAR maxRow INIT 24
VAR mouseMode INIT 1 /* Determines whether mouse coordinates are given as graphics or text coordinates.*/
VAR modalResult /* Specifies the result of a modal dialog. */
VAR aSyncFlush INIT .F. /* Determines the display behavior of text-mode output. */
VAR tooltipText INIT ""
VAR useShortCuts INIT .F. /* Enables shortcut keys for the system menu */
VAR xSize INIT 640 READONLY
VAR ySize INIT 400 READONLY
/* GUI Specifics */
VAR animate INIT .F.
VAR clipParent INIT .F.
VAR clipSiblings INIT .T.
VAR group INIT 0 /* XBP_NO_GROUP */
VAR sizeRedraw INIT .F.
VAR tabStop INIT .F.
VAR animate INIT .F.
VAR clipParent INIT .F.
VAR clipSiblings INIT .T.
VAR group INIT 0 /* XBP_NO_GROUP */
VAR sizeRedraw INIT .F.
VAR tabStop INIT .F.
/* CALLBACK SLOTS */
VAR sl_enter
@@ -124,7 +124,7 @@ CREATE CLASS WvgCrt INHERIT WvgWindow, WvgPartHandler
VAR sl_killDisplayFocus /* only for CRT */
VAR sl_killInputFocus
VAR sl_move
VAR sl_paint /* only for gui dialogs */
VAR sl_paint /* only for GUI dialogs */
VAR sl_quit
VAR sl_resize
VAR sl_setDisplayFocus /* only for CRT */
@@ -134,25 +134,25 @@ CREATE CLASS WvgCrt INHERIT WvgWindow, WvgPartHandler
VAR sl_dragLeave
VAR sl_dragDrop
/* HARUR implementation */
VAR resizable INIT .T.
VAR resizeMode INIT HB_GTI_RESIZEMODE_FONT
VAR style INIT ( WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_SIZEBOX + WS_MINIMIZEBOX + WS_MAXIMIZEBOX )
VAR exStyle INIT 0
VAR lModal INIT .F.
/* Harbour implementation */
VAR resizable INIT .T.
VAR resizeMode INIT HB_GTI_RESIZEMODE_FONT
VAR style INIT ( WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_SIZEBOX + WS_MINIMIZEBOX + WS_MAXIMIZEBOX )
VAR exStyle INIT 0
VAR lModal INIT .F.
VAR pGTp
VAR pGT
VAR objType INIT objTypeCrt
VAR ClassName INIT "WVGCRT"
VAR objType INIT objTypeCrt
VAR ClassName INIT "WVGCRT"
VAR drawingArea
VAR hWnd
VAR aPos INIT { 0, 0 }
VAR aSize INIT { 24, 79 }
VAR aPresParams INIT {}
VAR lHasInputFocus INIT .F.
VAR nFrameState INIT 0 /* normal */
VAR aPos INIT { 0, 0 }
VAR aSize INIT { 24, 79 }
VAR aPresParams INIT {}
VAR lHasInputFocus INIT .F.
VAR nFrameState INIT 0 /* normal */
VAR isGT INIT .F.
VAR isGT INIT .F.
METHOD setTitle( cTitle ) INLINE ::title := cTitle, hb_gtInfo( HB_GTI_WINTITLE, cTitle )
METHOD getTitle() INLINE hb_gtInfo( HB_GTI_WINTITLE )
@@ -254,7 +254,7 @@ METHOD WvgCrt:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::visible := lVisible
ENDIF
/* Drawing Area of oCrt will point to itself */
/* Drawing Area of oCrt will point to itself */
::drawingArea := Self
RETURN Self
@@ -307,12 +307,10 @@ METHOD WvgCrt:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF HB_ISNUMERIC( ::icon )
hb_gtInfo( HB_GTI_ICONRES, ::icon )
ELSEIF ".ico" $ Lower( ::icon )
hb_gtInfo( HB_GTI_ICONFILE, ::icon )
ELSE
IF ".ico" $ Lower( ::icon )
hb_gtInfo( HB_GTI_ICONFILE, ::icon )
ELSE
hb_gtInfo( HB_GTI_ICONRES, ::icon )
ENDIF
hb_gtInfo( HB_GTI_ICONRES, ::icon )
ENDIF
/* CreateWindow() be forced to execute */
@@ -379,15 +377,12 @@ METHOD WvgCrt:destroy()
RETURN Self
METHOD WvgCrt:currentPos()
RETURN Self
METHOD WvgCrt:currentSize()
RETURN { hb_gtInfo( HB_GTI_SCREENWIDTH ), hb_gtInfo( HB_GTI_SCREENHEIGHT ) }
METHOD WvgCrt:captureMouse()
RETURN Self
METHOD WvgCrt:disable()
@@ -404,25 +399,22 @@ METHOD WvgCrt:enable()
METHOD WvgCrt:getFrameState()
IF Wvg_IsIconic( ::hWnd )
IF wvg_IsIconic( ::hWnd )
RETURN WVGDLG_FRAMESTAT_MINIMIZED
ENDIF
IF Wvg_IsZoomed( ::hWnd )
IF wvg_IsZoomed( ::hWnd )
RETURN WVGDLG_FRAMESTAT_MAXIMIZED
ENDIF
RETURN WVGDLG_FRAMESTAT_NORMALIZED
METHOD WvgCrt:getHWND()
RETURN ::hWnd
METHOD WvgCrt:getModalState()
RETURN Self
METHOD WvgCrt:hasInputFocus()
RETURN ::lHasInputFocus
METHOD WvgCrt:hide()
@@ -432,7 +424,7 @@ METHOD WvgCrt:hide()
RETURN Self
METHOD WvgCrt:refreshEx()
Wvg_InvalidateRect( ::hWnd )
wvg_InvalidateRect( ::hWnd )
RETURN Self
METHOD WvgCrt:invalidateRect( nTop, nLeft, nBottom, nRight )
@@ -442,24 +434,20 @@ METHOD WvgCrt:invalidateRect( nTop, nLeft, nBottom, nRight )
__defaultNIL( @nBottom, MaxRow() )
__defaultNIL( @nRight, MaxCol() )
Wvt_InvalidateRect( nTop, nLeft, nBottom, nRight )
wvt_InvalidateRect( nTop, nLeft, nBottom, nRight )
RETURN Self
METHOD WvgCrt:isEnabled()
RETURN Self
METHOD WvgCrt:isVisible()
RETURN Self
METHOD WvgCrt:lockPS()
RETURN Self
METHOD WvgCrt:lockUpdate()
RETURN Self
METHOD WvgCrt:menuBar()
@@ -471,19 +459,15 @@ METHOD WvgCrt:menuBar()
RETURN ::oMenu
METHOD WvgCrt:setColorBG()
RETURN Self
METHOD WvgCrt:setColorFG()
RETURN Self
METHOD WvgCrt:setFont()
RETURN Self
METHOD WvgCrt:setFontCompoundName()
RETURN ""
METHOD WvgCrt:setFrameState( nState )
@@ -506,27 +490,21 @@ METHOD WvgCrt:setFrameState( nState )
RETURN lSuccess
METHOD WvgCrt:setModalState()
RETURN Self
METHOD WvgCrt:setPointer()
RETURN Self
METHOD WvgCrt:setTrackPointer()
RETURN Self
METHOD WvgCrt:setPos()
RETURN Self
METHOD WvgCrt:setPosAndSize()
RETURN Self
METHOD WvgCrt:setPresParam()
RETURN Self
METHOD WvgCrt:setSize( aSize, lPaint )
@@ -548,29 +526,24 @@ METHOD WvgCrt:show()
RETURN Self
METHOD WvgCrt:showModal()
RETURN Self
METHOD WvgCrt:toBack()
RETURN Self
METHOD WvgCrt:toFront()
RETURN Wvg_SetWindowPosToTop( ::hWnd )
RETURN wvg_SetWindowPosToTop( ::hWnd )
METHOD WvgCrt:unlockPS()
RETURN Self
METHOD WvgCrt:winDevice()
RETURN Self
METHOD WvgCrt:enter( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_enter )
Eval( ::sl_enter, xParam, NIL, Self )
Eval( ::sl_enter, xParam, , Self )
RETURN Self
ENDIF
@@ -584,7 +557,7 @@ METHOD WvgCrt:enter( xParam )
METHOD WvgCrt:leave( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_leave )
Eval( ::sl_leave, NIL, NIL, Self )
Eval( ::sl_leave, , , Self )
RETURN Self
ENDIF
@@ -598,7 +571,7 @@ METHOD WvgCrt:leave( xParam )
METHOD WvgCrt:lbClick( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_lbClick )
Eval( ::sl_lbClick, xParam, NIL, Self )
Eval( ::sl_lbClick, xParam, , Self )
RETURN Self
ENDIF
@@ -612,7 +585,7 @@ METHOD WvgCrt:lbClick( xParam )
METHOD WvgCrt:lbDblClick( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_lbDblClick )
Eval( ::sl_lbDblClick, xParam, NIL, Self )
Eval( ::sl_lbDblClick, xParam, , Self )
RETURN Self
ENDIF
@@ -626,7 +599,7 @@ METHOD WvgCrt:lbDblClick( xParam )
METHOD WvgCrt:lbDown( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_lbDown )
Eval( ::sl_lbDown, xParam, NIL, Self )
Eval( ::sl_lbDown, xParam, , Self )
RETURN Self
ENDIF
@@ -640,7 +613,7 @@ METHOD WvgCrt:lbDown( xParam )
METHOD WvgCrt:lbUp( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_lbUp )
Eval( ::sl_lbUp, xParam, NIL, Self )
Eval( ::sl_lbUp, xParam, , Self )
RETURN Self
ENDIF
@@ -654,7 +627,7 @@ METHOD WvgCrt:lbUp( xParam )
METHOD WvgCrt:mbClick( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_mbClick )
Eval( ::sl_mbClick, xParam, NIL, Self )
Eval( ::sl_mbClick, xParam, , Self )
RETURN Self
ENDIF
@@ -668,7 +641,7 @@ METHOD WvgCrt:mbClick( xParam )
METHOD WvgCrt:mbDblClick( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_mbDblClick )
Eval( ::sl_mbDblClick, xParam, NIL, Self )
Eval( ::sl_mbDblClick, xParam, , Self )
RETURN Self
ENDIF
@@ -682,7 +655,7 @@ METHOD WvgCrt:mbDblClick( xParam )
METHOD WvgCrt:mbDown( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_mbDown )
Eval( ::sl_mbDown, xParam, NIL, Self )
Eval( ::sl_mbDown, xParam, , Self )
RETURN Self
ENDIF
@@ -696,7 +669,7 @@ METHOD WvgCrt:mbDown( xParam )
METHOD WvgCrt:mbUp( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_mbUp )
Eval( ::sl_mbUp, xParam, NIL, Self )
Eval( ::sl_mbUp, xParam, , Self )
RETURN Self
ENDIF
@@ -710,7 +683,7 @@ METHOD WvgCrt:mbUp( xParam )
METHOD WvgCrt:motion( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_motion )
Eval( ::sl_motion, xParam, NIL, Self )
Eval( ::sl_motion, xParam, , Self )
RETURN Self
ENDIF
@@ -724,7 +697,7 @@ METHOD WvgCrt:motion( xParam )
METHOD WvgCrt:rbClick( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_rbClick )
Eval( ::sl_rbClick, xParam, NIL, Self )
Eval( ::sl_rbClick, xParam, , Self )
RETURN Self
ENDIF
@@ -738,7 +711,7 @@ METHOD WvgCrt:rbClick( xParam )
METHOD WvgCrt:rbDblClick( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_rbDblClick )
Eval( ::sl_rbDblClick, xParam, NIL, Self )
Eval( ::sl_rbDblClick, xParam, , Self )
RETURN Self
ENDIF
@@ -752,7 +725,7 @@ METHOD WvgCrt:rbDblClick( xParam )
METHOD WvgCrt:rbDown( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_rbDown )
Eval( ::sl_rbDown, xParam, NIL, Self )
Eval( ::sl_rbDown, xParam, , Self )
RETURN Self
ENDIF
@@ -766,7 +739,7 @@ METHOD WvgCrt:rbDown( xParam )
METHOD WvgCrt:rbUp( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_rbUp )
Eval( ::sl_rbUp, xParam, NIL, Self )
Eval( ::sl_rbUp, xParam, , Self )
RETURN Self
ENDIF
@@ -780,7 +753,7 @@ METHOD WvgCrt:rbUp( xParam )
METHOD WvgCrt:wheel( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_wheel )
Eval( ::sl_wheel, xParam, NIL, Self )
Eval( ::sl_wheel, xParam, , Self )
RETURN Self
ENDIF
@@ -794,7 +767,7 @@ METHOD WvgCrt:wheel( xParam )
METHOD WvgCrt:close( xParam )
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::sl_close )
Eval( ::sl_close, NIL, NIL, Self )
Eval( ::sl_close, , , Self )
RETURN Self
ENDIF
@@ -808,7 +781,7 @@ METHOD WvgCrt:close( xParam )
METHOD WvgCrt:helpRequest( xParam )
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::sl_helpRequest )
Eval( ::sl_helpRequest, NIL, NIL, Self )
Eval( ::sl_helpRequest, , , Self )
RETURN Self
ENDIF
@@ -822,7 +795,7 @@ METHOD WvgCrt:helpRequest( xParam )
METHOD WvgCrt:keyboard( xParam )
IF HB_ISNUMERIC( xParam ) .AND. HB_ISBLOCK( ::sl_keyboard )
Eval( ::sl_keyboard, xParam, NIL, Self )
Eval( ::sl_keyboard, xParam, , Self )
RETURN Self
ENDIF
@@ -836,7 +809,7 @@ METHOD WvgCrt:keyboard( xParam )
METHOD WvgCrt:killDisplayFocus( xParam )
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::sl_killDisplayFocus )
Eval( ::sl_killDisplayFocus, NIL, NIL, Self )
Eval( ::sl_killDisplayFocus, , , Self )
RETURN Self
ENDIF
@@ -850,7 +823,7 @@ METHOD WvgCrt:killDisplayFocus( xParam )
METHOD WvgCrt:killInputFocus( xParam )
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::sl_killInputFocus )
Eval( ::sl_killInputFocus, NIL, NIL, Self )
Eval( ::sl_killInputFocus, , , Self )
RETURN Self
ENDIF
@@ -864,7 +837,7 @@ METHOD WvgCrt:killInputFocus( xParam )
METHOD WvgCrt:move( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_move )
Eval( ::sl_move, xParam, NIL, Self )
Eval( ::sl_move, xParam, , Self )
RETURN Self
ENDIF
@@ -878,7 +851,7 @@ METHOD WvgCrt:move( xParam )
METHOD WvgCrt:paint( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_paint )
Eval( ::sl_paint, xParam, NIL, Self )
Eval( ::sl_paint, xParam, , Self )
RETURN Self
ENDIF
@@ -918,7 +891,7 @@ METHOD WvgCrt:resize( xParam )
METHOD WvgCrt:setDisplayFocus( xParam )
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::setDisplayFocus )
Eval( ::setDisplayFocus, NIL, NIL, Self )
Eval( ::setDisplayFocus, , , Self )
RETURN Self
ENDIF
@@ -932,7 +905,7 @@ METHOD WvgCrt:setDisplayFocus( xParam )
METHOD WvgCrt:setInputFocus( xParam )
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::sl_setInputFocus )
Eval( ::sl_setInputFocus, NIL, NIL, Self )
Eval( ::sl_setInputFocus, , , Self )
RETURN Self
ENDIF
@@ -960,7 +933,7 @@ METHOD WvgCrt:dragEnter( xParam, xParam1 )
METHOD WvgCrt:dragMotion( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_dragMotion )
Eval( ::sl_dragMotion, xParam, NIL, Self )
Eval( ::sl_dragMotion, xParam, , Self )
RETURN Self
ENDIF
@@ -974,7 +947,7 @@ METHOD WvgCrt:dragMotion( xParam )
METHOD WvgCrt:dragLeave( xParam )
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::sl_dragLeave )
Eval( ::sl_dragLeave, NIL, NIL, Self )
Eval( ::sl_dragLeave, , , Self )
RETURN Self
ENDIF

View File

@@ -82,7 +82,6 @@ CREATE CLASS WvgDataRef
ENDCLASS
METHOD WvgDataRef:new()
RETURN self
METHOD WvgDataRef:getData()
@@ -98,10 +97,10 @@ METHOD WvgDataRef:getData()
ENDIF
CASE ::className() == "EDIT"
::sl_editBuffer := Wvg_GetMessageText( ::hWnd, WM_GETTEXT, ::bufferLength + 1 )
::sl_editBuffer := wvg_GetMessageText( ::hWnd, WM_GETTEXT, ::bufferLength + 1 )
CASE ::className() == "LISTBOX"
::sl_editBuffer := Wvg_LBGetCurSel( ::hWnd ) + 1
::sl_editBuffer := wvg_LBGetCurSel( ::hWnd ) + 1
#if 0 /* This is contrary the documentation of Xbase++ */
IF ::oParent:className() == "COMBOBOX"
@@ -110,7 +109,7 @@ METHOD WvgDataRef:getData()
AAdd( ::sl_editBuffer, ::getItem( i ) )
NEXT
ELSE
::sl_editBuffer := Wvg_LBGetCurSel( ::hWnd ) + 1
::sl_editBuffer := wvg_LBGetCurSel( ::hWnd ) + 1
ENDIF
#endif
ENDCASE
@@ -140,17 +139,17 @@ METHOD WvgDataRef:setData( xValue, mp2 )
CASE ::className() == "LISTBOX" /* Single Selection */
IF HB_ISNUMERIC( ::sl_editBuffer )
RETURN Wvg_LBSetCurSel( ::hWnd, ::sl_editBuffer - 1 ) >= 0
RETURN wvg_lbSetCurSel( ::hWnd, ::sl_editBuffer - 1 ) >= 0
ENDIF
CASE ::className() == "SysTreeView32"
IF ::sl_editBuffer != NIL .AND. ::sl_editBuffer:hItem != NIL
Wvg_TreeView_SelectItem( ::hWnd, ::sl_editBuffer:hItem )
wvg_TreeView_SelectItem( ::hWnd, ::sl_editBuffer:hItem )
ENDIF
CASE ::className() == "EDIT"
IF HB_ISSTRING( ::sl_editBuffer )
Wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::sl_editBuffer )
wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::sl_editBuffer )
ENDIF
CASE ::className() == "SCROLLBAR"
@@ -161,7 +160,7 @@ METHOD WvgDataRef:setData( xValue, mp2 )
CASE ::className() == "COMBOBOX"
IF HB_ISARRAY( ::sl_editBuffer )
// NOT sure which way it should behave.
// XBase++ documentation IN this regard is crappy.
// Xbase++ documentation IN this regard is crappy.
FOR EACH s IN ::sl_editBuffer
::addItem( s )
NEXT
@@ -172,13 +171,12 @@ METHOD WvgDataRef:setData( xValue, mp2 )
RETURN ::sl_editBuffer
METHOD WvgDataRef:undo()
RETURN .F.
METHOD WvgDataRef:validate( xParam )
IF PCount() == 0 .AND. HB_ISBLOCK( ::sl_validate )
RETURN Eval( ::sl_validate, self )
RETURN Eval( ::sl_validate, Self )
ELSEIF HB_ISBLOCK( xParam )
::sl_validate := xParam
ENDIF

View File

@@ -61,7 +61,7 @@ CREATE CLASS WvgDialog INHERIT WvgWindow
VAR oMenu
VAR aRect
VAR drawingArea
VAR tasklist INIT .T.
VAR tasklist INIT .T.
METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -74,8 +74,8 @@ CREATE CLASS WvgDialog INHERIT WvgWindow
METHOD showModal() INLINE NIL
METHOD setTitle( cTitle ) INLINE ::title := cTitle, hb_gtInfo( HB_GTI_WINTITLE, cTitle )
METHOD getTitle() INLINE hb_gtInfo( HB_GTI_WINTITLE )
METHOD calcClientRect() INLINE ::aRect := Wvg_GetClientRect( ::hWnd ), { 0, 0, ::aRect[ 3 ], ::aRect[ 4 ] }
METHOD calcFrameRect() INLINE ::aRect := Wvg_GetWindowRect( ::hWnd ), { ::aRect[ 1 ], ::aRect[ 2 ], ::aRect[ 3 ] - ::aRect[ 1 ], ::aRect[ 4 ] - ::aRect[ 2 ] }
METHOD calcClientRect() INLINE ::aRect := wvg_GetClientRect( ::hWnd ), { 0, 0, ::aRect[ 3 ], ::aRect[ 4 ] }
METHOD calcFrameRect() INLINE ::aRect := wvg_GetWindowRect( ::hWnd ), { ::aRect[ 1 ], ::aRect[ 2 ], ::aRect[ 3 ] - ::aRect[ 1 ], ::aRect[ 4 ] - ::aRect[ 2 ] }
ENDCLASS
@@ -98,7 +98,7 @@ METHOD WvgDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::WvgWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
if ::lModal
IF ::lModal
::pGT := hb_gtCreate( "WGU" )
::pGTp := hb_gtSelect( ::pGT )
ELSE
@@ -109,10 +109,10 @@ METHOD WvgDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
hb_gtInfo( HB_GTI_PRESPARAMS, { ::exStyle, ::style, ::aPos[ 1 ], ::aPos[ 2 ], ;
::aSize[ 1 ], ::aSize[ 2 ], ::pGTp, .F., .F., HB_WNDTYPE_DIALOG } )
if ::visible
IF ::visible
hb_gtInfo( HB_GTI_SPEC, HB_GTS_SHOWWINDOW, SW_NORMAL )
ELSE
hb_gtInfo( HB_GTI_SPEC, HB_GTS_SHOWWINDOW, SW_HIDE )
hb_gtInfo( HB_GTI_SPEC, HB_GTS_SHOWWINDOW, SW_HIDE )
ENDIF
::hWnd := hb_gtInfo( HB_GTI_SPEC, HB_GTS_WINDOWHANDLE )
@@ -131,11 +131,11 @@ METHOD WvgDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
ENDIF
ENDIF
if ::lModal
IF ::lModal
hb_gtInfo( HB_GTI_DISABLE, ::pGTp )
ENDIF
if ::visible
IF ::visible
::lHasInputFocus := .T.
ENDIF
@@ -167,7 +167,7 @@ METHOD WvgDialog:destroy()
ENDIF
IF ! Empty( ::hBrushBG )
Wvg_DeleteObject( ::hBrushBG )
wvg_DeleteObject( ::hBrushBG )
ENDIF
::pGT := NIL
@@ -196,10 +196,10 @@ METHOD WvgDialog:setFrameState( nState )
METHOD WvgDialog:getFrameState()
IF Wvg_IsIconic( ::hWnd )
IF wvg_IsIconic( ::hWnd )
RETURN WVGDLG_FRAMESTAT_MINIMIZED
ENDIF
IF Wvg_IsZoomed( ::hWnd )
IF wvg_IsZoomed( ::hWnd )
RETURN WVGDLG_FRAMESTAT_MAXIMIZED
ENDIF

View File

@@ -89,7 +89,7 @@ METHOD WvgDrawingArea:create( oParent, oOwner, aPos, aSize, aPresParams, lVisibl
::oParent:addChild( Self )
Wvg_RegisterClass_ByName( ::className() )
wvg_RegisterClass_ByName( ::className() )
::createControl()
@@ -103,18 +103,18 @@ METHOD WvgDrawingArea:handleEvent( nMessage, aNM )
DO CASE
CASE nMessage == HB_GTE_RESIZED
IF HB_ISBLOCK( ::sl_resize )
Eval( ::sl_resize, NIL, NIL, self )
Eval( ::sl_resize, , , Self )
ENDIF
AEval( ::aChildren, {| o | o:handleEvent( HB_GTE_RESIZED, { 0, 0, 0, 0, 0 } ) } )
RETURN EVENT_HANDELLED
CASE nMessage == HB_GTE_CTLCOLOR
IF HB_ISNUMERIC( ::clr_FG )
Wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
ENDIF
IF HB_ISNUMERIC( ::hBrushBG )
Wvg_SetBkMode( aNM[ 1 ], 1 )
Wvg_FillRect( aNM[ 1 ], { 0, 0, ::currentSize()[ 1 ], ::currentSize()[ 2 ] }, ::hBrushBG )
wvg_SetBkMode( aNM[ 1 ], 1 )
wvg_FillRect( aNM[ 1 ], { 0, 0, ::currentSize()[ 1 ], ::currentSize()[ 2 ] }, ::hBrushBG )
RETURN EVENT_HANDELLED
ENDIF
@@ -122,8 +122,8 @@ METHOD WvgDrawingArea:handleEvent( nMessage, aNM )
RETURN EVENT_UNHANDELLED
METHOD destroy() CLASS WvgDrawingArea
METHOD PROCEDURE WvgDrawingArea:destroy()
::wvgWindow:destroy()
RETURN NIL
RETURN

View File

@@ -56,7 +56,7 @@
#include "wvtwin.ch"
#include "wvgparts.ch"
THREAD STATIC t_oCrt := NIL
THREAD STATIC t_oCrt
EXIT PROCEDURE KillGTChildren()
@@ -74,7 +74,7 @@ FUNCTION WvgSetAppWindow( oCrt )
IF Empty( oCrt )
IF Empty( t_oCrt )
t_oCrt := WvgCrt():new()
t_oCrt:hWnd := Wvt_GetWindowHandle()
t_oCrt:hWnd := wvt_GetWindowHandle()
t_oCrt:pWnd := win_N2P( t_oCrt:hWnd )
hb_gtInfo( HB_GTI_NOTIFIERBLOCKGUI, {| nEvent, ... | t_oCrt:notifier( nEvent, ... ) } )
t_oCrt:isGT := .T.

View File

@@ -91,8 +91,6 @@ static const int s_K_Ctrl[] =
static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
/*-*/
static void hb_gt_wvt_RegisterClass( HINSTANCE hInstance )
{
WNDCLASS wndclass;
@@ -100,20 +98,20 @@ static void hb_gt_wvt_RegisterClass( HINSTANCE hInstance )
memset( &wndclass, 0, sizeof( wndclass ) );
wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
wndclass.lpfnWndProc = hb_gt_wvt_WndProc;
/* wndclass.cbClsExtra = 0; */
/* wndclass.cbWndExtra = 0; */
wndclass.hInstance = hInstance;
/* wndclass.hIcon = NULL; */
wndclass.hCursor = LoadCursor( NULL, IDC_ARROW );
wndclass.hbrBackground = NULL; /* ( HBRUSH ) ( COLOR_BTNFACE + 1 ); */
/* wndclass.lpszMenuName = NULL; */
#if 0
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hIcon = NULL;
wndclass.hbrBackground = NULL; /* ( HBRUSH ) ( COLOR_BTNFACE + 1 ); */
wndclass.lpszMenuName = NULL;
#endif
wndclass.lpszClassName = s_szClassName;
if( ! RegisterClass( &wndclass ) )
{
if( GetLastError() != 1410 )
hb_errInternal( 10001, "Failed to register WGU window class", NULL, NULL );
}
if( ! RegisterClass( &wndclass ) &&
GetLastError() != ERROR_CLASS_ALREADY_EXISTS )
hb_errInternal( 10001, "Failed to register WGU window class", NULL, NULL );
}
static PHB_GTWVT hb_gt_wvt_Find( HWND hWnd )
@@ -240,8 +238,8 @@ static PHB_GTWVT hb_gt_wvt_New( PHB_GT pGT, HINSTANCE hInstance, int iCmdShow )
pWVT->keyPointerOut = 0;
pWVT->keyLast = 0;
pWVT->CentreWindow = HB_TRUE; /* Default is to always display window in centre of screen */
pWVT->CodePage = OEM_CHARSET; /* GetACP(); - set code page to default system */
pWVT->CentreWindow = HB_TRUE; /* Default is to always display window in centre of screen */
pWVT->CodePage = OEM_CHARSET; /* GetACP(); - set code page to default system */
pWVT->Win9X = hb_iswin9x();
@@ -319,7 +317,7 @@ static void hb_gt_wvt_FireMenuEvent( PHB_GTWVT pWVT, int iMode, int menuIndex )
hb_gt_wvt_FireEvent( pWVT, HB_GTE_MENU, pEvParams );
}
/* functions for handling the input queues for the mouse and keyboard */
/* Functions for handling the input queues for the mouse and keyboard */
static void hb_gt_wvt_AddCharToInputQueue( PHB_GTWVT pWVT, int iKey )
{
int iPos = pWVT->keyPointerIn;
@@ -356,9 +354,7 @@ static HB_BOOL hb_gt_wvt_GetCharFromInputQueue( PHB_GTWVT pWVT, int * iKey )
{
*iKey = pWVT->Keys[ pWVT->keyPointerOut ];
if( ++pWVT->keyPointerOut >= WVT_CHAR_QUEUE_SIZE )
{
pWVT->keyPointerOut = 0;
}
return HB_TRUE;
}
@@ -570,44 +566,44 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam,
break;
case VK_F1:
hb_gt_wvt_TranslateKey( pWVT, K_F1 , K_SH_F1, K_ALT_F1 , K_CTRL_F1 );
hb_gt_wvt_TranslateKey( pWVT, K_F1 , K_SH_F1, K_ALT_F1 , K_CTRL_F1 );
break;
case VK_F2:
hb_gt_wvt_TranslateKey( pWVT, K_F2 , K_SH_F2, K_ALT_F2 , K_CTRL_F2 );
hb_gt_wvt_TranslateKey( pWVT, K_F2 , K_SH_F2, K_ALT_F2 , K_CTRL_F2 );
break;
case VK_F3:
hb_gt_wvt_TranslateKey( pWVT, K_F3 , K_SH_F3, K_ALT_F3 , K_CTRL_F3 );
hb_gt_wvt_TranslateKey( pWVT, K_F3 , K_SH_F3, K_ALT_F3 , K_CTRL_F3 );
break;
case VK_F4:
#if 0
if( pWVT->AltF4Close && bAlt )
return DefWindowProc( pWVT->hWnd, message, wParam, lParam ) != 0;
#endif
hb_gt_wvt_TranslateKey( pWVT, K_F4 , K_SH_F4, K_ALT_F4 , K_CTRL_F4 );
hb_gt_wvt_TranslateKey( pWVT, K_F4 , K_SH_F4, K_ALT_F4 , K_CTRL_F4 );
break;
case VK_F5:
hb_gt_wvt_TranslateKey( pWVT, K_F5 , K_SH_F5, K_ALT_F5 , K_CTRL_F5 );
hb_gt_wvt_TranslateKey( pWVT, K_F5 , K_SH_F5, K_ALT_F5 , K_CTRL_F5 );
break;
case VK_F6:
hb_gt_wvt_TranslateKey( pWVT, K_F6 , K_SH_F6, K_ALT_F6 , K_CTRL_F6 );
hb_gt_wvt_TranslateKey( pWVT, K_F6 , K_SH_F6, K_ALT_F6 , K_CTRL_F6 );
break;
case VK_F7:
hb_gt_wvt_TranslateKey( pWVT, K_F7 , K_SH_F7, K_ALT_F7 , K_CTRL_F7 );
hb_gt_wvt_TranslateKey( pWVT, K_F7 , K_SH_F7, K_ALT_F7 , K_CTRL_F7 );
break;
case VK_F8:
hb_gt_wvt_TranslateKey( pWVT, K_F8 , K_SH_F8, K_ALT_F8 , K_CTRL_F8 );
hb_gt_wvt_TranslateKey( pWVT, K_F8 , K_SH_F8, K_ALT_F8 , K_CTRL_F8 );
break;
case VK_F9:
hb_gt_wvt_TranslateKey( pWVT, K_F9 , K_SH_F9, K_ALT_F9 , K_CTRL_F9 );
hb_gt_wvt_TranslateKey( pWVT, K_F9 , K_SH_F9, K_ALT_F9 , K_CTRL_F9 );
break;
case VK_F10:
hb_gt_wvt_TranslateKey( pWVT, K_F10 , K_SH_F10,K_ALT_F10 , K_CTRL_F10 );
hb_gt_wvt_TranslateKey( pWVT, K_F10 , K_SH_F10,K_ALT_F10 , K_CTRL_F10 );
break;
case VK_F11:
hb_gt_wvt_TranslateKey( pWVT, K_F11 , K_SH_F11,K_ALT_F11 , K_CTRL_F11 );
hb_gt_wvt_TranslateKey( pWVT, K_F11 , K_SH_F11,K_ALT_F11 , K_CTRL_F11 );
break;
case VK_F12:
hb_gt_wvt_TranslateKey( pWVT, K_F12 , K_SH_F12,K_ALT_F12 , K_CTRL_F12 );
hb_gt_wvt_TranslateKey( pWVT, K_F12 , K_SH_F12,K_ALT_F12 , K_CTRL_F12 );
break;
default:
{
@@ -615,19 +611,19 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam,
HB_BOOL bShift = GetKeyState( VK_SHIFT ) & 0x8000;
int iScanCode = HIWORD( lParam ) & 0xFF;
if( bCtrl && iScanCode == 76 ) /* CTRL_VK_NUMPAD5 */
if( bCtrl && iScanCode == 76 ) /* CTRL_VK_NUMPAD5 */
hb_gt_wvt_AddCharToInputQueue( pWVT, KP_CTRL_5 );
else if( bCtrl && wParam == VK_TAB ) /* K_CTRL_TAB */
else if( bCtrl && wParam == VK_TAB ) /* K_CTRL_TAB */
hb_gt_wvt_AddCharToInputQueue( pWVT, bShift ? K_CTRL_SH_TAB : K_CTRL_TAB );
else if( iScanCode == 70 ) /* Ctrl_Break key OR Scroll Lock Key */
else if( iScanCode == 70 ) /* Ctrl_Break key OR Scroll Lock Key */
{
if( bCtrl ) /* Not scroll lock */
if( bCtrl ) /* Not scroll lock */
{
hb_gt_wvt_AddCharToInputQueue( pWVT, HB_BREAK_FLAG ); /* Pretend Alt+C pressed */
hb_gt_wvt_AddCharToInputQueue( pWVT, HB_BREAK_FLAG ); /* Pretend Alt+C pressed */
pWVT->IgnoreWM_SYSCHAR = HB_TRUE;
}
else
DefWindowProc( pWVT->hWnd, message, wParam, lParam ); /* Let windows handle ScrollLock */
DefWindowProc( pWVT->hWnd, message, wParam, lParam ); /* Let windows handle ScrollLock */
}
else if( bCtrl && iScanCode == 53 && bShift )
hb_gt_wvt_AddCharToInputQueue( pWVT, K_CTRL_QUESTION );
@@ -663,9 +659,9 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam,
case WM_CHAR:
{
HB_BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000;
int iScanCode = HIWORD( lParam ) & 0xFF;
int c = ( int ) wParam;
HB_BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000;
int iScanCode = HIWORD( lParam ) & 0xFF;
int c = ( int ) wParam;
if( ! pWVT->IgnoreWM_SYSCHAR )
{
@@ -677,7 +673,7 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam,
{
switch( c )
{
/* handle special characters */
/* Handle special characters */
case VK_BACK:
hb_gt_wvt_TranslateKey( pWVT, K_BS, K_SH_BS, K_ALT_BS, K_CTRL_BS );
break;
@@ -707,7 +703,7 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam,
}
}
}
pWVT->IgnoreWM_SYSCHAR = HB_FALSE; /* As Suggested by Peter */
pWVT->IgnoreWM_SYSCHAR = HB_FALSE; /* As Suggested by Peter */
break;
}
@@ -895,13 +891,16 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
case WM_NCMOUSEMOVE:
hb_gt_wvt_MouseEvent( pWVT, message, wParam, lParam );
return 0;
case WM_QUERYENDSESSION: /* Closing down computer */
case WM_QUERYENDSESSION: /* Closing down computer */
hb_vmRequestQuit();
return 0;
case WM_ENTERIDLE:
/* FSG - 2004-05-12 - Signal than i'm on idle */
hb_idleState();
return 0;
/* Pritpal Bedi - 2008-06-06 */
case WM_ACTIVATE:
{
@@ -984,9 +983,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
{
/* Menu command */
if( HIWORD( wParam ) == 0 )
{
hb_gt_wvt_FireMenuEvent( pWVT, 0, ( int ) LOWORD( wParam ) );
}
}
else
{
@@ -1020,9 +1017,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
{
PHB_ITEM pEvParams = hb_itemNew( NULL );
if( hb_gt_wvt_FireEvent( pWVT, HB_GTE_CLOSE, pEvParams ) == 0 )
{
hb_gt_wvt_AddCharToInputQueue( pWVT, HB_K_CLOSE );
}
return 0;
}
case WM_QUIT:
@@ -1092,6 +1087,7 @@ static WPARAM hb_gt_wvt_ProcessMessages( PHB_GTWVT pWVT )
TranslateMessage( &msg );
DispatchMessage( &msg );
}
return msg.wParam;
}
@@ -1130,18 +1126,18 @@ static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT )
}
hWnd = CreateWindowEx(
pWVT->pPP->exStyle, /* extended style */
s_szClassName, /* classname */
pWVT->lpWindowTitle, /* window name */
pWVT->pPP->style, /* style */
pWVT->pPP->x, /* x */
pWVT->pPP->y, /* y */
pWVT->pPP->width, /* width */
pWVT->pPP->height, /* height */
hWndParent, /* window parent */
NULL, /* menu */
pWVT->hInstance, /* instance */
NULL ); /* lpParam */
pWVT->pPP->exStyle, /* extended style */
s_szClassName, /* classname */
pWVT->lpWindowTitle, /* window name */
pWVT->pPP->style, /* style */
pWVT->pPP->x, /* x */
pWVT->pPP->y, /* y */
pWVT->pPP->width, /* width */
pWVT->pPP->height, /* height */
hWndParent, /* window parent */
NULL, /* menu */
pWVT->hInstance, /* instance */
NULL ); /* lpParam */
ShowWindow( pWVT->hWnd, pWVT->pPP->bVisible ? SW_SHOWNORMAL : SW_HIDE );
UpdateWindow( pWVT->hWnd );
@@ -1232,11 +1228,11 @@ static int hb_gt_wvt_ReadKey( PHB_GT pGT, int iEventMask )
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_ReadKey(%p,%d)", ( void * ) pGT, iEventMask ) );
HB_SYMBOL_UNUSED( iEventMask ); /* we ignore the event mask! */
HB_SYMBOL_UNUSED( iEventMask ); /* we ignore the event mask! */
pWVT = HB_GTWVT_GET( pGT );
if( pWVT->hWnd ) /* Is the window already open */
if( pWVT->hWnd ) /* Is the window already open? */
hb_gt_wvt_ProcessMessages( pWVT );
fKey = hb_gt_wvt_GetCharFromInputQueue( pWVT, &c );
@@ -1259,7 +1255,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
PHB_GTWVT pWVT;
int iVal;
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_Info(%p,%d,%p)", ( void * ) pGT, iType, pInfo ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_Info(%p,%d,%p)", ( void * ) pGT, iType, ( void * ) pInfo ) );
pWVT = HB_GTWVT_GET( pGT );
@@ -1317,6 +1313,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
pWVT->fontQuality = hb_arrayGetNI( pInfo->pNewVal, 5 );
}
break;
case HB_GTI_FONTSIZE:
pInfo->pResult = hb_itemPutNI( pInfo->pResult, pWVT->fontHeight );
@@ -1337,6 +1334,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
if( hb_itemType( pInfo->pNewVal ) & HB_IT_STRING )
hb_strncpy( pWVT->fontFace, hb_itemGetCPtr( pInfo->pNewVal ), sizeof( pWVT->fontFace ) - 1 );
break;
case HB_GTI_FONTWEIGHT:
pInfo->pResult = hb_itemPutNI( pInfo->pResult, pWVT->fontWeight );
if( hb_itemType( pInfo->pNewVal ) & HB_IT_NUMERIC )
@@ -1350,6 +1348,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
pWVT->fontQuality = hb_itemGetNI( pInfo->pNewVal );
break;
case HB_GTI_SCREENHEIGHT:
{
RECT rc;
@@ -1375,9 +1374,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
case HB_GTI_DESKTOPWIDTH:
{
RECT rDesk;
HWND hDesk;
hDesk = GetDesktopWindow();
HWND hDesk = GetDesktopWindow();
GetWindowRect( hDesk, &rDesk );
pInfo->pResult = hb_itemPutNI( pInfo->pResult, rDesk.right - rDesk.left );
break;
@@ -1393,8 +1390,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
case HB_GTI_DESKTOPCOLS:
{
RECT rDesk;
HWND hDesk;
hDesk = GetDesktopWindow();
HWND hDesk = GetDesktopWindow();
GetClientRect( hDesk, &rDesk );
pInfo->pResult = hb_itemPutNI( pInfo->pResult,
( rDesk.right - rDesk.left ) / pWVT->fontWidth );
@@ -1403,8 +1399,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
case HB_GTI_DESKTOPROWS:
{
RECT rDesk;
HWND hDesk;
hDesk = GetDesktopWindow();
HWND hDesk = GetDesktopWindow();
GetClientRect( hDesk, &rDesk );
pInfo->pResult = hb_itemPutNI( pInfo->pResult,
( rDesk.bottom - rDesk.top ) / pWVT->fontHeight );
@@ -1424,9 +1419,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
pInfo->pResult = hb_itemPutNI( pInfo->pResult, pWVT->CodePage );
iVal = hb_itemGetNI( pInfo->pNewVal );
if( iVal > 0 && iVal != pWVT->CodePage )
{
pWVT->CodePage = iVal;
}
break;
case HB_GTI_ICONFILE:
if( hb_itemType( pInfo->pNewVal ) & HB_IT_STRING )
@@ -1441,8 +1434,8 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
hb_strfree( hImageName );
if( pWVT->hWnd )
{
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_SMALL, ( LPARAM ) pWVT->hIcon ); /* Set Title Bar Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_BIG , ( LPARAM ) pWVT->hIcon ); /* Set Task List Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_SMALL, ( LPARAM ) pWVT->hIcon ); /* Set Title Bar Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_BIG , ( LPARAM ) pWVT->hIcon ); /* Set Task List Icon */
}
if( hIconToFree )
@@ -1463,8 +1456,8 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
hb_strfree( hIconName );
if( pWVT->hWnd )
{
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_SMALL, ( LPARAM ) pWVT->hIcon ); /* Set Title Bar Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_BIG , ( LPARAM ) pWVT->hIcon ); /* Set Task List Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_SMALL, ( LPARAM ) pWVT->hIcon ); /* Set Title Bar Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_BIG , ( LPARAM ) pWVT->hIcon ); /* Set Task List Icon */
}
if( hIconToFree )
@@ -1481,8 +1474,8 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
if( pWVT->hWnd )
{
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_SMALL, ( LPARAM ) pWVT->hIcon ); /* Set Title Bar Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_BIG , ( LPARAM ) pWVT->hIcon ); /* Set Task List Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_SMALL, ( LPARAM ) pWVT->hIcon ); /* Set Title Bar Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_BIG , ( LPARAM ) pWVT->hIcon ); /* Set Task List Icon */
}
if( hIconToFree )
@@ -1529,11 +1522,13 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
#endif
}
break;
case HB_GTI_CURSORBLINKRATE:
pInfo->pResult = hb_itemPutNI( pInfo->pResult, GetCaretBlinkTime() );
if( hb_itemType( pInfo->pNewVal ) & HB_IT_NUMERIC )
SetCaretBlinkTime( hb_itemGetNI( pInfo->pNewVal ) );
break;
case HB_GTI_SCREENSIZE:
{
RECT rc;
@@ -1552,9 +1547,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
iY = hb_arrayGetNI( pInfo->pNewVal, 2 );
iX = hb_arrayGetNI( pInfo->pNewVal, 1 );
if( iY > 0 )
{
MoveWindow( pWVT->hWnd, 0, 0, iX, iY, TRUE );
}
}
break;
}
@@ -1675,6 +1668,11 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
}
}
break;
case HB_GTI_WINHANDLE:
pInfo->pResult = hb_itemPutPtr( pInfo->pResult, pWVT->hWnd );
break;
case HB_GTI_SPEC:
{
int iMessage = hb_itemGetNI( pInfo->pNewVal );
@@ -1715,10 +1713,12 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
if( pWVT->hWnd )
hb_gt_wvt_ProcessMessages( pWVT );
break;
case HB_GTS_KEYBOARD:
if( hb_itemType( pInfo->pNewVal2 ) & HB_IT_NUMERIC )
hb_gt_wvt_AddCharToInputQueue( pWVT, hb_itemGetNI( pInfo->pNewVal2 ) );
break;
case HB_GTS_RESETWINDOW:
if( pWVT->hWnd )
{
@@ -1729,10 +1729,12 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
#endif
}
break;
case HB_GTS_SETTIMER:
if( hb_itemType( pInfo->pNewVal2 ) & HB_IT_ARRAY && pWVT->hWnd )
if( ( hb_itemType( pInfo->pNewVal2 ) & HB_IT_ARRAY ) && pWVT->hWnd )
SetTimer( pWVT->hWnd, hb_arrayGetNI( pInfo->pNewVal2, 1 ), hb_arrayGetNI( pInfo->pNewVal2, 2 ), NULL );
break;
case HB_GTS_KILLTIMER:
if( pWVT->hWnd )
{
@@ -1740,6 +1742,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
KillTimer( pWVT->hWnd, hb_itemGetNI( pInfo->pNewVal2 ) );
}
break;
case HB_GTS_SETPOSITION:
if( pWVT->hWnd && ( hb_itemType( pInfo->pNewVal2 ) & HB_IT_ARRAY ) )
{
@@ -1768,10 +1771,12 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
}
}
break;
case HB_GTS_UPDATEWINDOW:
if( pWVT->hWnd )
UpdateWindow( pWVT->hWnd );
break;
case HB_GTS_SYSTRAYICON:
if( pWVT->hWnd && ( hb_itemType( pInfo->pNewVal2 ) & HB_IT_ARRAY ) )
{
@@ -1875,6 +1880,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
}
}
break;
case HB_GTS_FACTOR:
if( pWVT->hWnd )
{
@@ -1888,7 +1894,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
pWVT->pfnLayered( pWVT->hWnd,
RGB( 255, 255, 255 ),
( BYTE ) hb_itemGetNI( pInfo->pNewVal2 ),
/*LWA_COLORKEY|*/ LWA_ALPHA );
/* LWA_COLORKEY | */ LWA_ALPHA );
}
#endif
}
@@ -1899,8 +1905,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
case HB_GTI_PRESPARAMS:
if( hb_itemType( pInfo->pNewVal ) & HB_IT_ARRAY )
{
HB_SIZE iParam = hb_arrayLen( pInfo->pNewVal );
if( iParam == HB_GTI_PP_SIZE )
if( hb_arrayLen( pInfo->pNewVal ) == HB_GTI_PP_SIZE )
{
PHB_ITEM pSome;
@@ -1942,9 +1947,8 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
}
/* Only possible when it is WvgDialog() Window */
if( pWVT->hWnd && pWVT->pPP->bConfigured )
{
MoveWindow( pWVT->hWnd, pWVT->pPP->x, pWVT->pPP->y, pWVT->pPP->width, pWVT->pPP->height, TRUE );
}
break;
case HB_GTI_ENABLE:
{
@@ -1979,14 +1983,10 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
}
break;
}
case HB_GTI_WINHANDLE:
pInfo->pResult = hb_itemPutPtr( pInfo->pResult, pWVT->hWnd );
break;
default:
return HB_GTSUPER_INFO( pGT, iType, pInfo );
}
return HB_TRUE;
}

View File

@@ -56,164 +56,164 @@ DYNAMIC WvgToolBarButton
DYNAMIC WvgTreeView
DYNAMIC WvgTreeViewItem
DYNAMIC WvgWindow
DYNAMIC Wvg_AddToolBarButton
DYNAMIC Wvg_And
DYNAMIC Wvg_AppendMenu
DYNAMIC Wvg_BeginMouseTracking
DYNAMIC Wvg_BoxGet
DYNAMIC Wvg_BoxGroup
DYNAMIC Wvg_BoxGroupRaised
DYNAMIC Wvg_BoxRaised
DYNAMIC Wvg_BoxRecessed
DYNAMIC Wvg_BringWindowToTop
DYNAMIC Wvg_Button_GetCheck
DYNAMIC Wvg_CallWindowProc
DYNAMIC Wvg_CheckDlgButton
DYNAMIC Wvg_CheckMenuItem
DYNAMIC Wvg_CheckRadioButton
DYNAMIC Wvg_ChooseColor
DYNAMIC Wvg_ChooseFont
DYNAMIC Wvg_ChooseFont_GetLogFont
DYNAMIC Wvg_ClearGUIObjects
DYNAMIC Wvg_ClientToScreen
DYNAMIC Wvg_ColorRect
DYNAMIC Wvg_CreateBrush
DYNAMIC Wvg_CreateMenu
DYNAMIC Wvg_CreatePopupMenu
DYNAMIC Wvg_CreateToolTipWindow
DYNAMIC Wvg_CreateWindowEx
DYNAMIC Wvg_DefWindowProc
DYNAMIC Wvg_DeleteMenu
DYNAMIC Wvg_DeleteObject
DYNAMIC Wvg_DelPaint
DYNAMIC Wvg_DestroyMenu
DYNAMIC Wvg_DestroyWindow
DYNAMIC Wvg_DrawImage
DYNAMIC Wvg_DrawMenuBar
DYNAMIC Wvg_DrawText
DYNAMIC Wvg_Ellipse
DYNAMIC Wvg_EnableMenuItem
DYNAMIC Wvg_EnableWindow
DYNAMIC Wvg_FillRect
DYNAMIC Wvg_FindWindow
DYNAMIC Wvg_FontCreate
DYNAMIC Wvg_ForceWindowToTop
DYNAMIC Wvg_GetClientRect
DYNAMIC Wvg_GetCurrentBrush
DYNAMIC Wvg_GetCurrentFont
DYNAMIC Wvg_GetCurrentObject
DYNAMIC Wvg_GetDC
DYNAMIC Wvg_GetDesktopWindow
DYNAMIC Wvg_GetDialogBaseUnits
DYNAMIC Wvg_GetDlgItem
DYNAMIC Wvg_GetDlgItemText
DYNAMIC Wvg_GetFocus
DYNAMIC Wvg_GetMessageText
DYNAMIC Wvg_GetNMHdrInfo
DYNAMIC Wvg_GetNMMouseInfo
DYNAMIC Wvg_GetNMTreeViewInfo
DYNAMIC Wvg_GetPaint
DYNAMIC Wvg_GetStockObject
DYNAMIC Wvg_GetWindowRect
DYNAMIC Wvg_gtInfoEx
DYNAMIC Wvg_HeightToPointSize
DYNAMIC Wvg_hInstance
DYNAMIC Wvg_HIWORD
DYNAMIC Wvg_Image
DYNAMIC Wvg_InsertMenu
DYNAMIC Wvg_InsertPaint
DYNAMIC Wvg_InvalidateRect
DYNAMIC Wvg_IsDlgButtonChecked
DYNAMIC Wvg_IsIconic
DYNAMIC Wvg_IsMenuItemChecked
DYNAMIC Wvg_IsMenuItemEnabled
DYNAMIC Wvg_IsWindow
DYNAMIC Wvg_IsZoomed
DYNAMIC Wvg_Label
DYNAMIC Wvg_LabelEx
DYNAMIC Wvg_LabelEx2
DYNAMIC Wvg_LBGetCurSel
DYNAMIC Wvg_LBGetText
DYNAMIC Wvg_LBSetCurSel
DYNAMIC Wvg_Line
DYNAMIC Wvg_LineEx
DYNAMIC Wvg_LoadIcon
DYNAMIC Wvg_LoadImage
DYNAMIC Wvg_LOWORD
DYNAMIC Wvg_MakeLParam
DYNAMIC Wvg_MessageBox
DYNAMIC Wvg_MoveWindow
DYNAMIC Wvg_Not
DYNAMIC Wvg_Object
DYNAMIC Wvg_Or
DYNAMIC Wvg_Outline
DYNAMIC Wvg_OutlineEx
DYNAMIC Wvg_Picture
DYNAMIC Wvg_PictureEx
DYNAMIC Wvg_PointSizeToHeight
DYNAMIC Wvg_PostMessage
DYNAMIC Wvg_PrepareBitmapFromFile
DYNAMIC Wvg_PrepareBitmapFromResourceId
DYNAMIC Wvg_PrepareBitmapFromResourceName
DYNAMIC Wvg_PurgePaint
DYNAMIC Wvg_Rectangle
DYNAMIC Wvg_RegisterClass_ByName
DYNAMIC Wvg_ReleaseDC
DYNAMIC Wvg_ReleaseWindowProcBlock
DYNAMIC Wvg_RoundRect
DYNAMIC Wvg_ScreenToClient
DYNAMIC Wvg_SelectObject
DYNAMIC Wvg_SendCBMessage
DYNAMIC Wvg_SendDlgItemMessage
DYNAMIC Wvg_SendEditControlMessage
DYNAMIC Wvg_SendMessage
DYNAMIC Wvg_SendMessageText
DYNAMIC Wvg_SendToolBarMessage
DYNAMIC Wvg_SetBkColor
DYNAMIC Wvg_SetBkMode
DYNAMIC Wvg_SetCurrentBrush
DYNAMIC Wvg_SetDCBrushColor
DYNAMIC Wvg_SetDCPenColor
DYNAMIC Wvg_SetDlgItemText
DYNAMIC Wvg_SetFocus
DYNAMIC Wvg_SetForegroundWindow
DYNAMIC Wvg_SetGObjData
DYNAMIC Wvg_SetGObjState
DYNAMIC Wvg_SetLayeredWindowAttributes
DYNAMIC Wvg_SetMenu
DYNAMIC Wvg_SetMenuItem
DYNAMIC Wvg_SetPaint
DYNAMIC Wvg_SetParent
DYNAMIC Wvg_SetTextColor
DYNAMIC Wvg_SetTimer
DYNAMIC Wvg_SetToolTipText
DYNAMIC Wvg_SetWindowLong
DYNAMIC Wvg_SetWindowPosAndSize
DYNAMIC Wvg_SetWindowPosition
DYNAMIC Wvg_SetWindowPosToBack
DYNAMIC Wvg_SetWindowPosToTop
DYNAMIC Wvg_SetWindowProcBlock
DYNAMIC Wvg_SetWindowSize
DYNAMIC Wvg_SetWindowText
DYNAMIC Wvg_SetWndProc
DYNAMIC Wvg_ShadedRect
DYNAMIC Wvg_ShowWindow
DYNAMIC Wvg_Sleep
DYNAMIC Wvg_StatusBarCreatePanel
DYNAMIC Wvg_StatusBarRefresh
DYNAMIC Wvg_StatusBarSetText
DYNAMIC Wvg_TextBox
DYNAMIC Wvg_TrackPopupMenu
DYNAMIC Wvg_TreeView_AddItem
DYNAMIC Wvg_TreeView_Expand
DYNAMIC Wvg_TreeView_GetSelectionInfo
DYNAMIC Wvg_TreeView_SelectItem
DYNAMIC Wvg_TreeView_SetBkColor
DYNAMIC Wvg_TreeView_SetLineColor
DYNAMIC Wvg_TreeView_SetTextColor
DYNAMIC Wvg_TreeView_ShowExpanded
DYNAMIC Wvg_TVIs_Expanded
DYNAMIC Wvg_UpdateWindow
DYNAMIC wvg_AddToolBarButton
DYNAMIC wvg_And
DYNAMIC wvg_AppendMenu
DYNAMIC wvg_BeginMouseTracking
DYNAMIC wvg_BoxGet
DYNAMIC wvg_BoxGroup
DYNAMIC wvg_BoxGroupRaised
DYNAMIC wvg_BoxRaised
DYNAMIC wvg_BoxRecessed
DYNAMIC wvg_BringWindowToTop
DYNAMIC wvg_Button_GetCheck
DYNAMIC wvg_CallWindowProc
DYNAMIC wvg_CheckDlgButton
DYNAMIC wvg_CheckMenuItem
DYNAMIC wvg_CheckRadioButton
DYNAMIC wvg_ChooseColor
DYNAMIC wvg_ChooseFont
DYNAMIC wvg_ChooseFont_GetLogFont
DYNAMIC wvg_ClearGUIObjects
DYNAMIC wvg_ClientToScreen
DYNAMIC wvg_ColorRect
DYNAMIC wvg_CreateBrush
DYNAMIC wvg_CreateMenu
DYNAMIC wvg_CreatePopupMenu
DYNAMIC wvg_CreateToolTipWindow
DYNAMIC wvg_CreateWindowEx
DYNAMIC wvg_DefWindowProc
DYNAMIC wvg_DeleteMenu
DYNAMIC wvg_DeleteObject
DYNAMIC wvg_DelPaint
DYNAMIC wvg_DestroyMenu
DYNAMIC wvg_DestroyWindow
DYNAMIC wvg_DrawImage
DYNAMIC wvg_DrawMenuBar
DYNAMIC wvg_DrawText
DYNAMIC wvg_Ellipse
DYNAMIC wvg_EnableMenuItem
DYNAMIC wvg_EnableWindow
DYNAMIC wvg_FillRect
DYNAMIC wvg_FindWindow
DYNAMIC wvg_FontCreate
DYNAMIC wvg_ForceWindowToTop
DYNAMIC wvg_GetClientRect
DYNAMIC wvg_GetCurrentBrush
DYNAMIC wvg_GetCurrentFont
DYNAMIC wvg_GetCurrentObject
DYNAMIC wvg_GetDC
DYNAMIC wvg_GetDesktopWindow
DYNAMIC wvg_GetDialogBaseUnits
DYNAMIC wvg_GetDlgItem
DYNAMIC wvg_GetDlgItemText
DYNAMIC wvg_GetFocus
DYNAMIC wvg_GetMessageText
DYNAMIC wvg_GetNMHdrInfo
DYNAMIC wvg_GetNMMouseInfo
DYNAMIC wvg_GetNMTreeViewInfo
DYNAMIC wvg_GetPaint
DYNAMIC wvg_GetStockObject
DYNAMIC wvg_GetWindowRect
DYNAMIC wvg_gtInfoEx
DYNAMIC wvg_HeightToPointSize
DYNAMIC wvg_hInstance
DYNAMIC wvg_HIWORD
DYNAMIC wvg_Image
DYNAMIC wvg_InsertMenu
DYNAMIC wvg_InsertPaint
DYNAMIC wvg_InvalidateRect
DYNAMIC wvg_IsDlgButtonChecked
DYNAMIC wvg_IsIconic
DYNAMIC wvg_IsMenuItemChecked
DYNAMIC wvg_IsMenuItemEnabled
DYNAMIC wvg_IsWindow
DYNAMIC wvg_IsZoomed
DYNAMIC wvg_Label
DYNAMIC wvg_LabelEx
DYNAMIC wvg_LabelEx2
DYNAMIC wvg_LBGetCurSel
DYNAMIC wvg_LBGetText
DYNAMIC wvg_LBSetCurSel
DYNAMIC wvg_Line
DYNAMIC wvg_LineEx
DYNAMIC wvg_LoadIcon
DYNAMIC wvg_LoadImage
DYNAMIC wvg_LOWORD
DYNAMIC wvg_MakeLParam
DYNAMIC wvg_MessageBox
DYNAMIC wvg_MoveWindow
DYNAMIC wvg_Not
DYNAMIC wvg_Object
DYNAMIC wvg_Or
DYNAMIC wvg_Outline
DYNAMIC wvg_OutlineEx
DYNAMIC wvg_Picture
DYNAMIC wvg_PictureEx
DYNAMIC wvg_PointSizeToHeight
DYNAMIC wvg_PostMessage
DYNAMIC wvg_PrepareBitmapFromFile
DYNAMIC wvg_PrepareBitmapFromResourceId
DYNAMIC wvg_PrepareBitmapFromResourceName
DYNAMIC wvg_PurgePaint
DYNAMIC wvg_Rectangle
DYNAMIC wvg_RegisterClass_ByName
DYNAMIC wvg_ReleaseDC
DYNAMIC wvg_ReleaseWindowProcBlock
DYNAMIC wvg_RoundRect
DYNAMIC wvg_ScreenToClient
DYNAMIC wvg_SelectObject
DYNAMIC wvg_SendCBMessage
DYNAMIC wvg_SendDlgItemMessage
DYNAMIC wvg_SendEditControlMessage
DYNAMIC wvg_SendMessage
DYNAMIC wvg_SendMessageText
DYNAMIC wvg_SendToolBarMessage
DYNAMIC wvg_SetBkColor
DYNAMIC wvg_SetBkMode
DYNAMIC wvg_SetCurrentBrush
DYNAMIC wvg_SetDCBrushColor
DYNAMIC wvg_SetDCPenColor
DYNAMIC wvg_SetDlgItemText
DYNAMIC wvg_SetFocus
DYNAMIC wvg_SetForegroundWindow
DYNAMIC wvg_SetGObjData
DYNAMIC wvg_SetGObjState
DYNAMIC wvg_SetLayeredWindowAttributes
DYNAMIC wvg_SetMenu
DYNAMIC wvg_SetMenuItem
DYNAMIC wvg_SetPaint
DYNAMIC wvg_SetParent
DYNAMIC wvg_SetTextColor
DYNAMIC wvg_SetTimer
DYNAMIC wvg_SetToolTipText
DYNAMIC wvg_SetWindowLong
DYNAMIC wvg_SetWindowPosAndSize
DYNAMIC wvg_SetWindowPosition
DYNAMIC wvg_SetWindowPosToBack
DYNAMIC wvg_SetWindowPosToTop
DYNAMIC wvg_SetWindowProcBlock
DYNAMIC wvg_SetWindowSize
DYNAMIC wvg_SetWindowText
DYNAMIC wvg_SetWndProc
DYNAMIC wvg_ShadedRect
DYNAMIC wvg_ShowWindow
DYNAMIC wvg_Sleep
DYNAMIC wvg_StatusBarCreatePanel
DYNAMIC wvg_StatusBarRefresh
DYNAMIC wvg_StatusBarSetText
DYNAMIC wvg_TextBox
DYNAMIC wvg_TrackPopupMenu
DYNAMIC wvg_TreeView_AddItem
DYNAMIC wvg_TreeView_Expand
DYNAMIC wvg_TreeView_GetSelectionInfo
DYNAMIC wvg_TreeView_SelectItem
DYNAMIC wvg_TreeView_SetBkColor
DYNAMIC wvg_TreeView_SetLineColor
DYNAMIC wvg_TreeView_SetTextColor
DYNAMIC wvg_TreeView_ShowExpanded
DYNAMIC wvg_TVIs_Expanded
DYNAMIC wvg_UpdateWindow
DYNAMIC WvtBanner
DYNAMIC WvtBrowse
DYNAMIC WvtConsole
@@ -234,141 +234,141 @@ DYNAMIC WvtStatusBar
DYNAMIC WvtTextBox
DYNAMIC WvtToolBar
DYNAMIC WvtToolButton
DYNAMIC Wvt_AddDlgItem
DYNAMIC Wvt_AppendMenu
DYNAMIC Wvt_CBAddString
DYNAMIC Wvt_CBSetCurSel
DYNAMIC Wvt_CenterWindow
DYNAMIC Wvt_ChooseColor
DYNAMIC Wvt_ChooseFont
DYNAMIC Wvt_ClientToScreen
DYNAMIC Wvt_Core
DYNAMIC Wvt_CreateDialog
DYNAMIC Wvt_CreateDialogDynamic
DYNAMIC Wvt_CreateDialogModal
DYNAMIC Wvt_CreateFont
DYNAMIC Wvt_CreateMenu
DYNAMIC Wvt_CreatePopupMenu
DYNAMIC Wvt_DeleteMenu
DYNAMIC Wvt_DestroyMenu
DYNAMIC WVT_DESTROYPICTURE
DYNAMIC Wvt_DialogBox
DYNAMIC Wvt_DlgSetIcon
DYNAMIC Wvt_DrawBoxGet
DYNAMIC Wvt_DrawBoxGroup
DYNAMIC Wvt_DrawBoxGroupRaised
DYNAMIC Wvt_DrawBoxRaised
DYNAMIC Wvt_DrawBoxRecessed
DYNAMIC Wvt_DrawButton
DYNAMIC Wvt_DrawColorRect
DYNAMIC Wvt_DrawEllipse
DYNAMIC Wvt_DrawFocusRect
DYNAMIC Wvt_DrawGridHorz
DYNAMIC Wvt_DrawGridVert
DYNAMIC Wvt_DrawImage
DYNAMIC Wvt_DrawLabel
DYNAMIC Wvt_DrawLabelEx
DYNAMIC Wvt_DrawLabelObj
DYNAMIC Wvt_DrawLine
DYNAMIC Wvt_DrawLineEx
DYNAMIC Wvt_DrawMenuBar
DYNAMIC Wvt_DrawOutline
DYNAMIC Wvt_DrawOutlineEx
DYNAMIC Wvt_DrawPicture
DYNAMIC Wvt_DrawPictureEx
DYNAMIC Wvt_DrawProgressBar
DYNAMIC Wvt_DrawRectangle
DYNAMIC Wvt_DrawRoundRect
DYNAMIC Wvt_DrawScrollButton
DYNAMIC Wvt_DrawScrollThumbHorz
DYNAMIC Wvt_DrawScrollThumbVert
DYNAMIC Wvt_DrawShadedRect
DYNAMIC Wvt_DrawStatusBar
DYNAMIC Wvt_DrawTextBox
DYNAMIC Wvt_DrawToolButtonState
DYNAMIC Wvt_EnableMenuItem
DYNAMIC Wvt_EnableShortcuts
DYNAMIC Wvt_GetClipboard
DYNAMIC Wvt_GetCursorPos
DYNAMIC Wvt_GetFontHandle
DYNAMIC Wvt_GetFontInfo
DYNAMIC Wvt_GetLastMenuEvent
DYNAMIC Wvt_GetMenu
DYNAMIC Wvt_GetOpenFileName
DYNAMIC Wvt_GetPaintRect
DYNAMIC Wvt_GetPalette
DYNAMIC Wvt_GetRGBColor
DYNAMIC Wvt_GetRGBColorByString
DYNAMIC Wvt_GetSaveFileName
DYNAMIC Wvt_GetScreenHeight
DYNAMIC Wvt_GetScreenWidth
DYNAMIC Wvt_GetTitle
DYNAMIC Wvt_GetToolTipBkColor
DYNAMIC Wvt_GetToolTipTextColor
DYNAMIC Wvt_GetToolTipWidth
DYNAMIC Wvt_GetWindowHandle
DYNAMIC Wvt_GetXYFromRowCol
DYNAMIC Wvt_Hide
DYNAMIC Wvt_InvalidateRect
DYNAMIC Wvt_IsLButtonPressed
DYNAMIC Wvt_Keyboard
DYNAMIC Wvt_KillTimer
DYNAMIC Wvt_LBAddString
DYNAMIC Wvt_LBDeleteString
DYNAMIC Wvt_LBGetCount
DYNAMIC Wvt_LBSetCurSel
DYNAMIC Wvt_LoadFont
DYNAMIC Wvt_LoadPen
DYNAMIC Wvt_LoadPicture
DYNAMIC WVT_LOADPICTUREEX
DYNAMIC Wvt_LoadPictureFromResource
DYNAMIC Wvt_LoadPictureFromResourceEx
DYNAMIC Wvt_MakeDlgTemplate
DYNAMIC Wvt_Maximize
DYNAMIC Wvt_MessageBox
DYNAMIC Wvt_Minimize
DYNAMIC Wvt_PasteFromClipboard
DYNAMIC Wvt_ProcessMessages
DYNAMIC Wvt_ResetWindow
DYNAMIC Wvt_RestScreen
DYNAMIC Wvt_SaveScreen
DYNAMIC Wvt_SetAltF4Close
DYNAMIC Wvt_SetAsNormal
DYNAMIC Wvt_SetBrush
DYNAMIC Wvt_SetClipboard
DYNAMIC Wvt_SetCodepage
DYNAMIC Wvt_SetDlgCoMode
DYNAMIC Wvt_SetFont
DYNAMIC Wvt_SetGUI
DYNAMIC Wvt_SetIcon
DYNAMIC Wvt_SetLastMenuEvent
DYNAMIC Wvt_SetMenu
DYNAMIC Wvt_SetMenuKeyEvent
DYNAMIC Wvt_SetMouseMove
DYNAMIC Wvt_SetMousePos
DYNAMIC Wvt_SetOnTop
DYNAMIC Wvt_SetPalette
DYNAMIC Wvt_SetPen
DYNAMIC Wvt_SetPointer
DYNAMIC Wvt_SetPopupMenu
DYNAMIC Wvt_SetTimer
DYNAMIC Wvt_SetTitle
DYNAMIC Wvt_SetToolTip
DYNAMIC Wvt_SetToolTipActive
DYNAMIC Wvt_SetToolTipBkColor
DYNAMIC Wvt_SetToolTipMargin
DYNAMIC Wvt_SetToolTipText
DYNAMIC Wvt_SetToolTipTextColor
DYNAMIC Wvt_SetToolTipTitle
DYNAMIC Wvt_SetToolTipWidth
DYNAMIC Wvt_SetWindowPos
DYNAMIC Wvt_Show
DYNAMIC Wvt_ShowWindow
DYNAMIC Wvt_TrackPopupMenu
DYNAMIC Wvt_Update
DYNAMIC Wvt_Utils
DYNAMIC Wvt_WindowCentre
DYNAMIC Wvt__MakeDlgTemplate
DYNAMIC wvt_AddDlgItem
DYNAMIC wvt_AppendMenu
DYNAMIC wvt_CBAddString
DYNAMIC wvt_CBSetCurSel
DYNAMIC wvt_CenterWindow
DYNAMIC wvt_ChooseColor
DYNAMIC wvt_ChooseFont
DYNAMIC wvt_ClientToScreen
DYNAMIC wvt_Core
DYNAMIC wvt_CreateDialog
DYNAMIC wvt_CreateDialogDynamic
DYNAMIC wvt_CreateDialogModal
DYNAMIC wvt_CreateFont
DYNAMIC wvt_CreateMenu
DYNAMIC wvt_CreatePopupMenu
DYNAMIC wvt_DeleteMenu
DYNAMIC wvt_DestroyMenu
DYNAMIC wvt_DESTROYPICTURE
DYNAMIC wvt_DialogBox
DYNAMIC wvt_DlgSetIcon
DYNAMIC wvt_DrawBoxGet
DYNAMIC wvt_DrawBoxGroup
DYNAMIC wvt_DrawBoxGroupRaised
DYNAMIC wvt_DrawBoxRaised
DYNAMIC wvt_DrawBoxRecessed
DYNAMIC wvt_DrawButton
DYNAMIC wvt_DrawColorRect
DYNAMIC wvt_DrawEllipse
DYNAMIC wvt_DrawFocusRect
DYNAMIC wvt_DrawGridHorz
DYNAMIC wvt_DrawGridVert
DYNAMIC wvt_DrawImage
DYNAMIC wvt_DrawLabel
DYNAMIC wvt_DrawLabelEx
DYNAMIC wvt_DrawLabelObj
DYNAMIC wvt_DrawLine
DYNAMIC wvt_DrawLineEx
DYNAMIC wvt_DrawMenuBar
DYNAMIC wvt_DrawOutline
DYNAMIC wvt_DrawOutlineEx
DYNAMIC wvt_DrawPicture
DYNAMIC wvt_DrawPictureEx
DYNAMIC wvt_DrawProgressBar
DYNAMIC wvt_DrawRectangle
DYNAMIC wvt_DrawRoundRect
DYNAMIC wvt_DrawScrollButton
DYNAMIC wvt_DrawScrollThumbHorz
DYNAMIC wvt_DrawScrollThumbVert
DYNAMIC wvt_DrawShadedRect
DYNAMIC wvt_DrawStatusBar
DYNAMIC wvt_DrawTextBox
DYNAMIC wvt_DrawToolButtonState
DYNAMIC wvt_EnableMenuItem
DYNAMIC wvt_EnableShortcuts
DYNAMIC wvt_GetClipboard
DYNAMIC wvt_GetCursorPos
DYNAMIC wvt_GetFontHandle
DYNAMIC wvt_GetFontInfo
DYNAMIC wvt_GetLastMenuEvent
DYNAMIC wvt_GetMenu
DYNAMIC wvt_GetOpenFileName
DYNAMIC wvt_GetPaintRect
DYNAMIC wvt_GetPalette
DYNAMIC wvt_GetRGBColor
DYNAMIC wvt_GetRGBColorByString
DYNAMIC wvt_GetSaveFileName
DYNAMIC wvt_GetScreenHeight
DYNAMIC wvt_GetScreenWidth
DYNAMIC wvt_GetTitle
DYNAMIC wvt_GetToolTipBkColor
DYNAMIC wvt_GetToolTipTextColor
DYNAMIC wvt_GetToolTipWidth
DYNAMIC wvt_GetWindowHandle
DYNAMIC wvt_GetXYFromRowCol
DYNAMIC wvt_Hide
DYNAMIC wvt_InvalidateRect
DYNAMIC wvt_IsLButtonPressed
DYNAMIC wvt_Keyboard
DYNAMIC wvt_KillTimer
DYNAMIC wvt_LBAddString
DYNAMIC wvt_LBDeleteString
DYNAMIC wvt_LBGetCount
DYNAMIC wvt_LBSetCurSel
DYNAMIC wvt_LoadFont
DYNAMIC wvt_LoadPen
DYNAMIC wvt_LoadPicture
DYNAMIC wvt_LOADPICTUREEX
DYNAMIC wvt_LoadPictureFromResource
DYNAMIC wvt_LoadPictureFromResourceEx
DYNAMIC wvt_MakeDlgTemplate
DYNAMIC wvt_Maximize
DYNAMIC wvt_MessageBox
DYNAMIC wvt_Minimize
DYNAMIC wvt_PasteFromClipboard
DYNAMIC wvt_ProcessMessages
DYNAMIC wvt_ResetWindow
DYNAMIC wvt_RestScreen
DYNAMIC wvt_SaveScreen
DYNAMIC wvt_SetAltF4Close
DYNAMIC wvt_SetAsNormal
DYNAMIC wvt_SetBrush
DYNAMIC wvt_SetClipboard
DYNAMIC wvt_SetCodepage
DYNAMIC wvt_SetDlgCoMode
DYNAMIC wvt_SetFont
DYNAMIC wvt_SetGUI
DYNAMIC wvt_SetIcon
DYNAMIC wvt_SetLastMenuEvent
DYNAMIC wvt_SetMenu
DYNAMIC wvt_SetMenuKeyEvent
DYNAMIC wvt_SetMouseMove
DYNAMIC wvt_SetMousePos
DYNAMIC wvt_SetOnTop
DYNAMIC wvt_SetPalette
DYNAMIC wvt_SetPen
DYNAMIC wvt_SetPointer
DYNAMIC wvt_SetPopupMenu
DYNAMIC wvt_SetTimer
DYNAMIC wvt_SetTitle
DYNAMIC wvt_SetToolTip
DYNAMIC wvt_SetToolTipActive
DYNAMIC wvt_SetToolTipBkColor
DYNAMIC wvt_SetToolTipMargin
DYNAMIC wvt_SetToolTipText
DYNAMIC wvt_SetToolTipTextColor
DYNAMIC wvt_SetToolTipTitle
DYNAMIC wvt_SetToolTipWidth
DYNAMIC wvt_SetWindowPos
DYNAMIC wvt_Show
DYNAMIC wvt_ShowWindow
DYNAMIC wvt_TrackPopupMenu
DYNAMIC wvt_Update
DYNAMIC wvt_Utils
DYNAMIC wvt_WindowCentre
DYNAMIC wvt__MakeDlgTemplate
#if defined( __HBEXTREQ__ ) .OR. defined( __HBEXTERN__GTWVG__REQUEST )
#uncommand DYNAMIC <fncs,...> => EXTERNAL <fncs>

View File

@@ -84,8 +84,8 @@
static int s_GtId;
static HB_GT_FUNCS SuperTable;
#define HB_GTSUPER ( &SuperTable )
#define HB_GTID_PTR ( &s_GtId )
#define HB_GTSUPER ( &SuperTable )
#define HB_GTID_PTR ( &s_GtId )
#define HB_GTWVT_GET( p ) ( ( PHB_GTWVT ) HB_GTLOCAL( p ) )
@@ -96,14 +96,14 @@ static HB_CRITICAL_NEW( s_wvtMtx );
#if ( ( defined( _MSC_VER ) && ( _MSC_VER <= 1200 || defined( HB_OS_WIN_CE ) ) ) || \
defined( __DMC__ ) ) && ! defined( HB_ARCH_64BIT )
#ifndef GetWindowLongPtr
#define GetWindowLongPtr GetWindowLong
#define GetWindowLongPtr GetWindowLong
#endif
#ifndef SetWindowLongPtr
#define SetWindowLongPtr SetWindowLong
#define SetWindowLongPtr SetWindowLong
#endif
#define HB_GTWVT_LONG_PTR LONG
#define HB_GTWVT_LONG_PTR LONG
#else
#define HB_GTWVT_LONG_PTR LONG_PTR
#define HB_GTWVT_LONG_PTR LONG_PTR
#endif
#ifndef WS_OVERLAPPEDWINDOW
@@ -114,13 +114,14 @@ static HB_CRITICAL_NEW( s_wvtMtx );
#define _WVT_WS_NORESIZE ( WS_OVERLAPPEDWINDOW & ~( WS_THICKFRAME ) )
#define _WVT_WS_MAXED ( WS_OVERLAPPEDWINDOW & ~( WS_MAXIMIZEBOX ) )
static PHB_GTWVT s_wvtWindows[ WVT_MAX_WINDOWS ];
static int s_wvtCount = 0;
static PHB_GTWVT s_wvtWindows[ WVT_MAX_WINDOWS ];
static int s_wvtCount = 0;
static PHB_GUIDATA s_guiData;
static const TCHAR s_szClassName[] = TEXT( "Harbour_WVG_Class" );
static const int K_Ctrl[] =
static const int s_K_Ctrl[] =
{
K_CTRL_A, K_CTRL_B, K_CTRL_C, K_CTRL_D, K_CTRL_E, K_CTRL_F, K_CTRL_G,
K_CTRL_H, K_CTRL_I, K_CTRL_J, K_CTRL_K, K_CTRL_L, K_CTRL_M, K_CTRL_N,
@@ -128,7 +129,7 @@ static const int K_Ctrl[] =
K_CTRL_V, K_CTRL_W, K_CTRL_X, K_CTRL_Y, K_CTRL_Z
};
static HB_BOOL b_MouseEnable = HB_TRUE;
static HB_BOOL s_fMouseEnable = HB_TRUE;
static void hb_wvt_gtInitGui( PHB_GTWVT pWVT );
static void hb_wvt_gtExitGui( PHB_GTWVT pWVT );
@@ -150,20 +151,20 @@ static void hb_gt_wvt_RegisterClass( HINSTANCE hInstance )
memset( &wndclass, 0, sizeof( wndclass ) );
wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
wndclass.lpfnWndProc = hb_gt_wvt_WndProc;
/* wndclass.cbClsExtra = 0; */
/* wndclass.cbWndExtra = 0; */
wndclass.hInstance = hInstance;
/* wndclass.hIcon = NULL; */
wndclass.hCursor = LoadCursor( NULL, IDC_ARROW );
/* wndclass.hbrBackground = NULL; */
/* wndclass.lpszMenuName = NULL; */
#if 0
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hIcon = NULL;
wndclass.hbrBackground = NULL; /* ( HBRUSH ) ( COLOR_BTNFACE + 1 ); */
wndclass.lpszMenuName = NULL;
#endif
wndclass.lpszClassName = s_szClassName;
if( ! RegisterClass( &wndclass ) )
{
if( GetLastError() != 1410 )
hb_errInternal( 10001, "Failed to register WVG window class", NULL, NULL );
}
if( ! RegisterClass( &wndclass ) &&
GetLastError() != ERROR_CLASS_ALREADY_EXISTS )
hb_errInternal( 10001, "Failed to register WVG window class", NULL, NULL );
}
static PHB_GTWVT hb_gt_wvt_Find( HWND hWnd )
@@ -230,7 +231,9 @@ static void hb_gt_wvt_Free( PHB_GTWVT pWVT )
int iIndex;
HB_WVT_LOCK();
s_wvtWindows[ pWVT->iHandle ] = NULL;
if( --s_wvtCount == 0 )
{
hb_wvt_gtReleaseGuiData();
@@ -385,10 +388,10 @@ static PHB_GTWVT hb_gt_wvt_New( PHB_GT pGT, HINSTANCE hInstance, int iCmdShow )
pWVT->keyPointerOut = 0;
pWVT->keyLast = 0;
pWVT->CentreWindow = HB_TRUE; /* Default is to always display window in centre of screen */
pWVT->CodePage = OEM_CHARSET; /* GetACP(); - set code page to default system */
pWVT->CentreWindow = HB_TRUE; /* Default is to always display window in centre of screen */
pWVT->CodePage = OEM_CHARSET; /* GetACP(); - set code page to default system */
#if ! defined( UNICODE )
pWVT->boxCodePage = OEM_CHARSET; /* GetACP(); - set code page to default system */
pWVT->boxCodePage = OEM_CHARSET; /* GetACP(); - set code page to default system */
#endif
pWVT->Win9X = hb_iswin9x();
@@ -416,7 +419,6 @@ static PHB_GTWVT hb_gt_wvt_New( PHB_GT pGT, HINSTANCE hInstance, int iCmdShow )
{
PHB_ITEM pItem = hb_itemPutCPtr( NULL, hb_cmdargBaseProgName() );
pWVT->lpWindowTitle = HB_ITEMGETSTR( pItem, &pWVT->hWindowTitle, NULL );
hb_itemRelease( pItem );
}
@@ -472,6 +474,7 @@ static int hb_gt_wvt_FireEvent( PHB_GTWVT pWVT, int nEvent, PHB_ITEM pParams )
nResult = hb_itemGetNI( hb_vmEvalBlockV( pWVT->pNotifierGUI, 2, pEvent, pParams ) );
hb_itemRelease( pEvent );
hb_vmRequestRestore();
}
}
@@ -590,7 +593,7 @@ static void hb_gt_wvt_UpdateCaret( PHB_GTWVT pWVT )
{
pWVT->CaretSize = iCaretSize;
pWVT->CaretWidth = pWVT->PTEXTSIZE.x;
pWVT->CaretExist = CreateCaret( pWVT->hWnd, ( HBITMAP ) NULL, pWVT->PTEXTSIZE.x,
pWVT->CaretExist = CreateCaret( pWVT->hWnd, NULL, pWVT->PTEXTSIZE.x,
pWVT->CaretSize < 0 ? -pWVT->CaretSize : pWVT->CaretSize );
}
if( pWVT->CaretExist )
@@ -606,7 +609,7 @@ static void hb_gt_wvt_UpdateCaret( PHB_GTWVT pWVT )
if( ! bShow )
{
DestroyCaret();
pWVT->CaretExist = CreateCaret( pWVT->hWnd, ( HBITMAP ) NULL, pWVT->PTEXTSIZE.x,
pWVT->CaretExist = CreateCaret( pWVT->hWnd, NULL, pWVT->PTEXTSIZE.x,
pWVT->CaretSize < 0 ? - pWVT->CaretSize : pWVT->CaretSize );
SetCaretPos( xy.x, pWVT->CaretSize < 0 ?
xy.y : xy.y + pWVT->PTEXTSIZE.y - pWVT->CaretSize );
@@ -626,7 +629,7 @@ static void hb_gt_wvt_KillCaret( PHB_GTWVT pWVT )
}
}
/* functions for handling the input queues for the mouse and keyboard */
/* Functions for handling the input queues for the mouse and keyboard */
static void hb_gt_wvt_AddCharToInputQueue( PHB_GTWVT pWVT, int iKey )
{
int iPos = pWVT->keyPointerIn;
@@ -672,9 +675,7 @@ static HB_BOOL hb_gt_wvt_GetCharFromInputQueue( PHB_GTWVT pWVT, int * iKey )
{
*iKey = pWVT->Keys[ pWVT->keyPointerOut ];
if( ++pWVT->keyPointerOut >= WVT_CHAR_QUEUE_SIZE )
{
pWVT->keyPointerOut = 0;
}
return HB_TRUE;
}
@@ -724,7 +725,6 @@ static int hb_gt_wvt_key_ansi_to_oem( int c )
}
#endif
static void hb_gt_wvt_SetCloseButton( PHB_GTWVT pWVT )
{
HMENU hSysMenu = GetSystemMenu( pWVT->hWnd, FALSE );
@@ -1037,7 +1037,7 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT )
hdc = GetDC( pWVT->hWnd );
hOldFont = ( HFONT ) SelectObject( hdc, hFont );
GetTextMetrics( hdc, &tm );
SetTextCharacterExtra( hdc, 0 ); /* do not add extra char spacing even if bold */
SetTextCharacterExtra( hdc, 0 ); /* Do not add extra char spacing even if bold */
SelectObject( hdc, hOldFont );
ReleaseDC( pWVT->hWnd, hdc );
@@ -1047,9 +1047,9 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT )
*/
pWVT->PTEXTSIZE.x = pWVT->fontWidth < 0 ? -pWVT->fontWidth :
tm.tmAveCharWidth; /* For fixed FONT should == tm.tmMaxCharWidth */
pWVT->PTEXTSIZE.y = tm.tmHeight; /* but seems to be a problem on Win9X so */
/* assume proportional fonts always for Win9X */
tm.tmAveCharWidth; /* For fixed FONT should == tm.tmMaxCharWidth */
pWVT->PTEXTSIZE.y = tm.tmHeight; /* but seems to be a problem on Win9X so */
/* assume proportional fonts always for Win9X */
#if defined( HB_OS_WIN_CE )
pWVT->FixedFont = HB_FALSE;
#else
@@ -1063,7 +1063,7 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT )
for( n = 0; n < pWVT->COLS; n++ )
pWVT->FixedSize[ n ] = pWVT->PTEXTSIZE.x;
/* resize the window to get the specified number of rows and columns */
/* Resize the window to get the specified number of rows and columns */
GetWindowRect( pWVT->hWnd, &wi );
GetClientRect( pWVT->hWnd, &ci );
@@ -1086,7 +1086,7 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT )
pWVT->bMaximized = HB_TRUE;
hb_gt_wvt_FitSizeRows( pWVT );
/* resize the window to get the specified number of rows and columns */
/* Resize the window to get the specified number of rows and columns */
GetWindowRect( pWVT->hWnd, &wi );
GetClientRect( pWVT->hWnd, &ci );
@@ -1180,9 +1180,9 @@ static RECT hb_gt_wvt_GetColRowFromXYRect( PHB_GTWVT pWVT, RECT xy )
colrow.left = xy.left / pWVT->PTEXTSIZE.x;
colrow.top = xy.top / pWVT->PTEXTSIZE.y;
colrow.right = xy.right / pWVT->PTEXTSIZE.x -
( ( xy.right % pWVT->PTEXTSIZE.x ) ? 0 : 1 ); /* Adjust for when rectangle */
( ( xy.right % pWVT->PTEXTSIZE.x ) ? 0 : 1 ); /* Adjust for when rectangle */
colrow.bottom = xy.bottom / pWVT->PTEXTSIZE.y -
( ( xy.bottom % pWVT->PTEXTSIZE.y ) ? 0 : 1 ); /* EXACTLY overlaps characters */
( ( xy.bottom % pWVT->PTEXTSIZE.y ) ? 0 : 1 ); /* EXACTLY overlaps characters */
return colrow;
}
@@ -1501,42 +1501,42 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam,
break;
case VK_F1:
hb_gt_wvt_TranslateKey( pWVT, K_F1 , K_SH_F1, K_ALT_F1 , K_CTRL_F1 );
hb_gt_wvt_TranslateKey( pWVT, K_F1 , K_SH_F1, K_ALT_F1 , K_CTRL_F1 );
break;
case VK_F2:
hb_gt_wvt_TranslateKey( pWVT, K_F2 , K_SH_F2, K_ALT_F2 , K_CTRL_F2 );
hb_gt_wvt_TranslateKey( pWVT, K_F2 , K_SH_F2, K_ALT_F2 , K_CTRL_F2 );
break;
case VK_F3:
hb_gt_wvt_TranslateKey( pWVT, K_F3 , K_SH_F3, K_ALT_F3 , K_CTRL_F3 );
hb_gt_wvt_TranslateKey( pWVT, K_F3 , K_SH_F3, K_ALT_F3 , K_CTRL_F3 );
break;
case VK_F4:
if( pWVT->AltF4Close && bAlt )
return DefWindowProc( pWVT->hWnd, message, wParam, lParam ) != 0;
hb_gt_wvt_TranslateKey( pWVT, K_F4 , K_SH_F4, K_ALT_F4 , K_CTRL_F4 );
hb_gt_wvt_TranslateKey( pWVT, K_F4 , K_SH_F4, K_ALT_F4 , K_CTRL_F4 );
break;
case VK_F5:
hb_gt_wvt_TranslateKey( pWVT, K_F5 , K_SH_F5, K_ALT_F5 , K_CTRL_F5 );
hb_gt_wvt_TranslateKey( pWVT, K_F5 , K_SH_F5, K_ALT_F5 , K_CTRL_F5 );
break;
case VK_F6:
hb_gt_wvt_TranslateKey( pWVT, K_F6 , K_SH_F6, K_ALT_F6 , K_CTRL_F6 );
hb_gt_wvt_TranslateKey( pWVT, K_F6 , K_SH_F6, K_ALT_F6 , K_CTRL_F6 );
break;
case VK_F7:
hb_gt_wvt_TranslateKey( pWVT, K_F7 , K_SH_F7, K_ALT_F7 , K_CTRL_F7 );
hb_gt_wvt_TranslateKey( pWVT, K_F7 , K_SH_F7, K_ALT_F7 , K_CTRL_F7 );
break;
case VK_F8:
hb_gt_wvt_TranslateKey( pWVT, K_F8 , K_SH_F8, K_ALT_F8 , K_CTRL_F8 );
hb_gt_wvt_TranslateKey( pWVT, K_F8 , K_SH_F8, K_ALT_F8 , K_CTRL_F8 );
break;
case VK_F9:
hb_gt_wvt_TranslateKey( pWVT, K_F9 , K_SH_F9, K_ALT_F9 , K_CTRL_F9 );
hb_gt_wvt_TranslateKey( pWVT, K_F9 , K_SH_F9, K_ALT_F9 , K_CTRL_F9 );
break;
case VK_F10:
hb_gt_wvt_TranslateKey( pWVT, K_F10 , K_SH_F10,K_ALT_F10 , K_CTRL_F10 );
hb_gt_wvt_TranslateKey( pWVT, K_F10 , K_SH_F10,K_ALT_F10 , K_CTRL_F10 );
break;
case VK_F11:
hb_gt_wvt_TranslateKey( pWVT, K_F11 , K_SH_F11,K_ALT_F11 , K_CTRL_F11 );
hb_gt_wvt_TranslateKey( pWVT, K_F11 , K_SH_F11,K_ALT_F11 , K_CTRL_F11 );
break;
case VK_F12:
hb_gt_wvt_TranslateKey( pWVT, K_F12 , K_SH_F12,K_ALT_F12 , K_CTRL_F12 );
hb_gt_wvt_TranslateKey( pWVT, K_F12 , K_SH_F12,K_ALT_F12 , K_CTRL_F12 );
break;
default:
{
@@ -1544,19 +1544,19 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam,
HB_BOOL bShift = GetKeyState( VK_SHIFT ) & 0x8000;
int iScanCode = HIWORD( lParam ) & 0xFF;
if( bCtrl && iScanCode == 76 ) /* CTRL_VK_NUMPAD5 */
if( bCtrl && iScanCode == 76 ) /* CTRL_VK_NUMPAD5 */
hb_gt_wvt_AddCharToInputQueue( pWVT, KP_CTRL_5 );
else if( bCtrl && wParam == VK_TAB ) /* K_CTRL_TAB */
else if( bCtrl && wParam == VK_TAB ) /* K_CTRL_TAB */
hb_gt_wvt_AddCharToInputQueue( pWVT, bShift ? K_CTRL_SH_TAB : K_CTRL_TAB );
else if( iScanCode == 70 ) /* Ctrl_Break key OR Scroll Lock Key */
else if( iScanCode == 70 ) /* Ctrl_Break key OR Scroll Lock Key */
{
if( bCtrl ) /* Not scroll lock */
if( bCtrl ) /* Not scroll lock */
{
hb_gt_wvt_AddCharToInputQueue( pWVT, HB_BREAK_FLAG ); /* Pretend Alt+C pressed */
hb_gt_wvt_AddCharToInputQueue( pWVT, HB_BREAK_FLAG ); /* Pretend Alt+C pressed */
pWVT->IgnoreWM_SYSCHAR = HB_TRUE;
}
else
DefWindowProc( pWVT->hWnd, message, wParam, lParam ); /* Let windows handle ScrollLock */
DefWindowProc( pWVT->hWnd, message, wParam, lParam ); /* Let windows handle ScrollLock */
}
else if( bCtrl && iScanCode == 53 && bShift )
hb_gt_wvt_AddCharToInputQueue( pWVT, K_CTRL_QUESTION );
@@ -1592,21 +1592,21 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam,
case WM_CHAR:
{
HB_BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000;
int iScanCode = HIWORD( lParam ) & 0xFF;
int c = ( int ) wParam;
HB_BOOL bCtrl = GetKeyState( VK_CONTROL ) & 0x8000;
int iScanCode = HIWORD( lParam ) & 0xFF;
int c = ( int ) wParam;
if( ! pWVT->IgnoreWM_SYSCHAR )
{
if( bCtrl && iScanCode == 28 ) /* K_CTRL_RETURN */
hb_gt_wvt_AddCharToInputQueue( pWVT, K_CTRL_RETURN );
else if( bCtrl && c >= 1 && c <= 26 ) /* K_CTRL_A - K_CTRL_Z */
hb_gt_wvt_AddCharToInputQueue( pWVT, K_Ctrl[ c - 1 ] );
hb_gt_wvt_AddCharToInputQueue( pWVT, s_K_Ctrl[ c - 1 ] );
else
{
switch( c )
{
/* handle special characters */
/* Handle special characters */
case VK_BACK:
hb_gt_wvt_TranslateKey( pWVT, K_BS, K_SH_BS, K_ALT_BS, K_CTRL_BS );
break;
@@ -1637,7 +1637,7 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam,
}
}
}
pWVT->IgnoreWM_SYSCHAR = HB_FALSE; /* As Suggested by Peter */
pWVT->IgnoreWM_SYSCHAR = HB_FALSE; /* As Suggested by Peter */
break;
}
@@ -1996,15 +1996,11 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
if( ! pWVT->bDeferPaint )
{
if( pWVT->bResizing )
{
return DefWindowProc( hWnd, message, wParam, lParam );
}
else
{
if( GetUpdateRect( hWnd, &updateRect, FALSE ) )
{
hb_gt_wvt_PaintText( pWVT, updateRect );
}
}
}
else
@@ -2129,14 +2125,13 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
case WM_RBUTTONDBLCLK:
case WM_LBUTTONDBLCLK:
case WM_MBUTTONDBLCLK:
case WM_MOUSEMOVE:
case WM_MOUSEWHEEL:
case WM_NCMOUSEMOVE:
hb_gt_wvt_MouseEvent( pWVT, message, wParam, lParam );
return 0;
case WM_QUERYENDSESSION: /* Closing down computer */
case WM_QUERYENDSESSION: /* Closing down computer */
hb_vmRequestQuit();
return 0;
@@ -2154,9 +2149,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
}
}
else
{
hb_gt_wvt_AddCharToInputQueue( pWVT, HB_K_CLOSE );
}
return 0;
case WM_QUIT:
@@ -2198,9 +2191,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
#if ! defined( HB_OS_WIN_CE )
case WM_NCLBUTTONDBLCLK:
if( ! pWVT->bMaximized )
{
hb_gt_wvt_Maximize( pWVT );
}
return 0;
#endif
@@ -2248,9 +2239,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
if( ( HIWORD( wParam ) == 0 && ! IsWindow( ( HWND ) lParam ) ) )
{
if( pWVT->pPP->iWndType == HB_WNDTYPE_CRT )
{
hb_wvt_gtHandleMenuSelection( pWVT, ( int ) LOWORD( wParam ) );
}
hb_gt_wvt_FireMenuEvent( pWVT, 0, ( int ) LOWORD( wParam ) );
}
else
@@ -2405,11 +2394,11 @@ static HB_BOOL hb_gt_wvt_ValidWindowSize( HWND hWnd, int rows, int cols, HFONT h
hdc = GetDC( hWnd );
hOldFont = ( HFONT ) SelectObject( hdc, hFont );
GetTextMetrics( hdc, &tm );
SelectObject( hdc, hOldFont ); /* Put old font back */
SelectObject( hdc, hOldFont ); /* Put old font back */
ReleaseDC( hWnd, hdc );
width = ( int ) ( ( iWidth < 0 ? -iWidth : tm.tmAveCharWidth ) * cols ); /* Total pixel width this setting would take */
height = ( int ) ( tm.tmHeight * rows ); /* Total pixel height this setting would take */
height = ( int ) ( tm.tmHeight * rows ); /* Total pixel height this setting would take */
return ( width <= maxWidth ) && ( height <= maxHeight );
}
@@ -2446,7 +2435,7 @@ static void hb_gt_wvt_GetBorders( HWND hWnd, int * iBorderLeft, int * iTitlebarH
i = ( wi.right - wi.left - ( ci.right - ci.left ) ) / 2;
*iBorderLeft = i;
*iTitlebarHeight = ( ( wi.bottom - wi.top - ( ci.bottom - ci.top ) ) - i );
*iTitlebarHeight = ( wi.bottom - wi.top - ( ci.bottom - ci.top ) ) - i;
GetWindowRect( GetDesktopWindow(), &wi );
*iDTWidth = wi.right - wi.left;
@@ -2460,6 +2449,7 @@ static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT, HB_BOOL bResizable )
bByConf = HB_FALSE;
hWndParent = NULL;
if( pWVT->pPP->bConfigured )
{
PHB_GT pGTp = NULL;
@@ -2470,11 +2460,12 @@ static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT, HB_BOOL bResizable )
if( pGTp )
{
PHB_GTWVT pWVTp = HB_GTWVT_GET( pGTp );
if( pWVTp )
{
hWndParent = pWVTp->hWnd;
}
hb_gt_BaseFree( pGTp );
if( hWndParent )
{
RECT rc;
@@ -2593,18 +2584,18 @@ static HWND hb_gt_wvt_CreateWindow( PHB_GTWVT pWVT, HB_BOOL bResizable )
pWVT->pPP->style = ( pWVT->pPP->style & ~( WS_THICKFRAME | WS_MAXIMIZEBOX ) ) | WS_BORDER;
hWnd = CreateWindowEx(
pWVT->pPP->exStyle, /* extended style */
s_szClassName, /* classname */
pWVT->lpWindowTitle, /* window name */
pWVT->pPP->style, /* style */
pWVT->pPP->x, /* x */
pWVT->pPP->y, /* y */
pWVT->pPP->width, /* width */
pWVT->pPP->height, /* height */
hWndParent, /* window parent */
NULL, /* menu */
pWVT->hInstance, /* instance */
( LPVOID ) pWVT ); /* lpParam */
pWVT->pPP->exStyle, /* extended style */
s_szClassName, /* classname */
pWVT->lpWindowTitle, /* window name */
pWVT->pPP->style, /* style */
pWVT->pPP->x, /* x */
pWVT->pPP->y, /* y */
pWVT->pPP->width, /* width */
pWVT->pPP->height, /* height */
hWndParent, /* window parent */
NULL, /* menu */
pWVT->hInstance, /* instance */
( LPVOID ) pWVT ); /* lpParam */
return hWnd;
}
@@ -2652,8 +2643,8 @@ static HB_BOOL hb_gt_wvt_CreateConsoleWindow( PHB_GTWVT pWVT )
pWVT->hdc = GetDC( pWVT->hWnd );
hb_wvt_gtInitGui( pWVT );
if( b_MouseEnable )
hb_wvt_gtCreateToolTipWindow( pWVT );
if( s_fMouseEnable )
hb_wvt_gtCreateToolTipWindow( pWVT );
}
}
return HB_TRUE;
@@ -2782,7 +2773,7 @@ static void hb_gt_wvt_Exit( PHB_GT pGT )
{
PHB_GTWVT pWVT;
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_Exit(%p)", pGT ) );
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_Exit(%p)", ( void * ) pGT ) );
pWVT = HB_GTWVT_GET( pGT );
if( pWVT && pWVT->hWnd )
@@ -2799,9 +2790,8 @@ static void hb_gt_wvt_Exit( PHB_GT pGT )
if( pWVT )
{
if( pWVT->hWnd )
{
hb_wvt_gtExitGui( pWVT );
}
hb_gt_wvt_Free( pWVT );
}
}
@@ -2819,7 +2809,7 @@ static HB_BOOL hb_gt_wvt_SetMode( PHB_GT pGT, int iRow, int iCol )
if( iRow <= WVT_MAX_ROWS && iCol <= WVT_MAX_COLS )
{
if( pWVT->hWnd ) /* Is the window already open */
if( pWVT->hWnd ) /* Is the window already open? */
{
HFONT hFont = hb_gt_wvt_GetFont( pWVT->fontFace, pWVT->fontHeight, pWVT->fontWidth,
pWVT->fontWeight, pWVT->fontQuality, pWVT->CodePage );
@@ -2827,13 +2817,12 @@ static HB_BOOL hb_gt_wvt_SetMode( PHB_GT pGT, int iRow, int iCol )
if( hFont )
{
/*
* make sure that the mode selected along with the current
* Make sure that the mode selected along with the current
* font settings will fit in the window
*/
if( hb_gt_wvt_ValidWindowSize( pWVT->hWnd, iRow, iCol, hFont, pWVT->fontWidth ) )
{
fResult = hb_gt_wvt_InitWindow( pWVT, iRow, iCol );
}
DeleteObject( hFont );
HB_GTSELF_REFRESH( pGT );
}
@@ -2853,11 +2842,9 @@ static HB_BOOL hb_gt_wvt_SetMode( PHB_GT pGT, int iRow, int iCol )
static HB_BOOL hb_gt_wvt_PutChar( PHB_GT pGT, int iRow, int iCol,
int iColor, HB_BYTE bAttr, HB_USHORT usChar )
{
PHB_GTWVT pWVT;
if( HB_GTSUPER_PUTCHAR( pGT, iRow, iCol, iColor, bAttr, usChar ) )
{
pWVT = HB_GTWVT_GET( pGT );
PHB_GTWVT pWVT = HB_GTWVT_GET( pGT );
if( pWVT->bGui )
HB_GTSELF_TOUCHCELL( pGT, iRow, iCol );
else
@@ -2893,11 +2880,11 @@ static int hb_gt_wvt_ReadKey( PHB_GT pGT, int iEventMask )
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_ReadKey(%p,%d)", ( void * ) pGT, iEventMask ) );
HB_SYMBOL_UNUSED( iEventMask ); /* we ignore the event mask! */
HB_SYMBOL_UNUSED( iEventMask ); /* we ignore the event mask! */
pWVT = HB_GTWVT_GET( pGT );
if( pWVT->hWnd ) /* Is the window already open */
if( pWVT->hWnd ) /* Is the window already open? */
hb_gt_wvt_ProcessMessages( pWVT );
fKey = hb_gt_wvt_GetCharFromInputQueue( pWVT, &c );
@@ -3075,6 +3062,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
case HB_GTI_FONTSIZE:
pInfo->pResult = hb_itemPutNI( pInfo->pResult, pWVT->PTEXTSIZE.y );
iVal = hb_itemGetNI( pInfo->pNewVal );
if( iVal > 0 )
{
@@ -3112,7 +3100,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
case HB_GTI_FONTWIDTH:
pInfo->pResult = hb_itemPutNI( pInfo->pResult, pWVT->fontWidth );
if( hb_itemType( pInfo->pNewVal ) & HB_IT_NUMERIC )
pWVT->fontWidth = hb_itemGetNI( pInfo->pNewVal );
pWVT->fontWidth = hb_itemGetNI( pInfo->pNewVal );
break;
@@ -3128,14 +3116,14 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
case HB_GTI_FONTWEIGHT:
pInfo->pResult = hb_itemPutNI( pInfo->pResult, pWVT->fontWeight );
if( hb_itemType( pInfo->pNewVal ) & HB_IT_NUMERIC )
pWVT->fontWeight = hb_itemGetNI( pInfo->pNewVal );
pWVT->fontWeight = hb_itemGetNI( pInfo->pNewVal );
break;
case HB_GTI_FONTQUALITY:
pInfo->pResult = hb_itemPutNI( pInfo->pResult, pWVT->fontQuality );
if( hb_itemType( pInfo->pNewVal ) & HB_IT_NUMERIC )
pWVT->fontQuality = hb_itemGetNI( pInfo->pNewVal );
pWVT->fontQuality = hb_itemGetNI( pInfo->pNewVal );
break;
@@ -3155,7 +3143,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
GetWindowRect( pWVT->hWnd, &wi );
iVal += wi.bottom - wi.top - ci.bottom;
SetWindowPos( pWVT->hWnd, NULL, wi.left, wi.top, wi.right - wi.left, iVal, SWP_NOZORDER );
hb_gt_wvt_FitSizeRows( pWVT ); /* Needed because GTWVG does not adjust to resize until WM_EXITSIZEMOVE is received */
hb_gt_wvt_FitSizeRows( pWVT ); /* Needed because GTWVG does not adjust to resize until WM_EXITSIZEMOVE is received */
}
}
break;
@@ -3176,7 +3164,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
GetWindowRect( pWVT->hWnd, &wi );
iVal += wi.right - wi.left - ci.right;
SetWindowPos( pWVT->hWnd, NULL, wi.left, wi.top, iVal, wi.bottom - wi.top, SWP_NOZORDER );
hb_gt_wvt_FitSizeRows( pWVT ); /* Needed because GTWVG does not adjust to resize until WM_EXITSIZEMOVE is received */
hb_gt_wvt_FitSizeRows( pWVT ); /* Needed because GTWVG does not adjust to resize until WM_EXITSIZEMOVE is received */
}
}
break;
@@ -3298,9 +3286,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
if( iVal != pWVT->boxCodePage )
{
if( ! pWVT->hWnd )
{
pWVT->boxCodePage = iVal;
}
else if( iVal == pWVT->CodePage )
{
if( pWVT->hFontBox != pWVT->hFont )
@@ -3329,7 +3315,6 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
#endif
case HB_GTI_ICONFILE:
if( hb_itemType( pInfo->pNewVal ) & HB_IT_STRING )
{
HICON hIconToFree = pWVT->bIconToFree ? pWVT->hIcon : NULL;
@@ -3342,8 +3327,8 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
hb_strfree( hImageName );
if( pWVT->hWnd )
{
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_SMALL, ( LPARAM ) pWVT->hIcon ); /* Set Title Bar Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_BIG , ( LPARAM ) pWVT->hIcon ); /* Set Task List Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_SMALL, ( LPARAM ) pWVT->hIcon ); /* Set Title Bar Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_BIG , ( LPARAM ) pWVT->hIcon ); /* Set Task List Icon */
}
if( hIconToFree )
@@ -3353,20 +3338,19 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
break;
case HB_GTI_ICONRES:
if( hb_itemType( pInfo->pNewVal ) & HB_IT_STRING )
{
HICON hIconToFree = pWVT->bIconToFree ? pWVT->hIcon : NULL;
void * hText;
void * hIconName;
pWVT->bIconToFree = HB_FALSE;
pWVT->hIcon = LoadIcon( pWVT->hInstance,
HB_ITEMGETSTR( pInfo->pNewVal, &hText, NULL ) );
hb_strfree( hText );
HB_ITEMGETSTR( pInfo->pNewVal, &hIconName, NULL ) );
hb_strfree( hIconName );
if( pWVT->hWnd )
{
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_SMALL, ( LPARAM ) pWVT->hIcon ); /* Set Title Bar Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_BIG , ( LPARAM ) pWVT->hIcon ); /* Set Task List Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_SMALL, ( LPARAM ) pWVT->hIcon ); /* Set Title Bar Icon */
SendNotifyMessage( pWVT->hWnd, WM_SETICON, ICON_BIG , ( LPARAM ) pWVT->hIcon ); /* Set Task List Icon */
}
if( hIconToFree )
@@ -3690,8 +3674,8 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
if( iType == HB_GTI_SETPOS_ROWCOL )
{
hb_arraySetNI( pInfo->pResult, 1, rect.top / pWVT->PTEXTSIZE.y ); /* Will only return approx value */
hb_arraySetNI( pInfo->pResult, 2, rect.left / pWVT->PTEXTSIZE.x ); /* Will only return approx value */
hb_arraySetNI( pInfo->pResult, 1, rect.top / pWVT->PTEXTSIZE.y ); /* Will only return approximate value */
hb_arraySetNI( pInfo->pResult, 2, rect.left / pWVT->PTEXTSIZE.x ); /* Will only return approximate value */
}
else
{
@@ -3700,7 +3684,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
}
if( ( hb_itemType( pInfo->pNewVal ) & HB_IT_NUMERIC ) &&
( hb_itemType( pInfo->pNewVal2 ) & HB_IT_NUMERIC ) )
( hb_itemType( pInfo->pNewVal2 ) & HB_IT_NUMERIC ) )
{
i1 = hb_itemGetNI( pInfo->pNewVal );
i2 = hb_itemGetNI( pInfo->pNewVal2 );
@@ -3737,6 +3721,10 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
}
break;
case HB_GTI_WINHANDLE:
pInfo->pResult = hb_itemPutPtr( pInfo->pResult, pWVT->hWnd );
break;
case HB_GTI_SPEC:
{
int iMessage = hb_itemGetNI( pInfo->pNewVal );
@@ -3748,7 +3736,6 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
break;
case HB_GTS_CENTERWINDOW:
pInfo->pResult = hb_itemPutL( pInfo->pResult, pWVT->CentreWindow );
if( pInfo->pNewVal2 )
{
@@ -3830,19 +3817,19 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
int iIconType = hb_arrayGetNI( pInfo->pNewVal2, 2 );
HICON hIcon = 0;
NOTIFYICONDATA tnid;
void * hText;
void * hIconName;
if( iIconType == 0 )
{
hIcon = ( HICON ) LoadImage( ( HINSTANCE ) NULL,
HB_ARRAYGETSTR( pInfo->pNewVal2, 3, &hText, NULL ),
hIcon = ( HICON ) LoadImage( NULL,
HB_ARRAYGETSTR( pInfo->pNewVal2, 3, &hIconName, NULL ),
IMAGE_ICON, 0, 0, LR_LOADFROMFILE );
hb_strfree( hText );
hb_strfree( hIconName );
}
else if( iIconType == 1 )
{
hIcon = LoadIcon( pWVT->hInstance, HB_ARRAYGETSTR( pInfo->pNewVal2, 3, &hText, NULL ) );
hb_strfree( hText );
hIcon = LoadIcon( pWVT->hInstance, HB_ARRAYGETSTR( pInfo->pNewVal2, 3, &hIconName, NULL ) );
hb_strfree( hIconName );
}
else if( iIconType == 2 )
{
@@ -3857,8 +3844,8 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
tnid.uCallbackMessage = HB_MSG_NOTIFYICON;
tnid.hIcon = hIcon;
HB_STRNCPY( tnid.szTip, HB_ARRAYGETSTR( pInfo->pNewVal2, 4, &hText, NULL ), HB_SIZEOFARRAY( tnid.szTip ) - 1 );
hb_strfree( hText );
HB_STRNCPY( tnid.szTip, HB_ARRAYGETSTR( pInfo->pNewVal2, 4, &hIconName, NULL ), HB_SIZEOFARRAY( tnid.szTip ) - 1 );
hb_strfree( hIconName );
Shell_NotifyIcon( mode, &tnid );
@@ -3870,7 +3857,6 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
break;
case HB_GTS_WNDSTATE:
if( pWVT->hWnd )
{
switch( hb_itemGetNI( pInfo->pNewVal2 ) )
@@ -3925,7 +3911,6 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
break;
case HB_GTS_FACTOR:
if( pWVT->hWnd )
{
#if ( _WIN32_WINNT >= 0x0500 ) && ! defined( HB_OS_WIN_CE )
@@ -3938,7 +3923,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
s_guiData->pfnLayered( pWVT->hWnd,
RGB( 255, 255, 255 ),
( BYTE ) hb_itemGetNI( pInfo->pNewVal2 ),
/*LWA_COLORKEY|*/ LWA_ALPHA );
/* LWA_COLORKEY | */ LWA_ALPHA );
}
#endif
}
@@ -3951,8 +3936,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
{
if( hb_itemType( pInfo->pNewVal ) & HB_IT_ARRAY )
{
HB_SIZE iParam = hb_arrayLen( pInfo->pNewVal );
if( iParam == HB_GTI_PP_SIZE )
if( hb_arrayLen( pInfo->pNewVal ) == HB_GTI_PP_SIZE )
{
PHB_ITEM pSome;
@@ -4057,10 +4041,6 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
pWVT->pNotifierGUI = hb_itemNew( pInfo->pNewVal );
break;
case HB_GTI_WINHANDLE:
pInfo->pResult = hb_itemPutPtr( pInfo->pResult, pWVT->hWnd );
break;
default:
return HB_GTSUPER_INFO( pGT, iType, pInfo );
}
@@ -4461,12 +4441,12 @@ static void hb_wvt_gtCreateObjects( PHB_GTWVT pWVT )
pWVT->InvalidateWindow = HB_TRUE;
pWVT->EnableShortCuts = HB_FALSE;
pWVT->pSymWVT_PAINT = hb_dynsymFind( "WVT_PAINT" );
pWVT->pSymWVT_SETFOCUS = hb_dynsymFind( "WVT_SETFOCUS" );
pWVT->pSymWVT_PAINT = hb_dynsymFind( "WVT_PAINT" );
pWVT->pSymWVT_SETFOCUS = hb_dynsymFind( "WVT_SETFOCUS" );
pWVT->pSymWVT_KILLFOCUS = hb_dynsymFind( "WVT_KILLFOCUS" );
pWVT->pSymWVT_MOUSE = hb_dynsymFind( "WVT_MOUSE" );
pWVT->pSymWVT_TIMER = hb_dynsymFind( "WVT_TIMER" );
pWVT->pSymWVT_KEY = hb_dynsymFind( "WVT_KEY" );
pWVT->pSymWVT_MOUSE = hb_dynsymFind( "WVT_MOUSE" );
pWVT->pSymWVT_TIMER = hb_dynsymFind( "WVT_TIMER" );
pWVT->pSymWVT_KEY = hb_dynsymFind( "WVT_KEY" );
pWVT->rowStart = 0;
pWVT->rowStop = 0;
pWVT->colStart = 0;
@@ -4513,8 +4493,8 @@ static void hb_wvt_gtExitGui( PHB_GTWVT pWVT )
}
}
DeleteObject( ( HPEN ) pWVT->currentPen );
DeleteObject( ( HBRUSH ) pWVT->currentBrush );
DeleteObject( pWVT->currentPen );
DeleteObject( pWVT->currentBrush );
if( pWVT->hdc )
{

View File

@@ -85,37 +85,37 @@ CREATE CLASS WvgHTMLViewer INHERIT WvgActiveXControl
METHOD xDocumentComplete( cURI )
METHOD setHTML( cHTML )
METHOD back() INLINE ::goBack()
METHOD forward() INLINE ::goForward()
METHOD home() INLINE ::goHome()
METHOD search() INLINE ::goSearch()
METHOD isBusy() INLINE ::busy()
METHOD back() INLINE ::goBack()
METHOD forward() INLINE ::goForward()
METHOD home() INLINE ::goHome()
METHOD search() INLINE ::goSearch()
METHOD isBusy() INLINE ::busy()
VAR sl_beforeNavigate PROTECTED
VAR sl_beforeNavigate PROTECTED
ACCESS beforeNavigate INLINE ::sl_beforeNavigate
ASSIGN beforeNavigate( bBlock ) INLINE ::sl_beforeNavigate := bBlock
VAR sl_navigateComplete PROTECTED
VAR sl_navigateComplete PROTECTED
ACCESS navigateComplete INLINE ::sl_navigateComplete
ASSIGN navigateComplete( bBlock ) INLINE ::sl_navigateComplete := bBlock
VAR sl_statusTextChange PROTECTED
VAR sl_statusTextChange PROTECTED
ACCESS statusTextChange INLINE ::sl_statusTextChange
ASSIGN statusTextChange( bBlock ) INLINE ::sl_statusTextChange := bBlock
VAR sl_progressChange PROTECTED
VAR sl_progressChange PROTECTED
ACCESS progressChange INLINE ::sl_progressChange
ASSIGN progressChange( bBlock ) INLINE ::sl_progressChange := bBlock
VAR sl_titleChange PROTECTED
VAR sl_titleChange PROTECTED
ACCESS titleChange INLINE ::sl_titleChange
ASSIGN titleChange( bBlock ) INLINE ::sl_titleChange := bBlock
VAR sl_documentComplete PROTECTED
VAR sl_documentComplete PROTECTED
ACCESS documentComplete INLINE ::sl_documentComplete
ASSIGN documentComplete( bBlock ) INLINE ::sl_documentComplete := bBlock
VAR CLSID INIT "Shell.Explorer" PROTECTED
VAR CLSID PROTECTED INIT "Shell.Explorer"
ENDCLASS
@@ -156,7 +156,7 @@ METHOD WvgHTMLViewer:xBeforeNavigate( cURL, Flags, TFName, PData, Headers )
HB_SYMBOL_UNUSED( Headers )
IF PCount() >= 1 .AND. HB_ISBLOCK( ::sl_beforeNavigate )
Eval( ::sl_beforeNavigate, cURL, NIL, Self )
Eval( ::sl_beforeNavigate, cURL, , Self )
RETURN NIL
ENDIF
@@ -165,7 +165,7 @@ METHOD WvgHTMLViewer:xBeforeNavigate( cURL, Flags, TFName, PData, Headers )
METHOD WvgHTMLViewer:xStatusTextChange( cText )
IF HB_ISBLOCK( ::sl_statusTextChange )
Eval( ::sl_statusTextChange, cText, NIL, Self )
Eval( ::sl_statusTextChange, cText, , Self )
ENDIF
RETURN Self
@@ -173,7 +173,7 @@ METHOD WvgHTMLViewer:xStatusTextChange( cText )
METHOD WvgHTMLViewer:xNavigateComplete( cURL )
IF HB_ISBLOCK( ::sl_navigateComplete )
Eval( ::sl_navigateComplete, cURL, NIL, Self )
Eval( ::sl_navigateComplete, cURL, , Self )
ENDIF
RETURN Self
@@ -189,7 +189,7 @@ METHOD WvgHTMLViewer:xProgressChange( nProgress, nProgMax )
METHOD WvgHTMLViewer:xTitleChange( cTitle )
IF HB_ISBLOCK( ::sl_titleChange )
Eval( ::sl_titleChange, cTitle, NIL, Self )
Eval( ::sl_titleChange, cTitle, , Self )
ENDIF
RETURN Self
@@ -197,7 +197,7 @@ METHOD WvgHTMLViewer:xTitleChange( cTitle )
METHOD WvgHTMLViewer:xDocumentComplete( cURI )
IF HB_ISBLOCK( ::sl_documentComplete )
Eval( ::sl_documentComplete, cURI, NIL, Self )
Eval( ::sl_documentComplete, cURI, , Self )
ENDIF
RETURN Self

View File

@@ -72,21 +72,21 @@ CREATE CLASS WvgListBox INHERIT WvgWindow, WvgDataRef
METHOD handleEvent( nMessage, aNM )
METHOD getItemHeight() INLINE ::sendMessage( LB_GETITEMHEIGHT, 0, 0 )
METHOD getTopItem() INLINE ::sendMessage( LB_GETTOPINDEX, 0, 0 )
METHOD getItemHeight() INLINE ::sendMessage( LB_GETITEMHEIGHT, 0, 0 )
METHOD getTopItem() INLINE ::sendMessage( LB_GETTOPINDEX, 0, 0 )
METHOD getVisibleItems() VIRTUAL
METHOD numItems() INLINE ::sendMessage( LB_GETCOUNT, 0, 0 )
METHOD setItemsHeight( nPixel ) INLINE ::sendMessage( LB_SETITEMHEIGHT, 0, nPixel )
METHOD setTopItem( nIndex ) INLINE ::sendMessage( LB_SETTOPINDEX, nIndex - 1, 0 )
METHOD numItems() INLINE ::sendMessage( LB_GETCOUNT, 0, 0 )
METHOD setItemsHeight( nPixel ) INLINE ::sendMessage( LB_SETITEMHEIGHT, 0, nPixel )
METHOD setTopItem( nIndex ) INLINE ::sendMessage( LB_SETTOPINDEX, nIndex - 1, 0 )
METHOD addItem( cItem ) INLINE Wvg_SendMessageText( ::hWnd, LB_ADDSTRING, 0, cItem )
METHOD addItem( cItem ) INLINE wvg_SendMessageText( ::hWnd, LB_ADDSTRING, 0, cItem )
METHOD clear()
METHOD delItem( nIndex ) INLINE ::sendMessage( LB_DELETESTRING, nIndex - 1, 0 )
METHOD getItem( nIndex ) INLINE Wvg_LBGetText( ::hWnd, nIndex - 1 )
METHOD delItem( nIndex ) INLINE ::sendMessage( LB_DELETESTRING, nIndex - 1, 0 )
METHOD getItem( nIndex ) INLINE wvg_lbGetText( ::hWnd, nIndex - 1 )
METHOD getTabstops() VIRTUAL
METHOD insItem( nIndex, cItem ) INLINE Wvg_SendMessageText( ::hWnd, LB_INSERTSTRING, nIndex - 1, cItem )
METHOD insItem( nIndex, cItem ) INLINE wvg_SendMessageText( ::hWnd, LB_INSERTSTRING, nIndex - 1, cItem )
METHOD setColumnWidth() VIRTUAL
METHOD setItem( nIndex, cItem ) INLINE ::delItem( nIndex ), ::insItem( nIndex, cItem )
METHOD setItem( nIndex, cItem ) INLINE ::delItem( nIndex ), ::insItem( nIndex, cItem )
METHOD setTabstops() VIRTUAL
@@ -169,13 +169,14 @@ METHOD WvgListBox:handleEvent( nMessage, aNM )
::sendMessage( WM_SIZE, 0, 0 )
CASE nMessage == HB_GTE_COMMAND
IF aNM[ 1 ] == LBN_SELCHANGE
::nCurSelected := Wvg_LBGetCurSel( ::hWnd ) + 1
DO CASE
CASE aNM[ 1 ] == LBN_SELCHANGE
::nCurSelected := wvg_lbGetCurSel( ::hWnd ) + 1
IF ::isParentCrt()
::oParent:setFocus()
ENDIF
IF HB_ISBLOCK( ::sl_itemMarked )
Eval( ::sl_itemMarked, NIL, NIL, self )
Eval( ::sl_itemMarked, , , Self )
ENDIF
IF ::isParentCrt()
IF ::pointerFocus
@@ -183,13 +184,13 @@ METHOD WvgListBox:handleEvent( nMessage, aNM )
ENDIF
ENDIF
ELSEIF aNM[ 1 ] == LBN_DBLCLK
CASE aNM[ 1 ] == LBN_DBLCLK
::editBuffer := ::nCurSelected
IF ::isParentCrt()
::oParent:setFocus()
ENDIF
IF HB_ISBLOCK( ::sl_itemSelected )
Eval( ::sl_itemSelected, NIL, NIL, self )
Eval( ::sl_itemSelected, , , Self )
ENDIF
IF ::isParentCrt()
IF ::pointerFocus
@@ -197,13 +198,13 @@ METHOD WvgListBox:handleEvent( nMessage, aNM )
ENDIF
ENDIF
ELSEIF aNM[ 1 ] == LBN_KILLFOCUS
CASE aNM[ 1 ] == LBN_KILLFOCUS
::killInputFocus()
ELSEIF aNM[ 1 ] == LBN_SETFOCUS
CASE aNM[ 1 ] == LBN_SETFOCUS
::setInputFocus()
ENDIF
ENDCASE
CASE nMessage == HB_GTE_KEYTOITEM
IF aNM[ 1 ] == K_ENTER
@@ -211,7 +212,7 @@ METHOD WvgListBox:handleEvent( nMessage, aNM )
::oParent:setFocus()
ENDIF
IF HB_ISBLOCK( ::sl_itemSelected )
Eval( ::sl_itemSelected, NIL, NIL, self )
Eval( ::sl_itemSelected, , , Self )
ENDIF
IF ::isParentCrt()
IF ::pointerFocus
@@ -224,56 +225,57 @@ METHOD WvgListBox:handleEvent( nMessage, aNM )
CASE nMessage == HB_GTE_CTLCOLOR
IF HB_ISNUMERIC( ::clr_FG )
Wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
ENDIF
IF HB_ISNUMERIC( ::hBrushBG )
Wvg_SetBkMode( aNM[ 1 ], 1 )
wvg_SetBkMode( aNM[ 1 ], 1 )
RETURN ::hBrushBG
ELSE
RETURN Wvg_GetCurrentBrush( aNM[ 1 ] )
RETURN wvg_GetCurrentBrush( aNM[ 1 ] )
ENDIF
CASE nMessage == HB_GTE_ANY /* This will never be reached */
IF aNM[ 1 ] == WM_LBUTTONUP
::nCurSelected := Wvg_LBGetCurSel( ::hWnd ) + 1
DO CASE
CASE aNM[ 1 ] == WM_LBUTTONUP
::nCurSelected := wvg_lbGetCurSel( ::hWnd ) + 1
IF HB_ISBLOCK( ::sl_itemMarked )
IF ::isParentCrt()
::oParent:setFocus()
ENDIF
Eval( ::sl_itemMarked, NIL, NIL, self )
Eval( ::sl_itemMarked, , , Self )
IF ::isParentCrt()
::setFocus()
ENDIF
ENDIF
ELSEIF aNM[ 1 ] == WM_LBUTTONDBLCLK
CASE aNM[ 1 ] == WM_LBUTTONDBLCLK
::editBuffer := ::nCurSelected
IF HB_ISBLOCK( ::sl_itemSelected )
IF ::isParentCrt()
::oParent:setFocus()
ENDIF
Eval( ::sl_itemSelected, NIL, NIL, self )
Eval( ::sl_itemSelected, , , Self )
IF ::isParentCrt()
::setFocus()
ENDIF
RETURN EVENT_HANDELLED
ENDIF
ELSEIF aNM[ 1 ] == WM_KEYUP
IF ::nCurSelected != Wvg_LBGetCurSel( ::hWnd ) + 1
::nCurSelected := Wvg_LBGetCurSel( ::hWnd ) + 1
CASE aNM[ 1 ] == WM_KEYUP
IF ::nCurSelected != wvg_lbGetCurSel( ::hWnd ) + 1
::nCurSelected := wvg_lbGetCurSel( ::hWnd ) + 1
IF HB_ISBLOCK( ::sl_itemMarked )
IF ::isParentCrt()
::oParent:setFocus()
ENDIF
Eval( ::sl_itemMarked, NIL, NIL, self )
Eval( ::sl_itemMarked, , , Self )
IF ::isParentCrt()
::setFocus()
ENDIF
ENDIF
ENDIF
ENDIF
ENDCASE
ENDCASE
RETURN EVENT_UNHANDELLED
@@ -290,8 +292,8 @@ METHOD WvgListBox:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible
RETURN Self
METHOD WvgListBox:destroy()
METHOD PROCEDURE WvgListBox:destroy()
::WvgWindow:destroy()
RETURN NIL
RETURN

View File

@@ -144,23 +144,21 @@ METHOD WvgMenuBar:create( oParent, aPresParams, lVisible )
::wvgWindow:create( ::oParent, , , , ::aPresParams, ::visible )
::hMenu := Wvg_CreateMenu()
::hMenu := wvg_CreateMenu()
IF ::hMenu != 0
/* check for if the parent already has a menu
we need to destroy that first
TO DO
*/
/* TODO: check for if the parent already has a menu
we need to destroy that first */
/* finally set the menu */
#if 0
Wvg_SetMenu( ::oParent:getHWND(), ::hMenu )
wvg_SetMenu( ::oParent:getHWND(), ::hMenu )
#endif
#if 0
/* how to make menu invisible ? */
IF ::visible
Wvg_ShowWindow( ::oParent:getHWND(), SW_MINIMIZE )
Wvg_ShowWindow( ::oParent:getHWND(), SW_NORMAL )
wvg_ShowWindow( ::oParent:getHWND(), SW_MINIMIZE )
wvg_ShowWindow( ::oParent:getHWND(), SW_NORMAL )
ENDIF
#endif
@@ -188,9 +186,9 @@ METHOD WvgMenuBar:destroy()
IF ! Empty( ::hMenu )
::DelAllItems()
IF ! Wvg_DestroyMenu( ::hMenu )
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", {} ) )
#endif
ENDIF
@@ -220,20 +218,18 @@ METHOD WvgMenuBar:delItem( nItemNum )
::aMenuItems[ nItemNum, WVT_MENU_MENUOBJ ]:Destroy()
ENDIF
IF ( lResult := Wvg_DeleteMenu( ::hMenu, nItemNum - 1, MF_BYPOSITION ) ) /* Remember ZERO base */
IF ( lResult := wvg_DeleteMenu( ::hMenu, nItemNum - 1, MF_BYPOSITION ) ) /* Remember ZERO base */
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 } ) )
#endif
ENDIF
ENDIF
RETURN lResult
/*
* { xCaption, bAction, nStyle, nAttrb }
*/
/* { xCaption, bAction, nStyle, nAttrb } */
METHOD WvgMenuBar:addItem( aItem, p2, p3, p4 )
LOCAL xCaption, bAction, nStyle, nAttrib
@@ -267,16 +263,15 @@ METHOD WvgMenuBar:putItem( aItem, nPos, lInsert )
nStyle := aItem[ 3 ]
nAttrib := aItem[ 4 ]
/* xCaption : NIL | cPrompt | ncResource | oMenu */
SWITCH ValType( xCaption )
CASE "U" /* Separator */
aItem := { MF_SEPARATOR, 0, 0, NIL, nStyle, nAttrib }
aItem := { MF_SEPARATOR, 0, 0, , nStyle, nAttrib }
EXIT
CASE "C"
IF Left( xCaption, 1 ) == "-"
aItem := { MF_SEPARATOR, 0, 0, NIL, nStyle, nAttrib }
aItem := { MF_SEPARATOR, 0, 0, , nStyle, nAttrib }
ELSE
aItem := { MF_STRING, ++::nMenuItemID, xCaption, bAction, nStyle, nAttrib }
ENDIF
@@ -295,7 +290,7 @@ METHOD WvgMenuBar:putItem( aItem, nPos, lInsert )
IF nPos <= 0
AAdd( ::aMenuItems, aItem )
nItemIndex := Len( ::aMenuItems )
Wvg_AppendMenu( ::hMenu, ;
wvg_AppendMenu( ::hMenu, ;
aItem[ 1 ], ;
aItem[ 2 ], ;
iif( HB_ISSTRING( aItem[ 3 ] ), StrTran( aItem[ 3 ], "~", "&" ), aItem[ 3 ] ) )
@@ -303,17 +298,17 @@ METHOD WvgMenuBar:putItem( aItem, nPos, lInsert )
nItemIndex := nPos
IF lInsert
::aMenuItems := hb_AIns( ::aMenuItems, nPos, aItem, .T. )
Wvg_InsertMenu( ::hMenu, ;
wvg_InsertMenu( ::hMenu, ;
nItemIndex - 1, ;
aItem[ 1 ] + MF_BYPOSITION, ;
aItem[ 2 ], ;
iif( HB_ISSTRING( aItem[ 3 ] ), StrTran( aItem[ 3 ], "~", "&" ), aItem[ 3 ] ) )
ELSE
IF HB_ISSTRING( xCaption )
aItem[ 2 ] := ::aMenuItems[ nItemIndex, 2 ]
aItem[ 2 ] := ::aMenuItems[ nItemIndex ][ 2 ]
ENDIF
::aMenuItems[ nItemIndex ] := aItem
Wvg_SetMenuItem( ::hMenu, ;
wvg_SetMenuItem( ::hMenu, ;
nItemIndex - 1, ;
aItem[ 2 ], ;
iif( HB_ISSTRING( aItem[ 3 ] ), StrTran( aItem[ 3 ], "~", "&" ), aItem[ 3 ] ), ;
@@ -323,11 +318,11 @@ METHOD WvgMenuBar:putItem( aItem, nPos, lInsert )
IF ++::nPass == 1
IF ::oParent:className() $ "WVGCRT,WVGDIALOG"
Wvg_SetMenu( ::oParent:getHWND(), ::hMenu )
wvg_SetMenu( ::oParent:getHWND(), ::hMenu )
ENDIF
ELSE
IF ::oParent:className() $ "WVGCRT,WVGDIALOG"
Wvg_DrawMenuBar( ::oParent:getHWND() )
wvg_DrawMenuBar( ::oParent:getHWND() )
ENDIF
ENDIF
@@ -382,7 +377,7 @@ METHOD WvgMenuBar:checkItem( nItemNum, lCheck )
__defaultNIL( @lCheck, .T. )
IF ! Empty( ::hMenu ) .AND. HB_ISNUMERIC( nItemNum )
nRet := Wvg_CheckMenuItem( ::hMenu, nItemNum - 1, MF_BYPOSITION + iif( lCheck, MF_CHECKED, MF_UNCHECKED ) )
nRet := wvg_CheckMenuItem( ::hMenu, nItemNum - 1, MF_BYPOSITION + iif( lCheck, MF_CHECKED, MF_UNCHECKED ) )
ENDIF
RETURN iif( nRet == -1, .F., .T. )
@@ -392,7 +387,7 @@ METHOD WvgMenuBar:enableItem( nItemNum )
LOCAL lSuccess := .F.
IF ! Empty( ::hMenu ) .AND. HB_ISNUMERIC( nItemNum )
lSuccess := Wvg_EnableMenuItem( ::hMenu, nItemNum - 1, MF_BYPOSITION + MF_ENABLED )
lSuccess := wvg_EnableMenuItem( ::hMenu, nItemNum - 1, MF_BYPOSITION + MF_ENABLED )
ENDIF
RETURN lSuccess
@@ -402,7 +397,7 @@ METHOD WvgMenuBar:disableItem( nItemNum )
LOCAL lSuccess := .F.
IF ! Empty( ::hMenu ) .AND. ! Empty( nItemNum )
lSuccess := Wvg_EnableMenuItem( ::hMenu, nItemNum - 1, MF_BYPOSITION + MF_GRAYED )
lSuccess := wvg_EnableMenuItem( ::hMenu, nItemNum - 1, MF_BYPOSITION + MF_GRAYED )
ENDIF
RETURN lSuccess
@@ -422,23 +417,15 @@ METHOD WvgMenuBar:insItem( nItemNum, aItem )
RETURN Self
METHOD WvgMenuBar:isItemChecked( nItemNum )
RETURN Wvg_IsMenuItemChecked( ::hMenu, nItemNum - 1 )
RETURN wvg_IsMenuItemChecked( ::hMenu, nItemNum - 1 )
METHOD WvgMenuBar:isItemEnabled( nItemNum )
RETURN Wvg_IsMenuItemEnabled( ::hMenu, nItemNum - 1 )
RETURN wvg_IsMenuItemEnabled( ::hMenu, nItemNum - 1 )
METHOD WvgMenuBar:selectItem( nItemNum )
IF HB_ISNUMERIC( nItemNum )
RETURN .F.
ENDIF
RETURN .T.
RETURN ! HB_ISNUMERIC( nItemNum )
METHOD WvgMenuBar:setItem( nItemNum, aItem )
RETURN ::putItem( aItem, nItemNum, .F. )
METHOD WvgMenuBar:beginMenu( xParam )
@@ -504,12 +491,10 @@ METHOD WvgMenuBar:onMenuKey( xParam )
RETURN Self
/*
* Xbase++ compatible xbpMenu class
*/
/* Xbase++ compatible xbpMenu class */
CREATE CLASS WvgMenu INHERIT WvgMenuBar
VAR title INIT ""
VAR title INIT ""
METHOD new( oParent, aPresParams, lVisible )
METHOD create( oParent, aPresParams, lVisible )
@@ -544,16 +529,14 @@ METHOD WvgMenu:create( oParent, aPresParams, lVisible )
::className := "POPUPMENU"
::hMenu := Wvg_CreatePopupMenu()
::hMenu := wvg_CreatePopupMenu()
RETURN Self
METHOD WvgMenu:getTitle()
RETURN ::title
METHOD WvgMenu:setTitle( cTitle )
RETURN ::title := cTitle
METHOD WvgMenu:Popup( oXbp, aPos, nDefaultItem, nControl )
@@ -561,13 +544,13 @@ METHOD WvgMenu:Popup( oXbp, aPos, nDefaultItem, nControl )
LOCAL nCmd, aMenuItem
HB_SYMBOL_UNUSED( nDefaultItem )
HB_SYMBOL_UNUSED( nControl )
HB_SYMBOL_UNUSED( nControl )
nCmd := Wvg_TrackPopupMenu( ::hMenu, TPM_LEFTALIGN + TPM_TOPALIGN + TPM_RETURNCMD, aPos[ 1 ], aPos[ 2 ], oXbp:hWnd )
nCmd := wvg_TrackPopupMenu( ::hMenu, TPM_LEFTALIGN + TPM_TOPALIGN + TPM_RETURNCMD, aPos[ 1 ], aPos[ 2 ], oXbp:hWnd )
aMenuItem := ::findMenuItemById( nCmd )
IF HB_ISARRAY( aMenuItem ) .AND. HB_ISBLOCK( aMenuItem[ 2 ] )
Eval( aMenuItem[ 2 ], aMenuItem[ 1 ], NIL, aMenuItem[ 4 ] )
Eval( aMenuItem[ 2 ], aMenuItem[ 1 ], , aMenuItem[ 4 ] )
ENDIF
RETURN 0

View File

@@ -58,14 +58,14 @@
CREATE CLASS WvgMLE INHERIT WvgWindow, WvgDataRef
VAR border INIT .T.
VAR editable INIT .T.
VAR horizScroll INIT .T.
VAR vertScroll INIT .T.
VAR wordWrap INIT .T.
VAR ignoreTab INIT .F.
VAR border INIT .T.
VAR editable INIT .T.
VAR horizScroll INIT .T.
VAR vertScroll INIT .T.
VAR wordWrap INIT .T.
VAR ignoreTab INIT .F.
VAR bufferLength INIT 32000
VAR bufferLength INIT 32000
METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -88,20 +88,20 @@ CREATE CLASS WvgMLE INHERIT WvgWindow, WvgDataRef
METHOD lineFromChar() VIRTUAL
METHOD pos() VIRTUAL
VAR sl_undo INIT .T.
ACCESS undo INLINE iif( ::sl_undo, NIL, NIL )
ASSIGN undo( lUndo ) INLINE ::sl_undo := lUndo
VAR sl_undo INIT .T.
ACCESS undo INLINE iif( ::sl_undo, NIL, NIL )
ASSIGN undo( lUndo ) INLINE ::sl_undo := lUndo
METHOD setEditable() VIRTUAL
METHOD setWrap() VIRTUAL
VAR sl_hScroll
ACCESS hScroll INLINE ::sl_hScroll
ASSIGN hScroll( bBlock ) INLINE ::sl_hScroll := bBlock
ACCESS hScroll INLINE ::sl_hScroll
ASSIGN hScroll( bBlock ) INLINE ::sl_hScroll := bBlock
VAR sl_vScroll
ACCESS vScroll INLINE ::sl_vScroll
ASSIGN vScroll( bBlock ) INLINE ::sl_vScroll := bBlock
ACCESS vScroll INLINE ::sl_vScroll
ASSIGN vScroll( bBlock ) INLINE ::sl_vScroll := bBlock
METHOD changed( lChanged ) SETGET
@@ -165,22 +165,22 @@ METHOD WvgMLE:handleEvent( nMessage, aNM )
DO CASE
CASE aNM[ NMH_code ] == EN_KILLFOCUS
IF HB_ISBLOCK( ::sl_killInputFocus )
Eval( ::sl_killInputFocus, NIL, NIL, Self )
Eval( ::sl_killInputFocus, , , Self )
ENDIF
CASE aNM[ NMH_code ] == EN_SETFOCUS
IF HB_ISBLOCK( ::sl_setInputFocus )
Eval( ::sl_setInputFocus, NIL, NIL, Self )
Eval( ::sl_setInputFocus, , , Self )
ENDIF
CASE aNM[ NMH_code ] == EN_HSCROLL
IF HB_ISBLOCK( ::sl_hScroll )
Eval( ::sl_hScroll, NIL, NIL, Self )
Eval( ::sl_hScroll, , , Self )
ENDIF
CASE aNM[ NMH_code ] == EN_VSCROLL
IF HB_ISBLOCK( ::sl_vScroll )
Eval( ::sl_vScroll, NIL, NIL, Self )
Eval( ::sl_vScroll, , , Self )
ENDIF
CASE aNM[ NMH_code ] == EN_CHANGE
@@ -191,13 +191,13 @@ METHOD WvgMLE:handleEvent( nMessage, aNM )
CASE nMessage == HB_GTE_CTLCOLOR
IF HB_ISNUMERIC( ::clr_FG )
Wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
ENDIF
IF HB_ISNUMERIC( ::hBrushBG )
Wvg_SetBkMode( aNM[ 1 ], 1 )
wvg_SetBkMode( aNM[ 1 ], 1 )
RETURN ::hBrushBG
ELSE
RETURN Wvg_GetCurrentBrush( aNM[ 1 ] )
RETURN wvg_GetCurrentBrush( aNM[ 1 ] )
ENDIF
CASE nMessage == HB_GTE_ANY
@@ -212,22 +212,22 @@ METHOD WvgMLE:handleEvent( nMessage, aNM )
CASE aNM[ NMH_code ] == WM_KILLFOCUS
IF HB_ISBLOCK( ::sl_killInputFocus )
Eval( ::sl_killInputFocus, NIL, NIL, Self )
Eval( ::sl_killInputFocus, , , Self )
ENDIF
CASE aNM[ NMH_code ] == WM_SETFOCUS
IF HB_ISBLOCK( ::sl_setInputFocus )
Eval( ::sl_setInputFocus, NIL, NIL, Self )
Eval( ::sl_setInputFocus, , , Self )
ENDIF
CASE aNM[ NMH_code ] == WM_HSCROLL
IF HB_ISBLOCK( ::sl_hScroll )
Eval( ::sl_hScroll, NIL, NIL, Self )
Eval( ::sl_hScroll, , , Self )
ENDIF
CASE aNM[ NMH_code ] == WM_VSCROLL
IF HB_ISBLOCK( ::sl_vScroll )
Eval( ::sl_vScroll, NIL, NIL, Self )
Eval( ::sl_vScroll, , , Self )
ENDIF
ENDCASE
@@ -237,11 +237,11 @@ METHOD WvgMLE:handleEvent( nMessage, aNM )
RETURN EVENT_UNHANDELLED
METHOD WvgMLE:destroy()
METHOD PROCEDURE WvgMLE:destroy()
::wvgWindow:destroy()
RETURN NIL
RETURN
METHOD WvgMLE:changed( lChanged )
@@ -266,11 +266,11 @@ METHOD WvgMLE:copyMarked()
LOCAL n, nB, nE
n := ::sendMessage( EM_GETSEL )
nB := Wvg_LOWORD( n )
nE := Wvg_HIWORD( n )
nB := wvg_LOWORD( n )
nE := wvg_HIWORD( n )
IF ( n := nE - nB ) > 0
Wvt_SetClipboard( SubStr( ::getData(), nB, n ) )
wvt_SetClipboard( SubStr( ::getData(), nB, n ) )
ENDIF
RETURN n
@@ -280,8 +280,8 @@ METHOD WvgMLE:cutMarked()
LOCAL n, nB, nE, cText
n := ::sendMessage( EM_GETSEL )
nB := Wvg_LOWORD( n )
nE := Wvg_HIWORD( n )
nB := wvg_LOWORD( n )
nE := wvg_HIWORD( n )
IF ( n := nE - nB ) > 0
cText := ::getData()

View File

@@ -44,23 +44,20 @@
*
*/
/*
* Routines to manage Wvt*Classes Gui Painting
*/
#include "wvtwin.ch"
#include "hbgtinfo.ch"
THREAD STATIC t_paint_ := { { "", {} } }
/* This function must have to be defined in your applications */
#if 0
FUNCTION Wvt_Paint()
PROCEDURE wvt_Paint()
/* Call this function from this funtion */
WvtPaintObjects()
WvtPaintObjects() /* Call this function from this function */
RETURN NIL
RETURN
#endif
@@ -71,15 +68,14 @@ FUNCTION WvtPaintObjects()
aBlocks := WvtSetPaint()
IF ( nBlocks := Len( aBlocks ) ) > 0
tlbr_ := Wvt_GetPaintRect()
tlbr_ := wvt_GetPaintRect()
FOR i := 1 TO nBlocks
lExe := .T.
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
*/
/* 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 ]
@@ -127,27 +123,27 @@ FUNCTION WvtPaintObjects()
FUNCTION WvtSetPaint( a_ )
LOCAL o
THREAD STATIC t
IF t == nil
LOCAL o
IF t == NIL
t := {}
ENDIF
o := t
IF a_ != nil
IF a_ != NIL
t := a_
ENDIF
RETURN o
FUNCTION Wvg_SetPaint( cID, nAction, xData, aAttr )
FUNCTION wvg_SetPaint( cID, nAction, xData, aAttr )
LOCAL n, n1, oldData
IF xData != nil
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 ]
@@ -165,7 +161,7 @@ FUNCTION Wvg_SetPaint( cID, nAction, xData, aAttr )
RETURN oldData
FUNCTION Wvg_GetPaint( cID )
FUNCTION wvg_GetPaint( cID )
LOCAL n
@@ -175,7 +171,7 @@ FUNCTION Wvg_GetPaint( cID )
RETURN {}
FUNCTION Wvg_DelPaint( cID, nAction )
FUNCTION wvg_DelPaint( cID, nAction )
LOCAL xData, n1, n
@@ -188,7 +184,7 @@ FUNCTION Wvg_DelPaint( cID, nAction )
RETURN xData
FUNCTION Wvg_PurgePaint( cID, lDummy )
FUNCTION wvg_PurgePaint( cID, lDummy )
LOCAL n, aPaint
@@ -205,7 +201,7 @@ FUNCTION Wvg_PurgePaint( cID, lDummy )
RETURN aPaint
FUNCTION Wvg_InsertPaint( cID, aPaint, lSet )
PROCEDURE wvg_InsertPaint( cID, aPaint, lSet )
LOCAL n
@@ -221,20 +217,18 @@ FUNCTION Wvg_InsertPaint( cID, aPaint, lSet )
WvtSetPaint( aPaint )
ENDIF
RETURN NIL
RETURN
/*
* RunTime Dialog Generation Routines
*
* Courtesy What32.lib
/* RunTime Dialog Generation Routines
* Courtesy hbwhat library
*/
/* nMode : 0 == Rows/cols - DEFAULT 1 == DlagUnits as from any standard dialog definition */
FUNCTION Wvt_SetDlgCoMode( nMode )
LOCAL nOldMode
FUNCTION wvt_SetDlgCoMode( nMode )
STATIC sMode := 0
LOCAL nOldMode
nOldMode := sMode
IF HB_ISNUMERIC( nMode ) .AND. nMode <= 1 .AND. nMode >= 0
sMode := nMode
@@ -242,16 +236,16 @@ FUNCTION Wvt_SetDlgCoMode( nMode )
RETURN nOldMode
FUNCTION Wvt_MakeDlgTemplate( nTop, nLeft, nRows, nCols, aOffSet, cTitle, nStyle, ;
FUNCTION wvt_MakeDlgTemplate( nTop, nLeft, nRows, nCols, aOffSet, cTitle, nStyle, ;
cFaceName, nPointSize, nWeight, lItalic, nHelpId, nExStyle )
LOCAL aDlg := { {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {} }
LOCAL aXY, nX, nY, nW, nH, nXM, nYM
LOCAL nBaseUnits, nBaseUnitsX, nBaseUnitsY
LOCAL aFont
LOCAL nMode := Wvt_SetDlgCoMode()
LOCAL nMode := wvt_SetDlgCoMode()
aFont := Wvt_GetFontInfo()
aFont := wvt_GetFontInfo()
IF nMode == 0
__defaultNIL( @aOffSet, {} )
@@ -261,36 +255,36 @@ FUNCTION Wvt_MakeDlgTemplate( nTop, nLeft, nRows, nCols, aOffSet, cTitle, nStyle
__defaultNIL( @aOffSet[ 3 ], 0 )
__defaultNIL( @aOffSet[ 4 ], 0 )
nBaseUnits := Wvg_GetDialogBaseUnits()
nBaseUnitsX := Wvg_LOWORD( nBaseUnits )
nBaseUnitsY := Wvg_HIWORD( nBaseUnits )
nBaseUnits := wvg_GetDialogBaseUnits()
nBaseUnitsX := wvg_LOWORD( nBaseUnits )
nBaseUnitsY := wvg_HIWORD( nBaseUnits )
nW := aFont[ 7 ] * nCols + aOffSet[ 4 ]
nH := aFont[ 6 ] * nRows + aOffSet[ 3 ]
/* Position it exactly where user has requested */
aXY := Wvt_ClientToScreen( nTop, nLeft )
aXY := wvt_ClientToScreen( nTop, nLeft )
nX := aXY[ 1 ] + aOffSet[ 2 ]
nY := aXY[ 2 ] + aOffSet[ 1 ]
/* MSDN says DlgBaseUnits and Screen Coordinates has multiplier of 4,8 for X and Y.
* But in my practice, the values below are 99% accurate.
* I have tested it on many fonts but on 1280/800 resolution.
* Please feel free to experiment if you find thses values inappropriate.
* Please feel free to experiment if you find these values inappropriate.
*/
nXM := 5.25
nYM := 10.25
nX := ( nX * nXM / nBaseUnitsX )
nY := ( nY * nYM / nBaseUnitsY )
nW := ( nW * nXM / nBaseUnitsX )
nH := ( nH * nYM / nBaseUnitsY )
nX := nX * nXM / nBaseUnitsX
nY := nY * nYM / nBaseUnitsY
nW := nW * nXM / nBaseUnitsX
nH := nH * nYM / nBaseUnitsY
ELSE
nX := nLeft
nY := nTop
nW := nCols
nH := nRows
nX := nLeft
nY := nTop
nW := nCols
nH := nRows
ENDIF
IF ! HB_ISNUMERIC( nStyle )
@@ -300,34 +294,34 @@ FUNCTION Wvt_MakeDlgTemplate( nTop, nLeft, nRows, nCols, aOffSet, cTitle, nStyle
WS_VISIBLE + WS_POPUP + DS_3DLOOK
ENDIF
AAdd( aDlg[ 1 ], iif( Empty( nHelpId ), 0, nHelpId ) )
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 ], 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 ) )
AAdd( aDlg[ 1 ], iif( HB_ISNUMERIC( nWeight ), nWeight, 400 ) )
AAdd( aDlg[ 1 ], iif( HB_ISLOGICAL( lItalic ), lItalic, .F. ) )
AAdd( aDlg[ 1 ], iif( HB_ISNUMERIC( nPointSize ), nPointSize, 8 ) )
AAdd( aDlg[ 1 ], iif( HB_ISNUMERIC( nWeight ), nWeight, 400 ) )
AAdd( aDlg[ 1 ], iif( HB_ISLOGICAL( lItalic ), lItalic, .F. ) )
AAdd( aDlg[ 1 ], iif( HB_ISSTRING( cFaceName ), cFaceName, "MS Sans Serif" ) )
ENDIF
RETURN aDlg
FUNCTION Wvt_AddDlgItem( aDlg, nTop, nLeft, nRows, nCols, aOffSet, ;
FUNCTION wvt_AddDlgItem( aDlg, nTop, nLeft, nRows, nCols, aOffSet, ;
cnId, cnDlgClass, nStyle, cText, nHelpId, nExStyle )
LOCAL aXY, nX, nY, nW, nH, nXM, nYM
LOCAL nBaseUnits, nBaseUnitsX, nBaseUnitsY
LOCAL nBottom, nRight
LOCAL nMode := Wvt_SetDlgCoMode()
LOCAL nMode := wvt_SetDlgCoMode()
IF nMode == 0
nBottom := nTop + nRows - 1
@@ -342,49 +336,49 @@ FUNCTION Wvt_AddDlgItem( aDlg, nTop, nLeft, nRows, nCols, aOffSet, ;
__defaultNIL( @aOffSet[ 3 ], 0 )
__defaultNIL( @aOffSet[ 4 ], 0 )
nBaseUnits := Wvg_GetDialogBaseUnits()
nBaseUnitsX := Wvg_LOWORD( nBaseUnits )
nBaseUnitsY := Wvg_HIWORD( nBaseUnits )
nBaseUnits := wvg_GetDialogBaseUnits()
nBaseUnitsX := wvg_LOWORD( nBaseUnits )
nBaseUnitsY := wvg_HIWORD( nBaseUnits )
aXY := Wvt_GetXYFromRowCol( nTop, nLeft )
aXY := wvt_GetXYFromRowCol( nTop, nLeft )
nX := aXY[ 1 ] + aOffSet[ 2 ]
nY := aXY[ 2 ] + aOffSet[ 1 ]
aXY := Wvt_GetXYFromRowCol( nBottom + 1, nRight + 1 )
aXY := wvt_GetXYFromRowCol( nBottom + 1, nRight + 1 )
nW := aXY[ 1 ] + aOffSet[ 4 ] - nX
nH := aXY[ 2 ] + aOffSet[ 3 ] - nY
nXM := 5.25
nYM := 10.25
nX := ( nX * nXM / nBaseUnitsX )
nY := ( nY * nYM / nBaseUnitsY )
nW := ( nW * nXM / nBaseUnitsX )
nH := ( nH * nYM / nBaseUnitsY )
nX := nX * nXM / nBaseUnitsX
nY := nY * nYM / nBaseUnitsY
nW := nW * nXM / nBaseUnitsX
nH := nH * nYM / nBaseUnitsY
ELSE
nX := nLeft
nY := nTop
nW := nCols
nH := nRows
nX := nLeft
nY := nTop
nW := nCols
nH := nRows
ENDIF
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[ 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[ 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
FUNCTION Wvt_CreateDialog( acnDlg, lOnTop, cbDlgProc, ncIcon, nTimerTicks, hMenu )
FUNCTION wvt_CreateDialog( acnDlg, lOnTop, cbDlgProc, ncIcon, nTimerTicks, hMenu )
LOCAL hDlg, cType, xTemplate, nDlgMode
@@ -396,36 +390,32 @@ 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 ], ;
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
hDlg := Wvt_CreateDialogDynamic( xTemplate, lOnTop, cbDlgProc, nDlgMode )
hDlg := wvt_CreateDialogDynamic( xTemplate, lOnTop, cbDlgProc, nDlgMode )
IF hDlg != 0
IF ncIcon != nil
Wvt_DlgSetIcon( hDlg, ncIcon )
IF ncIcon != NIL
wvt_DlgSetIcon( hDlg, ncIcon )
ENDIF
IF HB_ISNUMERIC( nTimerTicks )
Wvg_SetTimer( hDlg, 1001, nTimerTicks )
wvg_SetTimer( hDlg, 1001, nTimerTicks )
ENDIF
IF hMenu != nil
Wvg_SetMenu( hDlg, hMenu )
IF hMenu != NIL
wvg_SetMenu( hDlg, hMenu )
ENDIF
ENDIF
RETURN hDlg
FUNCTION Wvt_DialogBox( acnDlg, cbDlgProc, hWndParent )
FUNCTION wvt_DialogBox( acnDlg, cbDlgProc, hWndParent )
LOCAL nResult, cType, xTemplate, nDlgMode
@@ -437,26 +427,25 @@ 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 ], ;
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
nResult := Wvt_CreateDialogModal( xTemplate, .F., cbDlgProc, nDlgMode, hWndParent )
nResult := wvt_CreateDialogModal( xTemplate, .F., cbDlgProc, nDlgMode, hWndParent )
Wvg_SetFocus( hWndParent )
wvg_SetFocus( hWndParent )
RETURN nResult
/*
Wvt_GetOpenFileName( hWnd, @cPath, cTitle, aFilter, nFlags, cInitDir, cDefExt, nIndex )
/* wvt_GetOpenFileName( hWnd, @cPath, cTitle, aFilter, nFlags, cInitDir, cDefExt, nIndex )
hWnd: Handle to parent window
cPath: (optional) if OFN_ALLOWMULTISELECT the path is stored
cTitle: Window Title
aFilter: Array of Files Types i.e. { {"Data Bases","*.dbf"},{"Clipper","*.prg"} }
aFilter: Array of Files Types i.e. { { "Databases", "*.dbf" }, { "Harbour", "*.prg" } }
nFlags: OFN_* values default to OFN_EXPLORER
cInitDir: Initial directory
cDefExt: Default Extension i.e. "DBF"
@@ -465,7 +454,7 @@ cDefName: DEFAULT file name
Returns: If OFN_ALLOWMULTISELECT ? Array of files selected : FileName.
*/
FUNCTION Wvt_GetOpenFileName( hWnd, cPath, cTitle, acFilter, nFlags, cInitDir, cDefExt, nFilterIndex, cDefName )
FUNCTION wvt_GetOpenFileName( hWnd, cPath, cTitle, acFilter, nFlags, cInitDir, cDefExt, nFilterIndex, cDefName )
LOCAL cRet, aTmp, xRet, i
@@ -474,13 +463,13 @@ FUNCTION Wvt_GetOpenFileName( hWnd, cPath, cTitle, acFilter, nFlags, cInitDir, c
__defaultNIL( @cPath, "" )
__defaultNIL( @nFlags, OFN_EXPLORER + OFN_NOCHANGEDIR )
/* win_GetOpenFileName( [[@]<nFlags>], [<cTitle>], [<cInitDir>], [<cDefExt>],;
/* win_GetOpenFileName( [[@]<nFlags>], [<cTitle>], [<cInitDir>], [<cDefExt>], ;
* [<acFilter>], [[@]<nFilterIndex>], [<nBufferSize>], [<cDefName>] )
* -> <cFilePath> | <cPath> + e"\0" + <cFile1> [ + e"\0" + <cFileN> ] | ""
* --> <cFilePath> | <cPath> + e"\0" + <cFile1> [ + e"\0" + <cFileN> ] | ""
*/
cRet := win_GetOpenFileName( @nFlags, cTitle, cInitDir, cDefExt, acFilter, @nFilterIndex, /*nBufferSize*/, cDefName )
cRet := win_GetOpenFileName( @nFlags, cTitle, cInitDir, cDefExt, acFilter, @nFilterIndex, /* nBufferSize */, cDefName )
IF Wvg_And( nFlags, OFN_ALLOWMULTISELECT ) > 0
IF wvg_And( nFlags, OFN_ALLOWMULTISELECT ) > 0
xRet := {}
IF ! Empty( aTmp := hb_ATokens( cRet, Chr( 0 ) ) )
cPath := aTmp[ 1 ]
@@ -494,13 +483,12 @@ FUNCTION Wvt_GetOpenFileName( hWnd, cPath, cTitle, acFilter, nFlags, cInitDir, c
RETURN xRet
/*
Wvt_GetSaveFileName( hWnd, cDefFile, cTitle, acFilter, nFlags, cInitDir, cDefExt, @nFilterIndex )
/* wvt_GetSaveFileName( hWnd, cDefFile, cTitle, acFilter, nFlags, cInitDir, cDefExt, @nFilterIndex )
hWnd: Handle to parent window
cDefName: (optional) Default FileName
cTitle: Window Title
aFilter: Array of Files Types i.e. { {"Data Bases","*.dbf"},{"Clipper","*.prg"} }
aFilter: Array of Files Types i.e. { { "Databases", "*.dbf" }, { "Harbour", "*.prg" } }
nFlags: OFN_* values default to OFN_EXPLORER
cInitDir: Initial directory
cDefExt: Default Extension i.e. "DBF"
@@ -508,7 +496,7 @@ nIndex: Index position of types
Returns: FileName.
*/
FUNCTION Wvt_GetSaveFileName( hWnd, cDefName, cTitle, acFilter, nFlags, cInitDir, cDefExt, nFilterIndex )
FUNCTION wvt_GetSaveFileName( hWnd, cDefName, cTitle, acFilter, nFlags, cInitDir, cDefExt, nFilterIndex )
LOCAL cRet, aTmp, xRet, i, cPath
@@ -516,13 +504,13 @@ FUNCTION Wvt_GetSaveFileName( hWnd, cDefName, cTitle, acFilter, nFlags, cInitDir
__defaultNIL( @nFlags, OFN_EXPLORER + OFN_NOCHANGEDIR )
/* win_GetSaveFileName( [[@]<nFlags>], [<cTitle>], [<cInitDir>], [<cDefExt>],;
/* win_GetSaveFileName( [[@]<nFlags>], [<cTitle>], [<cInitDir>], [<cDefExt>], ;
* [<acFilter>], [[@]<nFilterIndex>], [<nBufferSize>], [<cDefName>] )
* -> <cFilePath> | <cPath> + e"\0" + <cFile1> [ + e"\0" + <cFileN> ] | ""
* --> <cFilePath> | <cPath> + e"\0" + <cFile1> [ + e"\0" + <cFileN> ] | ""
*/
cRet := win_GetSaveFileName( @nFlags, cTitle, cInitDir, cDefExt, acFilter, @nFilterIndex, /*nBufferSize*/, cDefName )
IF Wvg_And( nFlags, OFN_ALLOWMULTISELECT ) > 0
IF wvg_And( nFlags, OFN_ALLOWMULTISELECT ) > 0
xRet := {}
IF ! Empty( aTmp := hb_ATokens( cRet, Chr( 0 ) ) )
cPath := aTmp[ 1 ]
@@ -536,22 +524,18 @@ FUNCTION Wvt_GetSaveFileName( hWnd, cDefName, cTitle, acFilter, nFlags, cInitDir
RETURN xRet
/*
* C Functions to PRG Ports
*/
/* C functions to PRG Ports */
#include "hbgtinfo.ch"
#include "hbgtwvg.ch"
FUNCTION Wvt_SetTitle( cTitle )
FUNCTION wvt_SetTitle( cTitle )
RETURN hb_gtInfo( HB_GTI_WINTITLE, cTitle )
FUNCTION Wvt_GetTitle()
FUNCTION wvt_GetTitle()
RETURN hb_gtInfo( HB_GTI_WINTITLE )
FUNCTION Wvt_SetIcon( ncIconRes, cIconName )
FUNCTION wvt_SetIcon( ncIconRes, cIconName )
IF HB_ISNUMERIC( ncIconRes )
hb_gtInfo( HB_GTI_ICONRES, ncIconRes )
@@ -566,7 +550,7 @@ FUNCTION Wvt_SetIcon( ncIconRes, cIconName )
RETURN NIL
FUNCTION Wvt_SetFont( cFontName, nSize, nWidth, nWeight, nQuality )
FUNCTION wvt_SetFont( cFontName, nSize, nWidth, nWeight, nQuality )
__defaultNIL( @cFontName, hb_gtInfo( HB_GTI_FONTNAME ) )
__defaultNIL( @nWidth, hb_gtInfo( HB_GTI_FONTWIDTH ) )
@@ -576,40 +560,36 @@ FUNCTION Wvt_SetFont( cFontName, nSize, nWidth, nWeight, nQuality )
RETURN hb_gtInfo( HB_GTI_SETFONT, { cFontName, nSize, nWidth, nWeight, nQuality } )
FUNCTION Wvt_SetCodepage( nCodePage )
FUNCTION wvt_SetCodepage( nCodePage )
RETURN hb_gtInfo( HB_GTI_CODEPAGE, nCodePage )
FUNCTION Wvt_GetPalette()
FUNCTION wvt_GetPalette()
RETURN hb_gtInfo( HB_GTI_PALETTE )
FUNCTION Wvt_SetPalette( aRGB )
FUNCTION wvt_SetPalette( aRGB )
RETURN hb_gtInfo( HB_GTI_PALETTE, aRGB )
FUNCTION Wvt_GetRGBColor( nIndex )
FUNCTION wvt_GetRGBColor( nIndex )
RETURN hb_gtInfo( HB_GTI_PALETTE, nIndex )
#define BLACK RGB( 0x0 ,0x0 ,0x0 )
#define BLUE RGB( 0x0 ,0x0 ,0x85 )
#define GREEN RGB( 0x0 ,0x85,0x0 )
#define CYAN RGB( 0x0 ,0x85,0x85 )
#define RED RGB( 0x85,0x0 ,0x0 )
#define MAGENTA RGB( 0x85,0x0 ,0x85 )
#define BROWN RGB( 0x85,0x85,0x0 )
#define LIGHT_GRAY RGB( 0xC6,0xC6,0xC6 )
#define GRAY RGB( 0x60,0x60,0x60 )
#define BRIGHT_BLUE RGB( 0x00,0x00,0xFF )
#define BRIGHT_GREEN RGB( 0x60,0xFF,0x60 )
#define BRIGHT_CYAN RGB( 0x60,0xFF,0xFF )
#define BRIGHT_RED RGB( 0xF8,0x00,0x26 )
#define BRIGHT_MAGENTA RGB( 0xFF,0x60,0xFF )
#define YELLOW RGB( 0xFF,0xFF,0x00 )
#define WHITE RGB( 0xFF,0xFF,0xFF )
#define BLACK RGB( 0x0 ,0x0 ,0x0 )
#define BLUE RGB( 0x0 ,0x0 ,0x85 )
#define GREEN RGB( 0x0 ,0x85,0x0 )
#define CYAN RGB( 0x0 ,0x85,0x85 )
#define RED RGB( 0x85,0x0 ,0x0 )
#define MAGENTA RGB( 0x85,0x0 ,0x85 )
#define BROWN RGB( 0x85,0x85,0x0 )
#define LIGHT_GRAY RGB( 0xC6,0xC6,0xC6 )
#define GRAY RGB( 0x60,0x60,0x60 )
#define BRIGHT_BLUE RGB( 0x00,0x00,0xFF )
#define BRIGHT_GREEN RGB( 0x60,0xFF,0x60 )
#define BRIGHT_CYAN RGB( 0x60,0xFF,0xFF )
#define BRIGHT_RED RGB( 0xF8,0x00,0x26 )
#define BRIGHT_MAGENTA RGB( 0xFF,0x60,0xFF )
#define YELLOW RGB( 0xFF,0xFF,0x00 )
#define WHITE RGB( 0xFF,0xFF,0xFF )
FUNCTION Wvt_GetRGBColorByString( cColor, nForeBack )
FUNCTION wvt_GetRGBColorByString( cColor, nForeBack )
LOCAL s, n, lEnh
LOCAL nIndex := 0
@@ -644,113 +624,95 @@ FUNCTION Wvt_GetRGBColorByString( cColor, nForeBack )
RETURN hb_gtInfo( HB_GTI_PALETTE, nIndex )
FUNCTION Wvt_SetAltF4Close( lSetClose )
FUNCTION wvt_SetAltF4Close( lSetClose )
RETURN hb_gtInfo( HB_GTI_CLOSABLE, lSetClose )
FUNCTION Wvt_GetScreenWidth()
FUNCTION wvt_GetScreenWidth()
RETURN hb_gtInfo( HB_GTI_DESKTOPWIDTH )
FUNCTION Wvt_GetScreenHeight()
FUNCTION wvt_GetScreenHeight()
RETURN hb_gtInfo( HB_GTI_DESKTOPHEIGHT )
FUNCTION Wvt_GetWindowHandle()
FUNCTION wvt_GetWindowHandle()
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_WINDOWHANDLE )
FUNCTION Wvt_CenterWindow( lCenter, lRePaint )
FUNCTION wvt_CenterWindow( lCenter, lRePaint )
__defaultNIL( @lCenter, .T. )
__defaultNIL( @lRePaint, .F. )
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_CENTERWINDOW, { lCenter, lRePaint } )
FUNCTION Wvt_WindowCentre( lCenter, lRePaint )
FUNCTION wvt_WindowCentre( lCenter, lRePaint )
__defaultNIL( @lCenter, .T. )
__defaultNIL( @lRePaint, .F. )
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_CENTERWINDOW, { lCenter, lRePaint } )
FUNCTION Wvt_ProcessMessages()
FUNCTION wvt_ProcessMessages()
hb_gtInfo( HB_GTI_SPEC, HB_GTS_PROCESSMESSAGES )
RETURN .T.
FUNCTION Wvt_Keyboard( nKey )
PROCEDURE wvt_Keyboard( nKey )
hb_gtInfo( HB_GTI_SPEC, HB_GTS_KEYBOARD, nKey )
RETURN NIL
FUNCTION Wvt_GetClipboard()
RETURN
FUNCTION wvt_GetClipboard()
RETURN hb_gtInfo( HB_GTI_CLIPBOARDDATA )
FUNCTION Wvt_SetClipboard( cText )
FUNCTION wvt_SetClipboard( cText )
RETURN hb_gtInfo( HB_GTI_CLIPBOARDDATA, cText )
FUNCTION Wvt_PasteFromClipboard()
PROCEDURE wvt_PasteFromClipboard()
LOCAL cText, nLen, i
cText := hb_gtInfo( HB_GTI_CLIPBOARDDATA )
IF ( nLen := Len( cText ) ) > 0
FOR i := 1 TO nLen
Wvt_Keyboard( Asc( SubStr( cText, i, 1 ) ) )
wvt_Keyboard( Asc( SubStr( cText, i, 1 ) ) )
NEXT
ENDIF
RETURN NIL
FUNCTION Wvt_ResetWindow()
RETURN
FUNCTION wvt_ResetWindow()
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_RESETWINDOW )
FUNCTION Wvt_SetTimer( nTimerID, nMiliSeconds )
FUNCTION wvt_SetTimer( nTimerID, nMiliSeconds )
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_SETTIMER, { nTimerID, nMiliSeconds } )
FUNCTION Wvt_KillTimer( nTimerID )
FUNCTION wvt_KillTimer( nTimerID )
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_KILLTIMER, nTimerID )
FUNCTION Wvt_SetOnTop()
FUNCTION wvt_SetOnTop()
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_WNDSTATE, HB_GTS_WS_SETONTOP )
FUNCTION Wvt_SetAsNormal()
FUNCTION wvt_SetAsNormal()
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_WNDSTATE, HB_GTS_WS_SETASNORMAL )
FUNCTION Wvt_Minimize()
FUNCTION wvt_Minimize()
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_WNDSTATE, HB_GTS_WS_MINIMIZED )
FUNCTION Wvt_Maximize()
FUNCTION wvt_Maximize()
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_WNDSTATE, HB_GTS_WS_MAXIMIZED )
FUNCTION Wvt_Hide()
FUNCTION wvt_Hide()
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_WNDSTATE, HB_GTS_WS_HIDDEN )
FUNCTION Wvt_Show()
FUNCTION wvt_Show()
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_WNDSTATE, HB_GTS_WS_NORMAL )
FUNCTION Wvt_SetWindowPos( nX, nY )
FUNCTION wvt_SetWindowPos( nX, nY )
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_SETPOSITION, { nX, nY } )
FUNCTION Wvt_ShowWindow( nState )
FUNCTION wvt_ShowWindow( nState )
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_SHOWWINDOW, nState )
FUNCTION Wvt_Update()
FUNCTION wvt_Update()
RETURN hb_gtInfo( HB_GTI_SPEC, HB_GTS_UPDATEWINDOW )

View File

@@ -79,11 +79,11 @@ CREATE CLASS WvgPartHandler
METHOD notifier( nEvent, xParams )
METHOD controlWndProc( hWnd, nMessage, nwParam, nlParam )
VAR aChildren INIT {}
VAR aChildren INIT {}
VAR nNameId
VAR oParent
VAR oOwner
VAR nStatus INIT 0
VAR nStatus INIT 0
/* Application Level Notifier */
VAR sb_notifier
@@ -136,7 +136,6 @@ METHOD WvgPartHandler:handleEvent( hEvent, mp1, mp2 )
RETURN Self
METHOD WvgPartHandler:status()
RETURN ::nStatus
METHOD WvgPartHandler:addChild( oWvg )
@@ -159,7 +158,6 @@ METHOD WvgPartHandler:childFromName( nNameId )
RETURN oWvg
METHOD WvgPartHandler:childList()
RETURN ::aChildren
METHOD WvgPartHandler:removeChild( oChild )
@@ -214,7 +212,7 @@ METHOD WvgPartHandler:setParent( oWvg )
RETURN oOldXbp
METHOD WvgPartHandler:notifierBlock( ... )
METHOD PROCEDURE WvgPartHandler:notifierBlock( ... )
LOCAL a_ := hb_AParams()
@@ -226,92 +224,90 @@ METHOD WvgPartHandler:notifierBlock( ... )
ENDIF
RETURN NIL
RETURN
/*
This will be called by the WvgCrt() console FOR various events TO be propogated TO child controls
*/
/* This will be called by the WvgCrt() console for various events to be propagated to child controls */
METHOD WvgPartHandler:notifier( nEvent, xParams )
LOCAL aPos, aMenuItem, nIndex, nCtrlID, oObj
LOCAL nReturn := 0
DO CASE
CASE nEvent == HB_GTE_MOUSE
IF xParams[ 1 ] == WM_MOUSEHOVER
DO CASE
CASE xParams[ 1 ] == WM_MOUSEHOVER
aPos := { xParams[ 3 ], xParams[ 4 ] }
ELSEIF xParams[ 1 ] == WM_MOUSELEAVE
CASE xParams[ 1 ] == WM_MOUSELEAVE
/* Nothing */
ELSE
OTHERWISE
aPos := iif( ::mouseMode == 2, { xParams[ 3 ], xParams[ 4 ] }, { xParams[ 5 ], xParams[ 6 ] } )
ENDIF
ENDCASE
SWITCH xParams[ 1 ]
CASE WM_MOUSEHOVER
IF HB_ISBLOCK( ::sl_enter )
Eval( ::sl_enter, aPos, NIL, Self )
Eval( ::sl_enter, aPos, , Self )
ENDIF
EXIT
CASE WM_MOUSELEAVE
IF HB_ISBLOCK( ::sl_leave )
Eval( ::sl_leave, aPos, NIL, Self )
Eval( ::sl_leave, aPos, , Self )
ENDIF
EXIT
CASE WM_RBUTTONDOWN
IF HB_ISBLOCK( ::sl_rbDown )
Eval( ::sl_rbDown, aPos, NIL, Self )
Eval( ::sl_rbDown, aPos, , Self )
ENDIF
EXIT
CASE WM_LBUTTONDOWN
IF HB_ISBLOCK( ::sl_lbDown )
Eval( ::sl_lbDown, aPos, NIL, Self )
Eval( ::sl_lbDown, aPos, , Self )
ENDIF
EXIT
CASE WM_RBUTTONUP
IF HB_ISBLOCK( ::sl_rbUp )
Eval( ::sl_rbUp, aPos, NIL, Self )
Eval( ::sl_rbUp, aPos, , Self )
ENDIF
EXIT
CASE WM_LBUTTONUP
IF HB_ISBLOCK( ::sl_lbUp )
Eval( ::sl_lbUp, aPos, NIL, Self )
Eval( ::sl_lbUp, aPos, , Self )
ENDIF
EXIT
CASE WM_RBUTTONDBLCLK
IF HB_ISBLOCK( ::sl_rbDblClick )
Eval( ::sl_rbDblClick, aPos, NIL, Self )
Eval( ::sl_rbDblClick, aPos, , Self )
ENDIF
EXIT
CASE WM_LBUTTONDBLCLK
IF HB_ISBLOCK( ::sl_lbDblClick )
Eval( ::sl_lbDblClick, aPos, NIL, Self )
Eval( ::sl_lbDblClick, aPos, , Self )
ENDIF
EXIT
CASE WM_MBUTTONDOWN
IF HB_ISBLOCK( ::sl_mbDown )
Eval( ::sl_mbDown, aPos, NIL, Self )
Eval( ::sl_mbDown, aPos, , Self )
ENDIF
EXIT
CASE WM_MBUTTONUP
IF HB_ISBLOCK( ::sl_mbClick )
Eval( ::sl_mbClick, aPos, NIL, Self )
Eval( ::sl_mbClick, aPos, , Self )
ENDIF
EXIT
CASE WM_MBUTTONDBLCLK
IF HB_ISBLOCK( ::sl_mbDblClick )
Eval( ::sl_mbDblClick, aPos, NIL, Self )
Eval( ::sl_mbDblClick, aPos, , Self )
ENDIF
EXIT
CASE WM_MOUSEMOVE
IF HB_ISBLOCK( ::sl_motion )
Eval( ::sl_motion, aPos, NIL, Self )
Eval( ::sl_motion, aPos, , Self )
ENDIF
EXIT
CASE WM_MOUSEWHEEL
IF HB_ISBLOCK( ::sl_wheel )
Eval( ::sl_wheel, aPos, NIL, Self )
Eval( ::sl_wheel, aPos, , Self )
ENDIF
EXIT
CASE WM_NCMOUSEMOVE
@@ -320,35 +316,38 @@ METHOD WvgPartHandler:notifier( nEvent, xParams )
CASE nEvent == HB_GTE_KEYBOARD
IF HB_ISBLOCK( ::keyboard )
Eval( ::keyboard, xParams, NIL, Self )
Eval( ::keyboard, xParams, , Self )
ENDIF
CASE nEvent == HB_GTE_SETFOCUS
/* AEval( ::aChildren, {| o | Wvg_InvalidateRect( o:hWnd ) } ) */
#if 0
AEval( ::aChildren, {| o | wvg_InvalidateRect( o:hWnd ) } )
#endif
IF HB_ISBLOCK( ::sl_setInputFocus )
Eval( ::sl_setInputFocus, NIL, NIL, Self )
Eval( ::sl_setInputFocus, , , Self )
ENDIF
::lHasInputFocus := .T.
CASE nEvent == HB_GTE_KILLFOCUS
IF HB_ISBLOCK( ::sl_killInputFocus )
Eval( ::sl_killInputFocus, NIL, NIL, Self )
Eval( ::sl_killInputFocus, , , Self )
ENDIF
::lHasInputFocus := .F.
CASE nEvent == HB_GTE_PAINT
/* AEval( ::aChildren, {| o | Wvg_InvalidateRect( o:hWnd ) } ) */
#if 0
AEval( ::aChildren, {| o | wvg_InvalidateRect( o:hWnd ) } )
#endif
CASE nEvent == HB_GTE_GUIPARTS
/* Eventally every window be checked if it falls within returned rectangle or not
* then it will avoid a lot of flickering
*/
AEval( ::aChildren, {| o | Wvg_InvalidateRect( o:hWnd ) } )
/* Eventually every window be checked if it falls within returned rectangle or not
then it will avoid a lot of flickering */
AEval( ::aChildren, {| o | wvg_InvalidateRect( o:hWnd ) } )
CASE nEvent == HB_GTE_CLOSE
IF HB_ISBLOCK( ::close )
nReturn := Eval( ::close, NIL, NIL, Self )
nReturn := Eval( ::close, , , Self )
ENDIF
CASE nEvent == HB_GTE_MENU
@@ -356,24 +355,23 @@ METHOD WvgPartHandler:notifier( nEvent, xParams )
CASE xParams[ 1 ] == 0 /* menu selected */
IF HB_ISOBJECT( ::oMenu )
IF ! Empty( aMenuItem := ::oMenu:FindMenuItemById( xParams[ 2 ] ) )
IF HB_ISBLOCK( aMenuItem[ 2 ] )
Eval( aMenuItem[ 2 ], aMenuItem[ 1 ], NIL, aMenuItem[ 4 ] )
ELSEIF HB_ISBLOCK( aMenuItem[ 3 ] )
Eval( aMenuItem[ 3 ], aMenuItem[ 1 ], NIL, aMenuItem[ 4 ] )
ENDIF
DO CASE
CASE HB_ISBLOCK( aMenuItem[ 2 ] )
Eval( aMenuItem[ 2 ], aMenuItem[ 1 ], , aMenuItem[ 4 ] )
CASE HB_ISBLOCK( aMenuItem[ 3 ] )
Eval( aMenuItem[ 3 ], aMenuItem[ 1 ], , aMenuItem[ 4 ] )
ENDCASE
ENDIF
ENDIF
CASE xParams[ 1 ] == 1 .AND. HB_ISOBJECT( ::oMenu ) /* enter menu loop */
IF HB_ISBLOCK( ::oMenu:sl_beginMenu )
Eval( ::oMenu:sl_beginMenu, NIL, NIL, Self )
Eval( ::oMenu:sl_beginMenu, , , Self )
ENDIF
CASE xParams[ 1 ] == 2 .AND. HB_ISOBJECT( ::oMenu ) /* exit menu loop */
IF HB_ISBLOCK( ::oMenu:sl_endMenu )
Eval( ::oMenu:sl_endMenu, NIL, NIL, Self )
Eval( ::oMenu:sl_endMenu, , , Self )
ENDIF
ENDCASE
@@ -441,9 +439,7 @@ METHOD WvgPartHandler:notifier( nEvent, xParams )
RETURN nReturn
/*
This will be called if a control is assigned its own WndProc via ::SetWindowProcCallback()
*/
/* This will be called if a control is assigned its own WndProc via ::SetWindowProcCallback() */
METHOD WvgPartHandler:controlWndProc( hWnd, nMessage, nwParam, nlParam )
LOCAL nCtrlID, nNotifctn, hWndCtrl, nObj, aMenuItem, oObj, nReturn
@@ -457,20 +453,19 @@ METHOD WvgPartHandler:controlWndProc( hWnd, nMessage, nwParam, nlParam )
EXIT
CASE WM_COMMAND
nCtrlID := Wvg_LOWORD( nwParam )
nNotifctn := Wvg_HIWORD( nwParam )
nCtrlID := wvg_LOWORD( nwParam )
nNotifctn := wvg_HIWORD( nwParam )
hWndCtrl := nlParam
IF hWndCtrl == 0 /* It is menu */
IF HB_ISOBJECT( ::oMenu )
IF ! Empty( aMenuItem := ::oMenu:FindMenuItemById( nCtrlID ) )
IF HB_ISBLOCK( aMenuItem[ 2 ] )
Eval( aMenuItem[ 2 ], aMenuItem[ 1 ], NIL, aMenuItem[ 4 ] )
ELSEIF HB_ISBLOCK( aMenuItem[ 3 ] )
Eval( aMenuItem[ 3 ], aMenuItem[ 1 ], NIL, aMenuItem[ 4 ] )
ENDIF
DO CASE
CASE HB_ISBLOCK( aMenuItem[ 2 ] )
Eval( aMenuItem[ 2 ], aMenuItem[ 1 ], , aMenuItem[ 4 ] )
CASE HB_ISBLOCK( aMenuItem[ 3 ] )
Eval( aMenuItem[ 3 ], aMenuItem[ 1 ], , aMenuItem[ 4 ] )
ENDCASE
ENDIF
ENDIF
RETURN 0
@@ -487,11 +482,12 @@ METHOD WvgPartHandler:controlWndProc( hWnd, nMessage, nwParam, nlParam )
CASE WM_NOTIFY
IF ( nObj := AScan( ::aChildren, {| o | o:nID == nwParam } ) ) > 0
nReturn := ::aChildren[ nObj ]:handleEvent( HB_GTE_NOTIFY, { nwParam, nlParam } )
IF HB_ISNUMERIC( nReturn ) .AND. nReturn == EVENT_HANDELLED
DO CASE
CASE HB_ISNUMERIC( nReturn ) .AND. nReturn == EVENT_HANDELLED
RETURN 0
ELSEIF HB_ISLOGICAL( nReturn )
CASE HB_ISLOGICAL( nReturn )
RETURN nReturn
ENDIF
ENDCASE
ENDIF
EXIT
@@ -506,7 +502,7 @@ METHOD WvgPartHandler:controlWndProc( hWnd, nMessage, nwParam, nlParam )
IF HB_ISOBJECT( oObj )
nReturn := oObj:handleEvent( HB_GTE_CTLCOLOR, { nwParam, nlParam } )
IF nReturn == EVENT_UNHANDELLED
RETURN Wvg_CallWindowProc( ::nOldProc, hWnd, nMessage, nwParam, nlParam )
RETURN wvg_CallWindowProc( ::nOldProc, hWnd, nMessage, nwParam, nlParam )
ELSE
RETURN nReturn
ENDIF
@@ -514,11 +510,11 @@ METHOD WvgPartHandler:controlWndProc( hWnd, nMessage, nwParam, nlParam )
EXIT
CASE WM_HSCROLL
::handleEvent( HB_GTE_HSCROLL, { Wvg_LOWORD( nwParam ), Wvg_HIWORD( nwParam ), nlParam } )
::handleEvent( HB_GTE_HSCROLL, { wvg_LOWORD( nwParam ), wvg_HIWORD( nwParam ), nlParam } )
RETURN 0
CASE WM_VSCROLL
IF ::handleEvent( HB_GTE_VSCROLL, { Wvg_LOWORD( nwParam ), Wvg_HIWORD( nwParam ), nlParam } ) == EVENT_HANDELLED
IF ::handleEvent( HB_GTE_VSCROLL, { wvg_LOWORD( nwParam ), wvg_HIWORD( nwParam ), nlParam } ) == EVENT_HANDELLED
RETURN 0
ENDIF
EXIT
@@ -529,7 +525,7 @@ METHOD WvgPartHandler:controlWndProc( hWnd, nMessage, nwParam, nlParam )
CASE WM_MOUSEMOVE
IF ::objType == objTypeScrollBar
IF ! ::lTracking
::lTracking := Wvg_BeginMouseTracking( ::hWnd )
::lTracking := wvg_BeginMouseTracking( ::hWnd )
ENDIF
ENDIF
EXIT
@@ -566,4 +562,4 @@ METHOD WvgPartHandler:controlWndProc( hWnd, nMessage, nwParam, nlParam )
ENDSWITCH
RETURN Wvg_CallWindowProc( ::nOldProc, hWnd, nMessage, nwParam, nlParam )
RETURN wvg_CallWindowProc( ::nOldProc, hWnd, nMessage, nwParam, nlParam )

View File

@@ -114,6 +114,7 @@ METHOD WvgPushButton:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible
ENDIF
ENDIF
ENDIF
IF ! ::border
::style += BS_FLAT
ENDIF
@@ -143,7 +144,7 @@ METHOD WvgPushButton:handleEvent( nMessage, aNM )
ENDIF
::sendMessage( WM_SIZE, 0, 0 )
IF HB_ISBLOCK( ::sl_resize )
Eval( ::sl_resize, NIL, NIL, self )
Eval( ::sl_resize, , , Self )
ENDIF
CASE nMessage == HB_GTE_COMMAND
@@ -152,7 +153,7 @@ METHOD WvgPushButton:handleEvent( nMessage, aNM )
IF ::isParentCrt()
::oParent:setFocus()
ENDIF
Eval( ::sl_lbClick, NIL, NIL, self )
Eval( ::sl_lbClick, , , Self )
IF ::pointerFocus
::setFocus()
ENDIF
@@ -165,10 +166,10 @@ METHOD WvgPushButton:handleEvent( nMessage, aNM )
CASE nMessage == HB_GTE_CTLCOLOR
IF HB_ISNUMERIC( ::clr_FG )
Wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
ENDIF
IF HB_ISNUMERIC( ::hBrushBG )
Wvg_SetBkMode( aNM[ 1 ], 1 )
wvg_SetBkMode( aNM[ 1 ], 1 )
RETURN ::hBrushBG
ENDIF
@@ -179,7 +180,7 @@ METHOD WvgPushButton:handleEvent( nMessage, aNM )
IF ::isParentCrt()
::oParent:setFocus()
ENDIF
Eval( ::sl_lbClick, NIL, NIL, Self )
Eval( ::sl_lbClick, , , Self )
ENDIF
ENDIF
#endif
@@ -187,11 +188,11 @@ METHOD WvgPushButton:handleEvent( nMessage, aNM )
RETURN EVENT_UNHANDELLED
METHOD WvgPushButton:destroy()
METHOD PROCEDURE WvgPushButton:destroy()
::wvgWindow:destroy()
RETURN NIL
RETURN
METHOD WvgPushButton:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -200,6 +201,7 @@ METHOD WvgPushButton:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisi
RETURN Self
METHOD WvgPushButton:setCaption( xCaption, cDll )
LOCAL nLoadFromResByIdNumber := 0
LOCAL nLoadFromResByIdName := 1
LOCAL nLoadFromDiskFile := 2
@@ -211,41 +213,41 @@ METHOD WvgPushButton:setCaption( xCaption, cDll )
IF HB_ISSTRING( xCaption )
IF ".ICO" == Upper( Right( ::caption, 4 ) )
Wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_ICON, Wvg_LoadImage( ::caption, nLoadFromDiskFile, IMAGE_ICON ) )
wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_ICON, wvg_LoadImage( ::caption, nLoadFromDiskFile, IMAGE_ICON ) )
ELSEIF ".BMP" == Upper( Right( ::caption, 4 ) )
Wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_BITMAP, Wvg_LoadImage( ::caption, nLoadFromDiskFile, IMAGE_BITMAP ) )
wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_BITMAP, wvg_LoadImage( ::caption, nLoadFromDiskFile, IMAGE_BITMAP ) )
ELSE
Wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption )
wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption )
ENDIF
ELSEIF HB_ISNUMERIC( xCaption ) /* Handle to the bitmap */
Wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_BITMAP, ::caption )
wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_BITMAP, ::caption )
ELSEIF HB_ISARRAY( xCaption )
ASize( xCaption, 4 )
IF HB_ISCHAR( xCaption[ 1 ] )
Wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, xCaption[ 1 ] )
wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, xCaption[ 1 ] )
ENDIF
IF ! Empty( xCaption[ 2 ] )
SWITCH xCaption[ 2 ]
CASE WVG_IMAGE_ICONFILE
Wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_ICON, Wvg_LoadImage( xCaption[ 3 ], nLoadFromDiskFile, IMAGE_ICON ) )
wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_ICON, wvg_LoadImage( xCaption[ 3 ], nLoadFromDiskFile, IMAGE_ICON ) )
EXIT
CASE WVG_IMAGE_ICONRESOURCE
IF HB_ISSTRING( xCaption[ 3 ] )
Wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_ICON, Wvg_LoadImage( xCaption[ 3 ], nLoadFromResByIdName, IMAGE_ICON ) )
wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_ICON, wvg_LoadImage( xCaption[ 3 ], nLoadFromResByIdName, IMAGE_ICON ) )
ELSE
Wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_ICON, Wvg_LoadImage( xCaption[ 3 ], nLoadFromResByIdNumber, IMAGE_ICON ) )
wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_ICON, wvg_LoadImage( xCaption[ 3 ], nLoadFromResByIdNumber, IMAGE_ICON ) )
ENDIF
EXIT
CASE WVG_IMAGE_BITMAPFILE
Wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_BITMAP, Wvg_LoadImage( xCaption[ 3 ], nLoadFromDiskFile, IMAGE_BITMAP ) )
wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_BITMAP, wvg_LoadImage( xCaption[ 3 ], nLoadFromDiskFile, IMAGE_BITMAP ) )
EXIT
CASE WVG_IMAGE_BITMAPRESOURCE
IF HB_ISSTRING( xCaption[ 3 ] )
Wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_BITMAP, Wvg_LoadImage( xCaption[ 3 ], nLoadFromResByIdName, IMAGE_BITMAP ) )
wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_BITMAP, wvg_LoadImage( xCaption[ 3 ], nLoadFromResByIdName, IMAGE_BITMAP ) )
ELSE
Wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_BITMAP, Wvg_LoadImage( xCaption[ 3 ], nLoadFromResByIdNumber, IMAGE_BITMAP ) )
wvg_SendMessage( ::hWnd, BM_SETIMAGE, IMAGE_BITMAP, wvg_LoadImage( xCaption[ 3 ], nLoadFromResByIdNumber, IMAGE_BITMAP ) )
ENDIF
EXIT
ENDSWITCH

View File

@@ -76,7 +76,7 @@ CREATE CLASS WvgRadioButton INHERIT WvgWindow, WvgDataRef
ENDCLASS
METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgRadioButton
METHOD WvgRadioButton:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::wvgWindow:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -86,7 +86,7 @@ METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgRadio
RETURN Self
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgRadioButton
METHOD WvgRadioButton:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::wvgWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -108,16 +108,16 @@ METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgRa
RETURN Self
METHOD handleEvent( nMessage, aNM ) CLASS WvgRadioButton
METHOD WvgRadioButton:handleEvent( nMessage, aNM )
SWITCH nMessage
CASE HB_GTE_COMMAND
IF aNM[ NMH_code ] == BN_CLICKED
::editBuffer := ( Wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED )
::editBuffer := ( wvg_Button_GetCheck( ::hWnd ) == BST_CHECKED )
IF HB_ISBLOCK( ::sl_lbClick )
Eval( ::sl_lbClick, ::editBuffer, NIL, self )
Eval( ::sl_lbClick, ::editBuffer, , Self )
RETURN 0
ENDIF
ENDIF
@@ -127,23 +127,23 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgRadioButton
RETURN 1
METHOD destroy() CLASS WvgRadioButton
METHOD PROCEDURE WvgRadioButton:destroy()
::wvgWindow:destroy()
RETURN NIL
RETURN
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgRadioButton
METHOD WvgRadioButton:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::Initialize( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
RETURN Self
METHOD setCaption( xCaption ) CLASS WvgRadioButton
METHOD WvgRadioButton:setCaption( xCaption )
IF HB_ISSTRING( xCaption )
::caption := xCaption
Wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption )
wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption )
ENDIF
RETURN Self

View File

@@ -81,7 +81,7 @@ CREATE CLASS WvgScrollBar INHERIT WvgWindow, WvgDataRef
ENDCLASS
METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgScrollBar
METHOD WvgScrollBar:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::WvgWindow:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -91,7 +91,7 @@ METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgScrol
RETURN Self
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgScrollBar
METHOD WvgScrollBar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::wvgWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -127,7 +127,7 @@ METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgSc
RETURN Self
METHOD handleEvent( nMessage, aNM ) CLASS WvgScrollBar
METHOD WvgScrollBar:handleEvent( nMessage, aNM )
LOCAL nScrMsg, nScrPos, nCommand
@@ -140,7 +140,7 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgScrollBar
CASE nMessage == HB_GTE_CTLCOLOR
IF HB_ISNUMERIC( ::hBrushBG )
Wvg_SetBkMode( aNM[ 1 ], 1 )
wvg_SetBkMode( aNM[ 1 ], 1 )
RETURN ::hBrushBG
ENDIF
@@ -212,10 +212,9 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgScrollBar
ENDCASE
::sl_editBuffer := nScrPos
Eval( ::sl_xbeSB_Scroll, { nScrPos, nCommand }, NIL, Self )
Eval( ::sl_xbeSB_Scroll, { nScrPos, nCommand }, , Self )
RETURN EVENT_HANDELLED
CASE nMessage == HB_GTE_VSCROLL
IF ::isParentCrt()
::oParent:setFocus()
@@ -284,20 +283,20 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgScrollBar
ENDCASE
::sl_editBuffer := nScrPos
Eval( ::sl_xbeSB_Scroll, { nScrPos, nCommand }, NIL, self )
Eval( ::sl_xbeSB_Scroll, { nScrPos, nCommand }, , Self )
RETURN EVENT_HANDELLED
ENDCASE
RETURN EVENT_UNHANDELLED
METHOD destroy() CLASS WvgScrollBar
METHOD PROCEDURE WvgScrollBar:destroy()
::wvgWindow:destroy()
RETURN NIL
RETURN
METHOD Scroll( xParam ) CLASS WvgScrollBar
METHOD WvgScrollBar:Scroll( xParam )
IF HB_ISBLOCK( xParam )
::sl_xbeSB_Scroll := xParam
@@ -305,7 +304,7 @@ METHOD Scroll( xParam ) CLASS WvgScrollBar
RETURN self
METHOD setRange( aRange ) CLASS WvgScrollBar
METHOD WvgScrollBar:setRange( aRange )
LOCAL aOldRange, nMin, nMax
@@ -321,8 +320,5 @@ METHOD setRange( aRange ) CLASS WvgScrollBar
RETURN aOldRange
METHOD setScrollBoxSize( nUnits ) CLASS WvgScrollBar
LOCAL nOldUnits := nUnits
RETURN nOldUnits
METHOD WvgScrollBar:setScrollBoxSize( nUnits )
RETURN nUnits

View File

@@ -97,11 +97,11 @@ CREATE CLASS WvgSLE INHERIT WvgWindow, WvgDataRef
METHOD changed( lChanged ) SETGET
VAR sl_returnPressed
METHOD returnPressed( ... ) SETGET
METHOD returnPressed( bReturnPressed ) SETGET
ENDCLASS
METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgSLE
METHOD WvgSLE:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::wvgWindow:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -111,7 +111,7 @@ METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgSLE
RETURN Self
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgSLE
METHOD WvgSLE:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
LOCAL es_ := { ES_LEFT, ES_RIGHT, ES_CENTER }
@@ -155,7 +155,7 @@ METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgSL
RETURN Self
METHOD handleEvent( nMessage, aNM ) CLASS WvgSLE
METHOD WvgSLE:handleEvent( nMessage, aNM )
DO CASE
CASE nMessage == HB_GTE_RESIZED
@@ -175,55 +175,56 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgSLE
CASE aNM[ NMH_code ] == EN_KILLFOCUS
IF HB_ISBLOCK( ::sl_killInputFocus )
Eval( ::sl_killInputFocus, NIL, NIL, Self )
Eval( ::sl_killInputFocus, , , Self )
ENDIF
CASE aNM[ NMH_code ] == EN_SETFOCUS
IF HB_ISBLOCK( ::sl_setInputFocus )
Eval( ::sl_setInputFocus, NIL, NIL, Self )
Eval( ::sl_setInputFocus, , , Self )
ENDIF
ENDCASE
CASE nMessage == HB_GTE_CTLCOLOR
IF HB_ISNUMERIC( ::clr_FG )
Wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
ENDIF
IF HB_ISNUMERIC( ::hBrushBG )
Wvg_SetBkMode( aNM[ 1 ], 1 )
wvg_SetBkMode( aNM[ 1 ], 1 )
RETURN ::hBrushBG
ELSE
RETURN Wvg_GetCurrentBrush( aNM[ 1 ] )
RETURN wvg_GetCurrentBrush( aNM[ 1 ] )
ENDIF
CASE nMessage == HB_GTE_ANY
DO CASE
CASE aNM[ NMH_code ] == WM_KILLFOCUS
IF HB_ISBLOCK( ::sl_killInputFocus )
Eval( ::sl_killInputFocus, NIL, NIL, Self )
Eval( ::sl_killInputFocus, , , Self )
ENDIF
CASE aNM[ NMH_code ] == WM_SETFOCUS
IF HB_ISBLOCK( ::sl_setInputFocus )
Eval( ::sl_setInputFocus, NIL, NIL, Self )
Eval( ::sl_setInputFocus, , , Self )
ENDIF
CASE aNM[ NMH_code ] == WM_KEYDOWN
IF aNM[ 2 ] == K_ENTER
DO CASE
CASE aNM[ 2 ] == K_ENTER
IF ::isParentCrt()
::oParent:setFocus()
ENDIF
IF HB_ISBLOCK( ::sl_returnPressed )
Eval( ::sl_returnPressed, NIL, NIL, Self )
Eval( ::sl_returnPressed, , , Self )
ENDIF
ELSEIF aNM[ 2 ] == VK_TAB
CASE aNM[ 2 ] == VK_TAB
IF ::isParentCrt()
::oParent:setFocus()
RETURN EVENT_HANDELLED
ENDIF
ELSEIF aNM[ 2 ] == 65
CASE aNM[ 2 ] == 65
// RETURN EVENT_HANDELLED
ENDIF
ENDCASE
ENDCASE
@@ -231,11 +232,11 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgSLE
RETURN EVENT_UNHANDELLED
METHOD destroy() CLASS WvgSLE
METHOD PROCEDURE WvgSLE:destroy()
::wvgWindow:destroy()
RETURN NIL
RETURN
METHOD WvgSLE:changed( lChanged )
@@ -260,11 +261,11 @@ METHOD WvgSLE:copyMarked()
LOCAL n, nB, nE
n := ::sendMessage( EM_GETSEL )
nB := Wvg_LOWORD( n )
nE := Wvg_HIWORD( n )
nB := wvg_LOWORD( n )
nE := wvg_HIWORD( n )
IF ( n := nE - nB ) > 0
Wvt_SetClipboard( SubStr( ::getData(), nB, n ) )
wvt_SetClipboard( SubStr( ::getData(), nB, n ) )
ENDIF
RETURN n
@@ -274,8 +275,8 @@ METHOD WvgSLE:cutMarked()
LOCAL n, nB, nE, cText
n := ::sendMessage( EM_GETSEL )
nB := Wvg_LOWORD( n )
nE := Wvg_HIWORD( n )
nB := wvg_LOWORD( n )
nE := wvg_HIWORD( n )
IF ( n := nE - nB ) > 0
cText := ::getData()
@@ -284,14 +285,12 @@ METHOD WvgSLE:cutMarked()
RETURN n
METHOD WvgSLE:returnPressed( ... )
METHOD WvgSLE:returnPressed( bReturnPressed )
LOCAL a_ := hb_AParams()
IF Len( a_ ) == 1 .AND. HB_ISBLOCK( a_[ 1 ] )
::sl_returnPressed := a_[ 1 ]
ELSEIF Len( a_ ) >= 0 .AND. HB_ISBLOCK( ::sl_returnPressed )
Eval( ::sl_returnPressed, NIL, NIL, Self )
IF HB_ISBLOCK( bReturnPressed )
::sl_returnPressed := bReturnPressed
ELSEIF HB_ISBLOCK( ::sl_returnPressed )
Eval( ::sl_returnPressed, , , Self )
ENDIF
RETURN Self

View File

@@ -125,23 +125,21 @@ METHOD WvgStatusBar:handleEvent( nMessage, aNM )
CASE nMessage == HB_GTE_COMMAND
IF HB_ISBLOCK( ::sl_lbClick )
Eval( ::sl_lbClick, NIL, NIL, self )
Eval( ::sl_lbClick, , , Self )
RETURN 0
ENDIF
CASE nMessage == HB_GTE_NOTIFY
aNMH := Wvg_GetNMMouseInfo( aNM[ 2 ] )
aNMH := wvg_GetNMMouseInfo( aNM[ 2 ] )
DO CASE
CASE aNMH[ NMH_code ] == NM_CLICK
IF HB_ISBLOCK( ::sl_lbClick )
IF aNMH[ NMH_dwItemSpec ] >= 0
nObj := aNMH[ NMH_dwItemSpec ] + 1
Eval( ::sl_lbClick, ::aItems[ nObj ], NIL, Self )
Eval( ::sl_lbClick, ::aItems[ nObj ], , Self )
ENDIF
nHandled := 0
@@ -151,20 +149,20 @@ METHOD WvgStatusBar:handleEvent( nMessage, aNM )
CASE nMessage == HB_GTE_CTLCOLOR
IF HB_ISNUMERIC( ::clr_FG )
Wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
ENDIF
IF HB_ISNUMERIC( ::hBrushBG )
Wvg_SetBkMode( aNM[ 1 ], 1 )
wvg_SetBkMode( aNM[ 1 ], 1 )
RETURN ::hBrushBG
ELSE
RETURN Wvg_GetCurrentBrush( aNM[ 1 ] )
RETURN wvg_GetCurrentBrush( aNM[ 1 ] )
ENDIF
ENDCASE
RETURN nHandled
METHOD WvgStatusBar:destroy()
METHOD PROCEDURE WvgStatusBar:destroy()
LOCAL i, nItems
@@ -176,7 +174,7 @@ METHOD WvgStatusBar:destroy()
::wvgWindow:destroy()
RETURN NIL
RETURN
METHOD WvgStatusBar:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -198,7 +196,7 @@ METHOD WvgStatusBar:addItem( cCaption, xImage, cDLL, nStyle, cKey, nMode )
oPanel:index := ::numItems + 1
lSuccess := Wvg_StatusBarCreatePanel( ::hWnd, nMode )
lSuccess := wvg_StatusBarCreatePanel( ::hWnd, nMode )
IF lSuccess
AAdd( ::aItems, oPanel )
@@ -212,11 +210,12 @@ METHOD WvgStatusBar:delItem( nItemORcKey )
LOCAL nIndex := 0
IF HB_ISNUMERIC( nItemORcKey )
DO CASE
CASE HB_ISNUMERIC( nItemORcKey )
nIndex := AScan( ::aItems, {| o | o:key == nItemORcKey } )
ELSEIF HB_ISNUMERIC( nItemORcKey )
CASE HB_ISNUMERIC( nItemORcKey )
nIndex := nItemORcKey
ENDIF
ENDCASE
IF nIndex > 0
/* Delete panel by window */
@@ -229,13 +228,12 @@ METHOD WvgStatusBar:getItem( nItemORcKey )
LOCAL nIndex := 0, oPanel
IF HB_ISSTRING( nItemORcKey )
DO CASE
CASE HB_ISSTRING( nItemORcKey )
nIndex := AScan( ::aItems, {| o | o:key == nItemORcKey } )
ELSEIF HB_ISNUMERIC( nItemORcKey )
CASE HB_ISNUMERIC( nItemORcKey )
nIndex := nItemORcKey
ENDIF
ENDCASE
IF nIndex > 0
oPanel := ::aItems[ nIndex ]
@@ -249,7 +247,6 @@ METHOD WvgStatusBar:clear()
FOR i := 1 TO ::numItems
/* Remove off window */
NEXT
::aItems := {}
@@ -272,9 +269,7 @@ METHOD WvgStatusBar:panelDblClick( xParam )
RETURN Self
/*
* WvgToolBarButton() Class compatible with XbpToolbarButton()
*/
/* WvgToolBarButton() Class compatible with XbpToolbarButton() */
CREATE CLASS WvgStatusBarPanel
VAR alignment INIT WVGALIGN_LEFT
@@ -315,13 +310,12 @@ METHOD WvgStatusBarPanel:caption( cCaption )
IF cCaption == NIL
RETURN ::sl_caption
ELSE
__defaultNIL( @cCaption, ::sl_caption )
::sl_caption := cCaption
Wvg_StatusBarSetText( ::oParent:hWnd, ::index, cCaption )
wvg_StatusBarSetText( ::oParent:hWnd, ::index, cCaption )
ENDIF
RETURN Self

View File

@@ -56,7 +56,7 @@
#include "wvtwin.ch"
#include "wvgparts.ch"
CREATE CLASS WvgStatic INHERIT WvgWindow
CREATE CLASS WvgStatic INHERIT WvgWindow
VAR autoSize INIT .F.
VAR caption INIT ""
@@ -131,14 +131,16 @@ METHOD WvgStatic:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
EXIT
CASE WVGSTATIC_TYPE_BITMAP
::style += SS_BITMAP
IF ::options == WVGSTATIC_BITMAP_TILED
DO CASE
CASE ::options == WVGSTATIC_BITMAP_TILED
::style += SS_CENTERIMAGE
ELSEIF ::options == WVGSTATIC_BITMAP_SCALED
CASE ::options == WVGSTATIC_BITMAP_SCALED
ELSE
OTHERWISE
ENDIF
ENDCASE
EXIT
CASE WVGSTATIC_TYPE_FGNDRECT
::style += SS_WHITERECT
EXIT
@@ -157,18 +159,16 @@ METHOD WvgStatic:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
CASE WVGSTATIC_TYPE_HALFTONEFRAME
::style += SS_GRAYFRAME
EXIT
CASE WVGSTATIC_TYPE_RAISEDBOX
::style += SS_ETCHEDFRAME
EXIT
CASE WVGSTATIC_TYPE_RECESSEDBOX
EXIT
CASE WVGSTATIC_TYPE_RAISEDRECT
EXIT
CASE WVGSTATIC_TYPE_RECESSEDRECT
EXIT
CASE WVGSTATIC_TYPE_RAISEDLINE
EXIT
CASE WVGSTATIC_TYPE_RECESSEDLINE
@@ -178,22 +178,22 @@ METHOD WvgStatic:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
#if 1
/* Options */
IF AScan( { WVGSTATIC_TYPE_FGNDFRAME, WVGSTATIC_TYPE_BGNDFRAME, WVGSTATIC_TYPE_HALFTONEFRAME }, ::type ) > 0
IF hb_bitAnd( ::options, WVGSTATIC_FRAMETHIN ) == WVGSTATIC_FRAMETHIN
DO CASE
CASE hb_bitAnd( ::options, WVGSTATIC_FRAMETHIN ) == WVGSTATIC_FRAMETHIN
::style += WS_BORDER
ELSEIF hb_bitAnd( ::options, WVGSTATIC_FRAMETHICK ) == WVGSTATIC_FRAMETHICK
CASE hb_bitAnd( ::options, WVGSTATIC_FRAMETHICK ) == WVGSTATIC_FRAMETHICK
::style += WS_DLGFRAME
ENDIF
ENDCASE
ENDIF
#endif
#if 0
IF ::type == WVGSTATIC_TYPE_TEXT
IF ::options == WVGSTATIC_FRAMETHIN
DO CASE
CASE ::options == WVGSTATIC_FRAMETHIN
::style += WS_BORDER
ELSEIF ::options == WVGSTATIC_FRAMETHICK
CASE ::options == WVGSTATIC_FRAMETHICK
::style += WS_DLGFRAME
ENDIF
ENDCASE
ENDIF
#endif
@@ -201,7 +201,7 @@ METHOD WvgStatic:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::createControl()
::SetWindowProcCallback() /* Static must not be subject to GT dependent */
::SetWindowProcCallback() /* Static must not be subject to GT dependent */
IF ::visible
::show()
@@ -221,20 +221,20 @@ METHOD WvgStatic:handleEvent( nMessage, aNM )
::rePosition()
ENDIF
IF HB_ISBLOCK( ::sl_resize )
Eval( ::sl_resize, NIL, NIL, self )
Eval( ::sl_resize, , , Self )
ENDIF
AEval( ::aChildren, {| o | o:handleEvent( HB_GTE_RESIZED, { 0, 0, 0, 0, 0 } ) } )
RETURN EVENT_HANDELLED
CASE nMessage == HB_GTE_CTLCOLOR
IF HB_ISNUMERIC( ::clr_FG )
Wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
wvg_SetTextColor( aNM[ 1 ], ::clr_FG )
ENDIF
IF HB_ISNUMERIC( ::hBrushBG )
Wvg_SetBkMode( aNM[ 1 ], 1 )
wvg_SetBkMode( aNM[ 1 ], 1 )
RETURN ::hBrushBG
ELSE
RETURN Wvg_GetCurrentBrush( aNM[ 1 ] )
RETURN wvg_GetCurrentBrush( aNM[ 1 ] )
ENDIF
CASE nMessage == HB_GTE_ANY
@@ -246,14 +246,14 @@ METHOD WvgStatic:handleEvent( nMessage, aNM )
RETURN EVENT_UNHANDELLED
METHOD WvgStatic:destroy()
METHOD PROCEDURE WvgStatic:destroy()
IF ::hBitmap != nil
Wvg_DeleteObject( ::hBitmap )
IF ::hBitmap != NIL
wvg_DeleteObject( ::hBitmap )
ENDIF
::wvgWindow:destroy()
RETURN NIL
RETURN
METHOD WvgStatic:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -270,16 +270,16 @@ METHOD WvgStatic:setCaption( xCaption, cDll )
DO CASE
CASE ::type == WVGSTATIC_TYPE_TEXT
Wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption )
wvg_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption )
CASE ::type == WVGSTATIC_TYPE_BITMAP
IF ::hBitmap != nil
Wvg_DeleteObject( ::hBitmap )
wvg_DeleteObject( ::hBitmap )
ENDIF
::hBitmap := Wvg_LoadImage( ::caption, iif( HB_ISNUMERIC( ::caption ), 1, 2 ) )
::hBitmap := wvg_LoadImage( ::caption, iif( HB_ISNUMERIC( ::caption ), 1, 2 ) )
Wvg_SendMessage( ::hWnd, STM_SETIMAGE, IMAGE_BITMAP, ::hBitmap )
wvg_SendMessage( ::hWnd, STM_SETIMAGE, IMAGE_BITMAP, ::hBitmap )
ENDCASE

View File

@@ -72,7 +72,7 @@ CREATE CLASS WvgSysWindow INHERIT WvgPartHandler
METHOD currentPos()
METHOD currentSize()
VAR aPos INIT { 0, 0 }
VAR aPos INIT { 0, 0 }
VAR hWnd PROTECTED
VAR nOldProc PROTECTED
@@ -80,16 +80,16 @@ CREATE CLASS WvgSysWindow INHERIT WvgPartHandler
VAR sl_helpRequest
ACCESS helpRequest INLINE ::sl_helpRequest
ASSIGN helpRequest( bBlock ) INLINE ::sl_helpRequest := bBlock
ACCESS helpRequest INLINE ::sl_helpRequest
ASSIGN helpRequest( bBlock ) INLINE ::sl_helpRequest := bBlock
VAR sl_move
ACCESS move INLINE ::sl_move
ASSIGN move( bBlock ) INLINE ::sl_move := bBlock
ACCESS move INLINE ::sl_move
ASSIGN move( bBlock ) INLINE ::sl_move := bBlock
VAR sl_quit
ACCESS quit INLINE ::sl_quit
ASSIGN quit( bBlock ) INLINE ::sl_quit := bBlock
ACCESS quit INLINE ::sl_quit
ASSIGN quit( bBlock ) INLINE ::sl_quit := bBlock
ENDCLASS
@@ -122,32 +122,26 @@ METHOD WvgSysWindow:create( oParent, oOwner, aPos )
RETURN Self
METHOD WvgSysWindow:configure()
RETURN Self
METHOD WvgSysWindow:destroy()
RETURN Self
METHOD WvgSysWindow:disable()
RETURN Self
METHOD WvgSysWindow:enable()
RETURN Self
METHOD WvgSysWindow:hide()
RETURN Self
METHOD WvgSysWindow:show()
RETURN Self
METHOD WvgSysWindow:SetPos( aPos )
Wvg_SetWindowPosition( ::hWnd, aPos[ 1 ], aPos[ 2 ], .F. )
wvg_SetWindowPosition( ::hWnd, aPos[ 1 ], aPos[ 2 ], .F. )
RETURN Self
@@ -155,7 +149,7 @@ METHOD WvgSysWindow:currentPos()
LOCAL aRect
aRect := Wvg_GetWindowRect( ::hWnd )
aRect := wvg_GetWindowRect( ::hWnd )
RETURN { aRect[ 1 ], aRect[ 2 ] }
@@ -163,54 +157,52 @@ METHOD WvgSysWindow:currentSize()
LOCAL aRect
aRect := Wvg_GetClientRect( ::hWnd )
aRect := wvg_GetClientRect( ::hWnd )
RETURN { aRect[ 3 ] - aRect[ 1 ], aRect[ 4 ] - aRect[ 2 ] }
/*
* Class WvgFontDialog()
*/
/* Class WvgFontDialog() */
CREATE CLASS WvgFontDialog INHERIT WvgSysWindow
/* Appearance */
VAR title INIT ""
VAR buttonApply INIT .F.
VAR buttonCancel INIT .T.
VAR buttonHelp INIT .F.
VAR buttonOk INIT .T.
VAR buttonReset INIT .F.
VAR strikeOut INIT .T.
VAR underscore INIT .T.
VAR title INIT ""
VAR buttonApply INIT .F.
VAR buttonCancel INIT .T.
VAR buttonHelp INIT .F.
VAR buttonOk INIT .T.
VAR buttonReset INIT .F.
VAR strikeOut INIT .T.
VAR underscore INIT .T.
VAR name INIT .T.
VAR style INIT .T.
VAR size INIT .T.
VAR name INIT .T.
VAR style INIT .T.
VAR size INIT .T.
VAR displayFilter INIT .T.
VAR printerFilter INIT .T.
VAR displayFilter INIT .T.
VAR printerFilter INIT .T.
VAR familyName INIT " "
VAR nominalPointSize INIT 0
VAR familyName INIT " "
VAR nominalPointSize INIT 0
VAR bitmapOnly INIT .F.
VAR fixedOnly INIT .F.
VAR proportionalOnly INIT .T.
VAR bitmapOnly INIT .F.
VAR fixedOnly INIT .F.
VAR proportionalOnly INIT .T.
VAR outLine INIT .T.
VAR previewBGClr INIT RGB( 255, 255, 255 )
VAR previewFGClr INIT RGB( 0, 0, 0 )
VAR previewString INIT " "
VAR printerPS INIT NIL
VAR screenPS INIT NIL
VAR outLine INIT .T.
VAR previewBGClr INIT RGB( 255, 255, 255 )
VAR previewFGClr INIT RGB( 0, 0, 0 )
VAR previewString INIT " "
VAR printerPS INIT NIL
VAR screenPS INIT NIL
VAR synthesizeFonts INIT .T.
VAR synthesizeFonts INIT .T.
VAR vectorOnly INIT .F.
VAR vectorSizes INIT {}
VAR vectorOnly INIT .F.
VAR vectorSizes INIT {}
VAR viewPrinterFonts INIT .F.
VAR viewScreenFonts INIT .T.
VAR viewPrinterFonts INIT .F.
VAR viewScreenFonts INIT .T.
METHOD new( oParent, oOwner, oScreenPS, oPrinterPS, aPos )
METHOD create( oParent, oOwner, oScreenPS, oPrinterPS, aPos )
@@ -235,15 +227,15 @@ CREATE CLASS WvgFontDialog INHERIT WvgSysWindow
VAR oScreenPS
VAR oPrinterPS
VAR aPos INIT { 0, 0 }
VAR ok INIT .F.
VAR aPos INIT { 0, 0 }
VAR ok INIT .F.
METHOD wndProc( hWnd, nMessage, nwParam, nlParam )
METHOD GetWvgFont( aFont ) PROTECTED
ENDCLASS
METHOD new( oParent, oOwner, oScreenPS, oPrinterPS, aPos ) CLASS WvgFontDialog
METHOD WvgFontDialog:new( oParent, oOwner, oScreenPS, oPrinterPS, aPos )
__defaultNIL( @oParent, ::oParent )
__defaultNIL( @oOwner, ::oOwner )
@@ -261,7 +253,7 @@ METHOD new( oParent, oOwner, oScreenPS, oPrinterPS, aPos ) CLASS WvgFontDialog
RETURN Self
METHOD create( oParent, oOwner, oScreenPS, oPrinterPS, aPos ) CLASS WvgFontDialog
METHOD WvgFontDialog:create( oParent, oOwner, oScreenPS, oPrinterPS, aPos )
__defaultNIL( @oParent, ::oParent )
__defaultNIL( @oOwner, ::oOwner )
@@ -284,11 +276,13 @@ METHOD create( oParent, oOwner, oScreenPS, oPrinterPS, aPos ) CLASS WvgFontDialo
::WvgSysWindow:create( oParent, oOwner )
/* ::nWndProc := hb_AsCallBack( "WNDPROC", Self ) */
#if 0
::nWndProc := hb_AsCallBack( "WNDPROC", Self )
#endif
RETURN Self
METHOD wndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgFontDialog
METHOD WvgFontDialog:wndProc( hWnd, nMessage, nwParam, nlParam )
LOCAL aRect, nL, nH
@@ -300,43 +294,43 @@ METHOD wndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgFontDialog
::hWnd := hWnd
IF ! Empty( ::title )
Wvg_SetWindowText( ::hWnd, ::title )
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. )
aRect := wvg_GetWindowRect( ::hWnd )
wvg_MoveWindow( ::hWnd, ::aPos[ 1 ], ::aPos[ 2 ], aRect[ 3 ] - aRect[ 1 ], aRect[ 4 ] - aRect[ 2 ], .F. )
ENDIF
RETURN 1
CASE nMessage == WM_COMMAND
nL := Wvg_LOWORD( nwParam )
nH := Wvg_HIWORD( nwParam )
nL := wvg_LOWORD( nwParam )
nH := wvg_HIWORD( nwParam )
HB_SYMBOL_UNUSED( nH )
@@ -345,17 +339,17 @@ METHOD wndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgFontDialog
CASE nL == IDOK
::ok := .T.
IF HB_ISBLOCK( ::sl_activateOk )
Eval( ::sl_activateOk, ::GetWvgFont(), NIL, Self )
Eval( ::sl_activateOk, ::GetWvgFont(), , Self )
ENDIF
CASE nL == IDCANCEL
IF HB_ISBLOCK( ::sl_activateCancel )
Eval( ::sl_activateCancel, NIL, NIL, Self )
Eval( ::sl_activateCancel, , , Self )
ENDIF
CASE nL == 1026
IF HB_ISBLOCK( ::sl_activateApply )
Eval( ::sl_activateApply, ::GetWvgFont(), NIL, Self )
Eval( ::sl_activateApply, ::GetWvgFont(), , Self )
ENDIF
CASE nL == 1038 /* Help */
@@ -366,18 +360,18 @@ METHOD wndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgFontDialog
RETURN 0
METHOD display( nMode ) CLASS WvgFontDialog
METHOD WvgFontDialog:display( nMode )
LOCAL hWnd, aInfo
IF nMode == 0
hWnd := ::oParent:hWnd
ELSE
hWnd := Wvg_GetDesktopWindow()
hWnd := wvg_GetDesktopWindow()
ENDIF
::ok := .F.
aInfo := Wvg_ChooseFont( hWnd, {| h, m, w, l | ::wndProc( h, m, w, l ) }, ::familyName, ;
aInfo := wvg_ChooseFont( hWnd, {| h, m, w, l | ::wndProc( h, m, w, l ) }, ::familyName, ;
::nominalPointSize, ::viewScreenFonts, ::viewPrinterFonts )
IF ! ::ok
RETURN NIL
@@ -385,28 +379,28 @@ METHOD display( nMode ) CLASS WvgFontDialog
RETURN ::GetWvgFont( aInfo )
METHOD destroy() CLASS WvgFontDialog
METHOD WvgFontDialog:destroy()
/* hb_FreeCallBack( ::nWndProc ) */
#if 0
hb_FreeCallBack( ::nWndProc )
#endif
RETURN Self
/*
* Only callable from ::activateOK and ::activateApply
*/
METHOD GetWvgFont( aFont ) CLASS WvgFontDialog
/* Only callable from ::activateOK and ::activateApply */
METHOD WvgFontDialog:GetWvgFont( aFont )
LOCAL oWvgFont
IF ! HB_ISARRAY( aFont )
aFont := Wvg_ChooseFont_GetLogFont( ::hWnd )
aFont := wvg_ChooseFont_GetLogFont( ::hWnd )
ENDIF
oWvgFont := WvgFont():new()
oWvgFont:familyName := aFont[ 1 ]
oWvgFont:height := aFont[ 2 ]
oWvgFont:nominalPointSize := Wvg_HeightToPointSize( /* hdc */, oWvgFont:height )
oWvgFont:nominalPointSize := wvg_HeightToPointSize( /* hdc */, oWvgFont:height )
oWvgFont:width := aFont[ 3 ]
oWvgFont:bold := aFont[ 4 ] > 400
oWvgFont:italic := aFont[ 5 ]
@@ -419,46 +413,44 @@ METHOD GetWvgFont( aFont ) CLASS WvgFontDialog
RETURN oWvgFont
/*
Class WvgFont()
*/
/* Class WvgFont() */
CREATE CLASS WvgFont
VAR hFont
VAR oPS
VAR hdc
VAR familyName INIT ""
VAR height INIT 0
VAR nominalPointSize INIT 0
VAR familyName INIT ""
VAR height INIT 0
VAR nominalPointSize INIT 0
VAR width INIT 0
VAR widthClass INIT .F.
VAR width INIT 0
VAR widthClass INIT .F.
VAR bold INIT .F.
VAR weightClass INIT FW_DONTCARE
VAR bold INIT .F.
VAR weightClass INIT WIN_FW_DONTCARE
VAR italic INIT .F.
VAR strikeout INIT .F.
VAR underscore INIT .F.
VAR codePage INIT DEFAULT_CHARSET
VAR italic INIT .F.
VAR strikeout INIT .F.
VAR underscore INIT .F.
VAR codePage INIT WIN_DEFAULT_CHARSET
VAR fixed INIT .F.
VAR antiAliased INIT .F.
VAR fixed INIT .F.
VAR antiAliased INIT .F.
VAR compoundName INIT ""
VAR compoundName INIT ""
METHOD setCompoundName( cName ) INLINE ::compoundName := cName
VAR generic INIT .T.
VAR generic INIT .T.
VAR baseLine INIT 0 READONLY
VAR dbcs INIT .F.
VAR kerning INIT .F.
VAR mbcs INIT .F.
VAR vector INIT .F.
VAR outlined INIT .F.
VAR baseLine INIT 0 READONLY
VAR dbcs INIT .F.
VAR kerning INIT .F.
VAR mbcs INIT .F.
VAR vector INIT .F.
VAR outlined INIT .F.
VAR aFontInfo INIT {}
VAR aFontInfo INIT {}
METHOD new( oPS )
METHOD create( cFontName )
@@ -470,7 +462,7 @@ CREATE CLASS WvgFont
ENDCLASS
METHOD new( oPS ) CLASS WvgFont
METHOD WvgFont:new( oPS )
__defaultNIL( @oPS, ::oPS )
@@ -478,7 +470,7 @@ METHOD new( oPS ) CLASS WvgFont
RETURN Self
METHOD create( cFontName ) CLASS WvgFont
METHOD WvgFont:create( cFontName )
__defaultNIL( @cFontName, ::familyName )
@@ -488,7 +480,7 @@ METHOD create( cFontName ) CLASS WvgFont
RETURN Self
METHOD configure( cFontName ) CLASS WvgFont
METHOD WvgFont:configure( cFontName )
__defaultNIL( @cFontName, ::familyName )
@@ -498,31 +490,28 @@ METHOD configure( cFontName ) CLASS WvgFont
RETURN Self
METHOD destroy() CLASS WvgFont
METHOD WvgFont:destroy()
IF ::hFont != NIL
Wvg_DeleteObject( ::hFont )
wvg_DeleteObject( ::hFont )
ENDIF
RETURN Self
METHOD list() CLASS WvgFont
METHOD WvgFont:list()
RETURN {}
LOCAL aList := {}
RETURN aList
METHOD createFont() CLASS WvgFont
METHOD WvgFont:createFont()
LOCAL aFont
IF ::hFont != NIL
Wvg_DeleteObject( ::hFont )
wvg_DeleteObject( ::hFont )
::hFont := NIL
ENDIF
IF ::oPS != NIL
::height := Wvg_PointSizeToHeight( ::oPS:hdc, ::nominalPointSize )
::height := wvg_PointSizeToHeight( ::oPS:hdc, ::nominalPointSize )
ENDIF
::aFontInfo := Array( 15 )
@@ -542,7 +531,7 @@ METHOD createFont() CLASS WvgFont
::aFontInfo[ 13 ] := DEFAULT_QUALITY
::aFontInfo[ 14 ] := NIL
aFont := Wvg_FontCreate( ::aFontInfo )
aFont := wvg_FontCreate( ::aFontInfo )
IF Empty( aFont[ 1 ] )
RETURN NIL

View File

@@ -80,7 +80,7 @@ CREATE CLASS WvgTabPage INHERIT WvgWindow
ENDCLASS
METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgTabPage
METHOD WvgTabPage:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::WvgWindow:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -90,7 +90,7 @@ METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgTabPa
RETURN Self
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgTabPage
METHOD WvgTabPage:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::WvgWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -100,7 +100,9 @@ METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgTa
IF ::clipSiblings
::style += WS_CLIPSIBLINGS
ENDIF
/* ::style += WS_DLGFRAME */
#if 0
::style += WS_DLGFRAME
#endif
::style += TCS_FOCUSNEVER
@@ -124,14 +126,13 @@ METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgTa
RETURN Self
METHOD handleEvent( nMessage, aNM ) CLASS WvgTabPage
METHOD WvgTabPage:handleEvent( nMessage, aNM )
LOCAL aHdr
DO CASE
CASE nMessage == HB_GTE_SETFOCUS
IF HB_ISBLOCK( ::sl_tabActivate )
RETURN EVENT_HANDELLED
ENDIF
@@ -143,21 +144,20 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgTabPage
RETURN EVENT_HANDELLED
CASE nMessage == HB_GTE_NOTIFY
aHdr := Wvg_GetNMHdrInfo( aNM[ 2 ] )
aHdr := wvg_GetNMHdrInfo( aNM[ 2 ] )
DO CASE
CASE aHdr[ NMH_code ] == - 551 /* TCN_SELCHANGE */
CASE aHdr[ NMH_code ] == -551 /* TCN_SELCHANGE */
ENDCASE
CASE nMessage == HB_GTE_CTLCOLOR
RETURN Wvg_GetStockObject( NULL_BRUSH )
RETURN wvg_GetStockObject( NULL_BRUSH )
ENDCASE
RETURN EVENT_UNHANDELLED
METHOD tabActivate( xParam ) CLASS WvgTabPage
METHOD WvgTabPage:tabActivate( xParam )
IF HB_ISBLOCK( xParam )
::sl_tabActivate := xParam
@@ -165,26 +165,26 @@ METHOD tabActivate( xParam ) CLASS WvgTabPage
RETURN self
METHOD minimize() CLASS WvgTabPage
METHOD WvgTabPage:minimize()
::hide()
RETURN .F.
METHOD maximize() CLASS WvgTabPage
METHOD WvgTabPage:maximize()
::show()
RETURN .T.
METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgTabPage
METHOD WvgTabPage:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::Initialize( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
RETURN Self
METHOD destroy() CLASS WvgTabPage
METHOD PROCEDURE WvgTabPage:destroy()
::wvgWindow:destroy()
RETURN NIL
RETURN

View File

@@ -112,8 +112,8 @@ METHOD WvgToolBar:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::WvgWindow:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
#if 0
+ TBSTYLE_LIST caption TO the right, OTHERWISE caption TO the bottom
::style := WS_CHILD + TBSTYLE_FLAT + CCS_ADJUSTABLE + CCS_NODIVIDER + CCS_VERT
/* + TBSTYLE_LIST caption to the right, otherwise caption to the bottom */
::style := WIN_WS_CHILD + TBSTYLE_FLAT + CCS_ADJUSTABLE + CCS_NODIVIDER + CCS_VERT
#endif
::exStyle := TBSTYLE_EX_DOUBLEBUFFER + TBSTYLE_EX_MIXEDBUTTONS
@@ -167,7 +167,9 @@ METHOD WvgToolBar:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::SendToolbarMessage( TB_SETIMAGELIST, ::hImageList )
::SendToolbarMessage( TB_BUTTONSTRUCTSIZE )
/* ::SendToolbarMessage( TB_SETINDENT, 10 ) */
#if 0
::SendToolbarMessage( TB_SETINDENT, 10 )
#endif
ENDIF
IF ::visible
@@ -193,7 +195,7 @@ METHOD WvgToolBar:handleEvent( nMessage, aNM )
EXIT
CASE HB_GTE_NOTIFY
aNMMouse := Wvg_GetNMMouseInfo( aNM[ 2 ] )
aNMMouse := wvg_GetNMMouseInfo( aNM[ 2 ] )
DO CASE
@@ -203,7 +205,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 ], , Self )
ENDIF
ENDIF
@@ -219,20 +221,20 @@ METHOD WvgToolBar:handleEvent( nMessage, aNM )
RETURN EVENT_UNHANDELLED
METHOD WvgToolBar:destroy()
METHOD PROCEDURE WvgToolBar:destroy()
LOCAL i, nItems
IF ( nItems := Len( ::aItems ) ) > 0
FOR i := 1 TO nItems
IF ::aItems[ i, 2 ]:image != NIL
Wvg_DeleteObject( ::aItems[ i, 2 ]:image )
wvg_DeleteObject( ::aItems[ i, 2 ]:image )
ENDIF
IF ::aItems[ i, 2 ]:disabledImage != NIL
Wvg_DeleteObject( ::aItems[ i, 2 ]:disabledImage )
wvg_DeleteObject( ::aItems[ i, 2 ]:disabledImage )
ENDIF
IF ::aItems[ i, 2 ]:hotImage != NIL
Wvg_DeleteObject( ::aItems[ i, 2 ]:hotImage )
wvg_DeleteObject( ::aItems[ i, 2 ]:hotImage )
ENDIF
NEXT
ENDIF
@@ -243,7 +245,7 @@ METHOD WvgToolBar:destroy()
::wvgWindow:destroy()
RETURN NIL
RETURN
METHOD WvgToolBar:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -252,8 +254,7 @@ METHOD WvgToolBar:configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible
RETURN Self
METHOD WvgToolBar:sendToolbarMessage( nMsg, p1, p2 )
RETURN Wvg_SendToolBarMessage( ::pWnd, nMsg, p1, p2 )
RETURN wvg_SendToolBarMessage( ::pWnd, nMsg, p1, p2 )
METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nStyle, cKey, nMapRGB )
@@ -263,7 +264,7 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
HB_SYMBOL_UNUSED( xHotImage )
HB_SYMBOL_UNUSED( cDLL )
/* Issue this at the begining of first item */
/* Issue this at the beginning of first item */
IF ! ::lSized
#if 0
::SendToolbarMessage( TB_SETBUTTONWIDTH, ::buttonWidth, ::buttonWidth )
@@ -283,14 +284,14 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
"\" $ xImage .OR. ;
":" $ xImage .OR. ;
hb_FileExists( xImage )
pBitmap := Wvg_PrepareBitmapFromFile( xImage, ::imageWidth, ::imageHeight, .T., ::hWnd )
pBitmap := wvg_PrepareBitmapFromFile( xImage, ::imageWidth, ::imageHeight, .T., ::hWnd )
ELSE
pBitmap := Wvg_PrepareBitmapFromResourceName( xImage, ::imageWidth, ::imageHeight, .T., ::hWnd )
pBitmap := wvg_PrepareBitmapFromResourceName( xImage, ::imageWidth, ::imageHeight, .T., ::hWnd )
ENDIF
EXIT
CASE "N"
pBitmap := Wvg_PrepareBitmapFromResourceId( xImage, ::imageWidth, ::imageHeight, .T., ::hWnd )
pBitmap := wvg_PrepareBitmapFromResourceId( xImage, ::imageWidth, ::imageHeight, .T., ::hWnd )
EXIT
CASE "P"
@@ -308,21 +309,20 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
nBtn := wapi_ImageList_Add( ::hImageList, pBitmap )
ENDIF
IF ! HB_ISPOINTER( xImage )
Wvg_DeleteObject( pBitmap )
wvg_DeleteObject( pBitmap )
ENDIF
Wvg_AddToolBarButton( ::pWnd, nBtn, oBtn:caption, oBtn:command, 1, ::showToolTips )
wvg_AddToolBarButton( ::pWnd, nBtn, oBtn:caption, oBtn:command, 1, ::showToolTips )
/* Set Button Size */
::SendToolbarMessage( TB_SETBUTTONSIZE, ::buttonWidth, ::buttonHeight )
#if 0
SendMessage( hWndTB, TB_SETPADDING, ( WPARAM ) 0, ( LPARAM ) MAKELPARAM( 10, 10 ) );
::sendToolbarMessage( TB_SETPADDING, 10, 10 )
::sendToolbarMessage( TB_SETPADDING, 10, 10 )
#endif
::sendToolbarMessage( TB_AUTOSIZE )
ELSE
Wvg_AddToolBarButton( ::pWnd, , , oBtn:command, 3, .F. )
wvg_AddToolBarButton( ::pWnd, , , oBtn:command, 3, .F. )
ENDIF
@@ -331,35 +331,27 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
RETURN oBtn
METHOD WvgToolBar:delItem()
RETURN Self
METHOD WvgToolBar:getItem()
RETURN Self
METHOD WvgToolBar:clear()
RETURN Self
METHOD WvgToolBar:customize()
RETURN Self
METHOD WvgToolBar:loadImageSet()
RETURN Self
METHOD WvgToolBar:saveToolbar()
RETURN Self
METHOD WvgToolBar:restToolbar()
RETURN Self
METHOD WvgToolBar:setPosAndSize()
RETURN Self
METHOD WvgToolBar:setSize()
@@ -400,9 +392,7 @@ METHOD WvgToolBar:buttonDropDown( xParam )
RETURN Self
/*
* WvgToolBarButton() Class compatible with XbpToolbarButton()
*/
/* WvgToolBarButton() Class compatible with XbpToolbarButton() */
CREATE CLASS WvgToolBarButton
VAR enabled INIT .T.

View File

@@ -94,10 +94,10 @@ CREATE CLASS WvgTreeView INHERIT WvgWindow, WvgDataRef
VAR textItemSelected INIT ""
METHOD getSelectionInfo( nlParam )
METHOD setColorFG( nRGB ) INLINE Wvg_TreeView_SetTextColor( ::hWnd, iif( HB_ISSTRING( nRGB ), Wvt_GetRGBColorByString( nRGB, 0 ), nRGB ) )
METHOD setColorBG( nRGB ) INLINE Wvg_TreeView_SetBkColor( ::hWnd, iif( HB_ISSTRING( nRGB ), Wvt_GetRGBColorByString( nRGB, 1 ), nRGB ) )
METHOD setColorLines( nRGB ) INLINE Wvg_TreeView_SetLineColor( ::hWnd, nRGB )
METHOD showExpanded( lExpanded, nLevels ) INLINE Wvg_TreeView_ShowExpanded( ::hWnd, ;
METHOD setColorFG( nRGB ) INLINE wvg_TreeView_SetTextColor( ::hWnd, iif( HB_ISSTRING( nRGB ), wvt_GetRGBColorByString( nRGB, 0 ), nRGB ) )
METHOD setColorBG( nRGB ) INLINE wvg_TreeView_SetBkColor( ::hWnd, iif( HB_ISSTRING( nRGB ), wvt_GetRGBColorByString( nRGB, 1 ), nRGB ) )
METHOD setColorLines( nRGB ) INLINE wvg_TreeView_SetLineColor( ::hWnd, nRGB )
METHOD showExpanded( lExpanded, nLevels ) INLINE wvg_TreeView_ShowExpanded( ::hWnd, ;
iif( HB_ISNIL( lExpanded ), .F., lExpanded ), nLevels )
ENDCLASS
@@ -161,13 +161,13 @@ METHOD WvgTreeView:handleEvent( nMessage, aNM )
CASE HB_GTE_COMMAND
IF HB_ISBLOCK( ::sl_lbClick )
Eval( ::sl_lbClick, NIL, NIL, self )
Eval( ::sl_lbClick, , , Self )
RETURN EVENT_HANDELLED
ENDIF
EXIT
CASE HB_GTE_NOTIFY
aHdr := Wvg_GetNMTreeViewInfo( aNM[ 2 ] )
aHdr := wvg_GetNMTreeViewInfo( aNM[ 2 ] )
DO CASE
CASE aHdr[ NMH_code ] == NM_DBLCLK .OR. aHdr[ NMH_code ] == NM_RETURN
@@ -213,13 +213,13 @@ METHOD WvgTreeView:handleEvent( nMessage, aNM )
#if 0 /* It must never reach here */
CASE HB_GTE_ANY
IF aNM[ 1 ] == WM_LBUTTONDOWN
aHdr := Wvg_GetNMTreeViewInfo( aNM[ 3 ] )
aHdr := wvg_GetNMTreeViewInfo( aNM[ 3 ] )
::getSelectionInfo( aNM[ 2 ] )
IF HB_ISBLOCK( ::sl_lbClick )
IF ::isParentCrt()
::oParent:setFocus()
ENDIF
Eval( ::sl_lbClick, NIL, NIL, Self )
Eval( ::sl_lbClick, , , Self )
IF ::isParentCrt()
::setFocus()
ENDIF
@@ -246,11 +246,11 @@ METHOD WvgTreeView:handleEvent( nMessage, aNM )
RETURN EVENT_UNHANDELLED
METHOD WvgTreeView:destroy()
METHOD PROCEDURE WvgTreeView:destroy()
::wvgWindow:destroy()
RETURN NIL
RETURN
METHOD WvgTreeView:getSelectionInfo( nlParam )
@@ -259,7 +259,7 @@ METHOD WvgTreeView:getSelectionInfo( nlParam )
LOCAL cText := Space( 20 )
LOCAL n
Wvg_TreeView_GetSelectionInfo( ::hWnd, nlParam, @cParent, @cText, @hParentOfSelected, @hItemSelected )
wvg_TreeView_GetSelectionInfo( ::hWnd, nlParam, @cParent, @cText, @hParentOfSelected, @hItemSelected )
::hParentSelected := hParentOfSelected
::hItemSelected := hItemSelected
@@ -341,7 +341,7 @@ CREATE CLASS WvgTreeViewItem
METHOD configure()
METHOD destroy()
METHOD Expand( lExpand ) INLINE Wvg_TreeView_Expand( ::hTree, ::hItem, ;
METHOD Expand( lExpand ) INLINE wvg_TreeView_Expand( ::hTree, ::hItem, ;
iif( HB_ISLOGICAL( lExpand ), lExpand, .T. ) )
METHOD isExpanded()
METHOD setCaption( cCaption )
@@ -357,51 +357,46 @@ CREATE CLASS WvgTreeViewItem
ENDCLASS
METHOD new() CLASS WvgTreeViewItem
METHOD WvgTreeViewItem:new()
RETURN Self
METHOD create() CLASS WvgTreeViewItem
METHOD WvgTreeViewItem:create()
RETURN Self
METHOD configure() CLASS WvgTreeViewItem
METHOD WvgTreeViewItem:configure()
RETURN Self
METHOD destroy() CLASS WvgTreeViewItem
METHOD PROCEDURE WvgTreeViewItem:destroy()
RETURN
RETURN NIL
METHOD PROCEDURE WvgTreeViewItem:isExpanded()
RETURN
METHOD isExpanded() CLASS WvgTreeViewItem
RETURN NIL
METHOD setCaption( cCaption ) CLASS WvgTreeViewItem
METHOD PROCEDURE WvgTreeViewItem:setCaption( cCaption )
HB_SYMBOL_UNUSED( cCaption )
RETURN NIL
RETURN
METHOD setExpandedImage( nResIdoBitmap ) CLASS WvgTreeViewItem
METHOD PROCEDURE WvgTreeViewItem:setExpandedImage( nResIdoBitmap )
HB_SYMBOL_UNUSED( nResIdoBitmap )
RETURN NIL
RETURN
METHOD setImage( nResIdoBitmap ) CLASS WvgTreeViewItem
METHOD PROCEDURE WvgTreeViewItem:setImage( nResIdoBitmap )
HB_SYMBOL_UNUSED( nResIdoBitmap )
RETURN NIL
RETURN
METHOD setMarkedImage( nResIdoBitmap ) CLASS WvgTreeViewItem
METHOD PROCEDURE WvgTreeViewItem:setMarkedImage( nResIdoBitmap )
HB_SYMBOL_UNUSED( nResIdoBitmap )
RETURN NIL
RETURN
METHOD addItem( cCaption ) CLASS WvgTreeViewItem
METHOD WvgTreeViewItem:addItem( cCaption )
LOCAL oItem, hParent
@@ -414,24 +409,20 @@ METHOD addItem( cCaption ) CLASS WvgTreeViewItem
hParent := iif( HB_ISOBJECT( oItem:oParent ), oItem:oParent:hItem, NIL )
oItem:hItem := Wvg_TreeView_AddItem( oItem:hTree, hParent, oItem:caption )
oItem:hItem := wvg_TreeView_AddItem( oItem:hTree, hParent, oItem:caption )
AAdd( oItem:oWnd:aItems, oItem )
RETURN oItem
METHOD delItem() CLASS WvgTreeViewItem
METHOD PROCEDURE WvgTreeViewItem:delItem()
RETURN
RETURN NIL
METHOD PROCEDURE WvgTreeViewItem:getChildItems()
RETURN
METHOD getChildItems() CLASS WvgTreeViewItem
METHOD PROCEDURE WvgTreeViewItem:getParentItem()
RETURN
RETURN NIL
METHOD getParentItem() CLASS WvgTreeViewItem
RETURN NIL
METHOD insItem() CLASS WvgTreeViewItem
RETURN NIL
METHOD PROCEDURE WvgTreeViewItem:insItem()
RETURN

View File

@@ -66,21 +66,21 @@
CREATE CLASS WvgWindow INHERIT WvgPartHandler
/* CONFIGURATION */
VAR animate INIT .F.
VAR clipChildren INIT .F.
VAR clipParent INIT .F.
VAR clipSiblings INIT .T.
VAR group INIT 0 /* XBP_NO_GROUP */
VAR sizeRedraw INIT .F.
VAR tabStop INIT .F.
VAR visible INIT .T.
VAR animate INIT .F.
VAR clipChildren INIT .F.
VAR clipParent INIT .F.
VAR clipSiblings INIT .T.
VAR group INIT 0 /* XBP_NO_GROUP */
VAR sizeRedraw INIT .F.
VAR tabStop INIT .F.
VAR visible INIT .T.
VAR pointerFocus INIT .T.
VAR pointerFocus INIT .T.
/* RUNTIME VAR */
VAR dropZone INIT .F.
VAR dropZone INIT .F.
VAR helpLink
VAR s_tooltipText INIT ""
VAR s_tooltipText INIT ""
METHOD tooltipText SETGET
VAR clr_FG
@@ -124,32 +124,32 @@ CREATE CLASS WvgWindow INHERIT WvgPartHandler
VAR sl_killDisplayFocus
VAR hBrushBG
VAR is_hidden INIT .F.
VAR is_enabled INIT .T.
VAR title INIT " "
VAR icon INIT 0
VAR closable INIT .T.
VAR resizable INIT .T.
VAR resizeMode INIT 0
VAR style INIT WS_OVERLAPPEDWINDOW
VAR exStyle INIT 0
VAR lModal INIT .F.
VAR is_hidden INIT .F.
VAR is_enabled INIT .T.
VAR title INIT " "
VAR icon INIT 0
VAR closable INIT .T.
VAR resizable INIT .T.
VAR resizeMode INIT 0
VAR style INIT WIN_WS_OVERLAPPEDWINDOW
VAR exStyle INIT 0
VAR lModal INIT .F.
VAR pGTp
VAR pGT
VAR objType INIT objTypeNone
VAR className INIT ""
VAR objType INIT objTypeNone
VAR className INIT ""
VAR hWnd
VAR pWnd
VAR aPos INIT { 0, 0 }
VAR aSize INIT { 0, 0 }
VAR aPresParams INIT {}
VAR lHasInputFocus INIT .F.
VAR nFrameState INIT 0 /* normal */
VAR aPos INIT { 0, 0 }
VAR aSize INIT { 0, 0 }
VAR aPresParams INIT {}
VAR lHasInputFocus INIT .F.
VAR nFrameState INIT 0 /* normal */
VAR maxCol INIT 79
VAR maxRow INIT 24
VAR mouseMode INIT 1
VAR maxCol INIT 79
VAR maxRow INIT 24
VAR mouseMode INIT 1
VAR nID INIT 0
VAR nControlID INIT 5000
@@ -208,7 +208,7 @@ CREATE CLASS WvgWindow INHERIT WvgPartHandler
METHOD HandleEvent() INLINE EVENT_UNHANDELLED
METHOD isEnabled() INLINE ::is_enabled
METHOD isVisible() INLINE ! ::is_hidden
METHOD setColorFG( nRGB ) INLINE ::clr_FG := iif( HB_ISSTRING( nRGB ), Wvt_GetRGBColorByString( nRGB, 0 ), nRGB ), ::invalidateRect()
METHOD setColorFG( nRGB ) INLINE ::clr_FG := iif( HB_ISSTRING( nRGB ), wvt_GetRGBColorByString( nRGB, 0 ), nRGB ), ::invalidateRect()
METHOD enter( xParam ) SETGET
METHOD leave( xParam ) SETGET
@@ -245,7 +245,7 @@ CREATE CLASS WvgWindow INHERIT WvgPartHandler
PROTECTED:
METHOD getPosAndSize( aPs, aSz )
METHOD isParentCrt() INLINE ( ::oParent:objType == objTypeCrt )
METHOD isParentCrt() INLINE ::oParent:objType == objTypeCrt
METHOD rePosition()
METHOD createControl()
@@ -288,7 +288,7 @@ METHOD WvgWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::visible := lVisible
IF Empty( ::oParent )
IF !( __objGetClsName( Self ) $ "WVGCRT,WVGDIALOG" )
IF ! ::ClassName() $ "WVGCRT,WVGDIALOG"
::oParent := WvgSetAppWindow()
ENDIF
ENDIF
@@ -319,17 +319,17 @@ METHOD WvgWindow:destroy()
::aChildren := {}
ENDIF
Wvg_ReleaseWindowProcBlock( ::pWnd )
wvg_ReleaseWindowProcBlock( ::pWnd )
IF Wvg_IsWindow( ::hWndTT )
Wvg_DestroyWindow( ::hWndTT )
IF wvg_IsWindow( ::hWndTT )
wvg_DestroyWindow( ::hWndTT )
ENDIF
IF Wvg_IsWindow( ::hWnd )
Wvg_DestroyWindow( ::hWnd )
IF wvg_IsWindow( ::hWnd )
wvg_DestroyWindow( ::hWnd )
ENDIF
IF ::hBrushBG != NIL
Wvg_DeleteObject( ::hBrushBG )
wvg_DeleteObject( ::hBrushBG )
ENDIF
::hWnd := NIL
@@ -398,17 +398,16 @@ METHOD WvgWindow:destroy()
METHOD WvgWindow:SetWindowProcCallback()
::nOldProc := Wvg_SetWindowProcBlock( ::pWnd, {| h, m, w, l | ::ControlWndProc( h, m, w, l ) } )
::nOldProc := wvg_SetWindowProcBlock( ::pWnd, {| h, m, w, l | ::ControlWndProc( h, m, w, l ) } )
RETURN Self
METHOD WvgWindow:captureMouse()
RETURN Self
METHOD WvgWindow:disable()
IF Wvg_EnableWindow( ::hWnd, .F. )
IF wvg_EnableWindow( ::hWnd, .F. )
::is_enabled := .F.
RETURN .T.
ENDIF
@@ -417,7 +416,7 @@ METHOD WvgWindow:disable()
METHOD WvgWindow:enable()
IF Wvg_EnableWindow( ::hWnd, .T. )
IF wvg_EnableWindow( ::hWnd, .T. )
::is_enabled := .T.
RETURN .T.
ENDIF
@@ -426,8 +425,8 @@ METHOD WvgWindow:enable()
METHOD WvgWindow:hide()
IF Wvg_IsWindow( ::hWnd )
Wvg_ShowWindow( ::hWnd, SW_HIDE )
IF wvg_IsWindow( ::hWnd )
wvg_ShowWindow( ::hWnd, SW_HIDE )
::is_hidden := .T.
ENDIF
@@ -435,14 +434,12 @@ METHOD WvgWindow:hide()
METHOD WvgWindow:invalidateRect( aRect )
RETURN Wvg_InvalidateRect( ::hWnd, aRect )
RETURN wvg_InvalidateRect( ::hWnd, aRect )
METHOD WvgWindow:lockPS()
RETURN Self
METHOD WvgWindow:lockUpdate()
RETURN Self
METHOD WvgWindow:setColorBG( nRGB )
@@ -450,16 +447,16 @@ METHOD WvgWindow:setColorBG( nRGB )
LOCAL hBrush
IF HB_ISSTRING( nRGB )
nRGB := Wvt_GetRGBColorByString( nRGB, 1 )
nRGB := wvt_GetRGBColorByString( nRGB, 1 )
ENDIF
IF HB_ISNUMERIC( nRGB )
hBrush := Wvg_CreateBrush( BS_SOLID, nRGB, 0 )
hBrush := wvg_CreateBrush( BS_SOLID, nRGB, 0 )
IF hBrush != 0
::clr_BG := nRGB
::hBrushBG := hBrush
IF ::className() == "WVGDIALOG" .OR. __objGetClsName( Self ) == "WVGCHECKBOX"
Wvg_SetCurrentBrush( ::hWnd, ::hBrushBG )
wvg_SetCurrentBrush( ::hWnd, ::hBrushBG )
ENDIF
ENDIF
ENDIF
@@ -467,15 +464,12 @@ METHOD WvgWindow:setColorBG( nRGB )
RETURN Self
METHOD WvgWindow:setModalState()
RETURN Self
METHOD WvgWindow:setPointer()
RETURN Self
METHOD WvgWindow:setTrackPointer()
RETURN Self
METHOD WvgWindow:setPos( aPos, lPaint )
@@ -492,7 +486,7 @@ METHOD WvgWindow:setPos( aPos, lPaint )
OTHERWISE
aPosSz := ::getPosAndSize( aPos )
Wvg_SetWindowPosition( ::hWnd, aPosSz[ 1 ], aPosSz[ 2 ], lPaint )
wvg_SetWindowPosition( ::hWnd, aPosSz[ 1 ], aPosSz[ 2 ], lPaint )
ENDSWITCH
ENDIF
@@ -500,7 +494,6 @@ METHOD WvgWindow:setPos( aPos, lPaint )
RETURN Self
METHOD WvgWindow:rePosition() /* This will always be called from HB_GTE_RESIZED message of WVG engine */
RETURN ::setPosAndSize( ::aPos, ::aSize )
METHOD WvgWindow:setPosAndSize( aPos, aSize, lPaint )
@@ -520,7 +513,7 @@ METHOD WvgWindow:setPosAndSize( aPos, aSize, lPaint )
OTHERWISE
aPosSz := ::getPosAndSize( aPos, aSize )
Wvg_SetWindowPosAndSize( ::hWnd, aPosSz[ 1 ], aPosSz[ 2 ], aPosSz[ 3 ], aPosSz[ 4 ], lPaint )
wvg_SetWindowPosAndSize( ::hWnd, aPosSz[ 1 ], aPosSz[ 2 ], aPosSz[ 3 ], aPosSz[ 4 ], lPaint )
ENDSWITCH
ENDIF
@@ -541,7 +534,7 @@ METHOD WvgWindow:setSize( aSize, lPaint )
OTHERWISE
aPosSz := ::getPosAndSize( , aSize )
Wvg_SetWindowSize( ::hWnd, aPosSz[ 3 ], aPosSz[ 4 ], lPaint )
wvg_SetWindowSize( ::hWnd, aPosSz[ 3 ], aPosSz[ 4 ], lPaint )
ENDSWITCH
ENDIF
@@ -570,32 +563,25 @@ METHOD WvgWindow:isDerivedFrom( cClassORoObject )
METHOD WvgWindow:show()
Wvg_ShowWindow( ::hWnd, SW_NORMAL )
wvg_ShowWindow( ::hWnd, SW_NORMAL )
::is_hidden := .F.
::lHasInputFocus := .T.
RETURN Self
METHOD WvgWindow:toBack()
RETURN Wvg_SetWindowPosToBack( ::hWnd )
RETURN wvg_SetWindowPosToBack( ::hWnd )
METHOD WvgWindow:toFront()
/*RETURN Wvg_SetForegroundWindow( ::hWnd ) */
RETURN Wvg_SetWindowPosToTop( ::hWnd )
RETURN wvg_SetWindowPosToTop( ::hWnd )
METHOD WvgWindow:unlockPS()
RETURN Self
METHOD WvgWindow:winDevice()
RETURN Self
METHOD WvgWindow:SetFont()
RETURN Self
METHOD WvgWindow:setFontCompoundName( xFont )
@@ -638,12 +624,11 @@ METHOD WvgWindow:setFontCompoundName( xFont )
RETURN cOldFont
METHOD WvgWindow:setPresParam()
RETURN Self
METHOD WvgWindow:currentPos()
LOCAL aRect := Wvg_GetWindowRect( ::hWnd )
LOCAL aRect := wvg_GetWindowRect( ::hWnd )
RETURN { aRect[ 1 ], aRect[ 2 ] }
@@ -651,26 +636,23 @@ METHOD WvgWindow:currentSize()
LOCAL aRect
aRect := Wvg_GetClientRect( ::hWnd )
aRect := wvg_GetClientRect( ::hWnd )
RETURN { aRect[ 3 ] - aRect[ 1 ], aRect[ 4 ] - aRect[ 2 ] }
METHOD WvgWindow:getHWND()
RETURN ::hWnd
METHOD WvgWindow:getModalState()
RETURN Self
METHOD WvgWindow:hasInputFocus()
RETURN Self
METHOD WvgWindow:enter( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_enter )
Eval( ::sl_enter, xParam, NIL, Self )
Eval( ::sl_enter, xParam, , Self )
RETURN Self
ENDIF
@@ -684,7 +666,7 @@ METHOD WvgWindow:enter( xParam )
METHOD WvgWindow:leave( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_leave )
Eval( ::sl_leave, NIL, NIL, Self )
Eval( ::sl_leave, , , Self )
RETURN Self
ENDIF
@@ -698,7 +680,7 @@ METHOD WvgWindow:leave( xParam )
METHOD WvgWindow:lbClick( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_lbClick )
Eval( ::sl_lbClick, xParam, NIL, Self )
Eval( ::sl_lbClick, xParam, , Self )
RETURN Self
ENDIF
@@ -712,7 +694,7 @@ METHOD WvgWindow:lbClick( xParam )
METHOD WvgWindow:lbDblClick( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_lbDblClick )
Eval( ::sl_lbDblClick, xParam, NIL, Self )
Eval( ::sl_lbDblClick, xParam, , Self )
RETURN Self
ENDIF
@@ -726,7 +708,7 @@ METHOD WvgWindow:lbDblClick( xParam )
METHOD WvgWindow:lbDown( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_lbDown )
Eval( ::sl_lbDown, xParam, NIL, Self )
Eval( ::sl_lbDown, xParam, , Self )
RETURN Self
ENDIF
@@ -740,7 +722,7 @@ METHOD WvgWindow:lbDown( xParam )
METHOD WvgWindow:lbUp( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_lbUp )
Eval( ::sl_lbUp, xParam, NIL, Self )
Eval( ::sl_lbUp, xParam, , Self )
RETURN Self
ENDIF
@@ -754,7 +736,7 @@ METHOD WvgWindow:lbUp( xParam )
METHOD WvgWindow:mbClick( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_mbClick )
Eval( ::sl_mbClick, xParam, NIL, Self )
Eval( ::sl_mbClick, xParam, , Self )
RETURN Self
ENDIF
@@ -768,7 +750,7 @@ METHOD WvgWindow:mbClick( xParam )
METHOD WvgWindow:mbDblClick( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_mbDblClick )
Eval( ::sl_mbDblClick, xParam, NIL, Self )
Eval( ::sl_mbDblClick, xParam, , Self )
RETURN Self
ENDIF
@@ -782,7 +764,7 @@ METHOD WvgWindow:mbDblClick( xParam )
METHOD WvgWindow:mbDown( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_mbDown )
Eval( ::sl_mbDown, xParam, NIL, Self )
Eval( ::sl_mbDown, xParam, , Self )
RETURN Self
ENDIF
@@ -796,7 +778,7 @@ METHOD WvgWindow:mbDown( xParam )
METHOD WvgWindow:mbUp( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_mbUp )
Eval( ::sl_mbUp, xParam, NIL, Self )
Eval( ::sl_mbUp, xParam, , Self )
RETURN Self
ENDIF
@@ -810,7 +792,7 @@ METHOD WvgWindow:mbUp( xParam )
METHOD WvgWindow:motion( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_motion )
Eval( ::sl_motion, xParam, NIL, Self )
Eval( ::sl_motion, xParam, , Self )
RETURN Self
ENDIF
@@ -824,7 +806,7 @@ METHOD WvgWindow:motion( xParam )
METHOD WvgWindow:rbClick( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_rbClick )
Eval( ::sl_rbClick, xParam, NIL, Self )
Eval( ::sl_rbClick, xParam, , Self )
RETURN Self
ENDIF
@@ -838,7 +820,7 @@ METHOD WvgWindow:rbClick( xParam )
METHOD WvgWindow:rbDblClick( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_rbDblClick )
Eval( ::sl_rbDblClick, xParam, NIL, Self )
Eval( ::sl_rbDblClick, xParam, , Self )
RETURN Self
ENDIF
@@ -852,7 +834,7 @@ METHOD WvgWindow:rbDblClick( xParam )
METHOD WvgWindow:rbDown( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_rbDown )
Eval( ::sl_rbDown, xParam, NIL, Self )
Eval( ::sl_rbDown, xParam, , Self )
RETURN Self
ENDIF
@@ -866,7 +848,7 @@ METHOD WvgWindow:rbDown( xParam )
METHOD WvgWindow:rbUp( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_rbUp )
Eval( ::sl_rbUp, xParam, NIL, Self )
Eval( ::sl_rbUp, xParam, , Self )
RETURN Self
ENDIF
@@ -880,7 +862,7 @@ METHOD WvgWindow:rbUp( xParam )
METHOD WvgWindow:wheel( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_wheel )
Eval( ::sl_wheel, xParam, NIL, Self )
Eval( ::sl_wheel, xParam, , Self )
RETURN Self
ENDIF
@@ -895,7 +877,7 @@ METHOD WvgWindow:close( xParam )
if ::objType == objTypeCrt
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::sl_close )
Eval( ::sl_close, NIL, NIL, Self )
Eval( ::sl_close, , , Self )
RETURN Self
ENDIF
@@ -910,7 +892,7 @@ METHOD WvgWindow:close( xParam )
METHOD WvgWindow:helpRequest( xParam )
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::sl_helpRequest )
Eval( ::sl_helpRequest, NIL, NIL, Self )
Eval( ::sl_helpRequest, , , Self )
RETURN Self
ENDIF
@@ -924,7 +906,7 @@ METHOD WvgWindow:helpRequest( xParam )
METHOD WvgWindow:keyboard( xParam )
IF HB_ISNUMERIC( xParam ) .AND. HB_ISBLOCK( ::sl_keyboard )
Eval( ::sl_keyboard, xParam, NIL, Self )
Eval( ::sl_keyboard, xParam, , Self )
RETURN Self
ENDIF
@@ -939,7 +921,7 @@ METHOD WvgWindow:killDisplayFocus( xParam )
if ::objType == objTypeCrt
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::sl_killDisplayFocus )
Eval( ::sl_killDisplayFocus, NIL, NIL, Self )
Eval( ::sl_killDisplayFocus, , , Self )
RETURN Self
ENDIF
@@ -954,7 +936,7 @@ METHOD WvgWindow:killDisplayFocus( xParam )
METHOD WvgWindow:killInputFocus( xParam )
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::sl_killInputFocus )
Eval( ::sl_killInputFocus, NIL, NIL, Self )
Eval( ::sl_killInputFocus, , , Self )
RETURN Self
ENDIF
@@ -968,7 +950,7 @@ METHOD WvgWindow:killInputFocus( xParam )
METHOD WvgWindow:move( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_move )
Eval( ::sl_move, xParam, NIL, Self )
Eval( ::sl_move, xParam, , Self )
RETURN Self
ENDIF
@@ -982,7 +964,7 @@ METHOD WvgWindow:move( xParam )
METHOD WvgWindow:paint( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_paint )
Eval( ::sl_paint, xParam, NIL, Self )
Eval( ::sl_paint, xParam, , Self )
RETURN Self
ENDIF
@@ -1025,7 +1007,7 @@ METHOD WvgWindow:setDisplayFocus( xParam )
if ::objType == objTypeCrt
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::setDisplayFocus )
Eval( ::setDisplayFocus, NIL, NIL, Self )
Eval( ::setDisplayFocus, , , Self )
RETURN Self
ENDIF
@@ -1040,7 +1022,7 @@ METHOD WvgWindow:setDisplayFocus( xParam )
METHOD WvgWindow:setInputFocus( xParam )
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::sl_setInputFocus )
Eval( ::sl_setInputFocus, NIL, NIL, Self )
Eval( ::sl_setInputFocus, , , Self )
RETURN Self
ENDIF
@@ -1068,7 +1050,7 @@ METHOD WvgWindow:dragEnter( xParam, xParam1 )
METHOD WvgWindow:dragMotion( xParam )
IF HB_ISARRAY( xParam ) .AND. HB_ISBLOCK( ::sl_dragMotion )
Eval( ::sl_dragMotion, xParam, NIL, Self )
Eval( ::sl_dragMotion, xParam, , Self )
RETURN Self
ENDIF
@@ -1082,7 +1064,7 @@ METHOD WvgWindow:dragMotion( xParam )
METHOD WvgWindow:dragLeave( xParam )
IF HB_ISNIL( xParam ) .AND. HB_ISBLOCK( ::sl_dragLeave )
Eval( ::sl_dragLeave, NIL, NIL, Self )
Eval( ::sl_dragLeave, , , Self )
RETURN Self
ENDIF
@@ -1127,13 +1109,12 @@ METHOD WvgWindow:Initialize( oParent, oOwner, aPos, aSize, aPresParams, lVisible
METHOD WvgWindow:setFocus()
Wvg_SetFocus( ::hWnd )
wvg_SetFocus( ::hWnd )
RETURN Self
METHOD WvgWindow:sendMessage( nMessage, nlParam, nwParam )
RETURN Wvg_SendMessage( ::hWnd, nMessage, nlParam, nwParam )
RETURN wvg_SendMessage( ::hWnd, nMessage, nlParam, nwParam )
METHOD WvgWindow:findObjectByHandle( hWnd )
@@ -1190,9 +1171,9 @@ METHOD WvgWindow:getPosAndSize( aPs, aSz )
IF nH < 1
nH := 0
ENDIF
aXY := Wvt_GetXYFromRowCol( nY, nX )
nFH := Wvt_GetFontInfo()[ 6 ]
nFW := Wvt_GetFontInfo()[ 7 ]
aXY := wvt_GetXYFromRowCol( nY, nX )
nFH := wvt_GetFontInfo()[ 6 ]
nFW := wvt_GetFontInfo()[ 7 ]
RETURN { aXY[ 1 ], aXY[ 2 ], nW * nFW, nH * nFH }
ENDIF
ENDIF
@@ -1203,8 +1184,8 @@ METHOD WvgWindow:toolTipText( cText )
IF HB_ISSTRING( cText )
::s_toolTipText := cText
IF Wvg_IsWindow( ::hWndTT )
Wvg_SetToolTipText( ::hWnd, ::hWndTT, ::s_toolTipText )
IF wvg_IsWindow( ::hWndTT )
wvg_SetToolTipText( ::hWnd, ::hWndTT, ::s_toolTipText )
ENDIF
ENDIF
@@ -1218,7 +1199,7 @@ METHOD WvgWindow:createControl()
aPosSz := ::getPosAndSize( ::aPos, ::aSize )
hWnd := Wvg_CreateWindowEx( ;
hWnd := wvg_CreateWindowEx( ;
::exStyle, ;
::className(), ;
"", ; /* window name */
@@ -1230,11 +1211,11 @@ METHOD WvgWindow:createControl()
NIL, ; /* hInstance */
NIL ) /* lParam */
IF Wvg_IsWindow( hWnd )
IF wvg_IsWindow( hWnd )
::hWnd := hWnd
::pWnd := win_N2P( hWnd )
::sendMessage( WM_SETFONT, Wvg_GetStockObject( DEFAULT_GUI_FONT ), 1 )
::hWndTT := Wvg_CreateToolTipWindow( ::hWnd )
::sendMessage( WM_SETFONT, wvg_GetStockObject( DEFAULT_GUI_FONT ), 1 )
::hWndTT := wvg_CreateToolTipWindow( ::hWnd )
ENDIF
RETURN Self

View File

@@ -595,27 +595,27 @@ static void hb_wvt_DrawBoxRaised( HDC hdc, int iTop, int iLeft, int iBottom, int
PHB_GTWVT _s = hb_wvt_gtGetWVT();
SelectObject( hdc, _s->pGUI->penWhiteDim );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
LineTo( hdc, iRight, iTop );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
LineTo( hdc, iLeft, iBottom );
SelectObject( hdc, _s->pGUI->penWhite );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
LineTo( hdc, iRight + 1, iTop - 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
LineTo( hdc, iLeft - 1, iBottom + 1 );
SelectObject( hdc, _s->pGUI->penDarkGray );
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom Inner */
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom Inner */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iRight, iBottom, NULL ); /* Right Inner */
MoveToEx( hdc, iRight, iBottom, NULL ); /* Right Inner */
LineTo( hdc, iRight, iTop );
SelectObject( hdc, _s->pGUI->penBlack );
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); /* Bottom Outer */
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); /* Bottom Outer */
LineTo( hdc, iRight + 1 + 1, iBottom + 1 );
MoveToEx( hdc, iRight + 1, iTop - 1, NULL ); /* Right Outer */
MoveToEx( hdc, iRight + 1, iTop - 1, NULL ); /* Right Outer */
LineTo( hdc, iRight + 1, iBottom + 1 );
}
@@ -624,42 +624,42 @@ static void hb_wvt_DrawBoxRecessed( HDC hdc, int iTop, int iLeft, int iBottom, i
PHB_GTWVT _s = hb_wvt_gtGetWVT();
SelectObject( hdc, _s->pGUI->penWhiteDim );
MoveToEx( hdc, iRight, iTop, NULL ); /* Right Inner */
MoveToEx( hdc, iRight, iTop, NULL ); /* Right Inner */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom Inner */
LineTo( hdc, iRight, iBottom );
SelectObject( hdc, _s->pGUI->penWhite );
MoveToEx( hdc, iRight + 1, iTop - 1, NULL ); /* Right Outer */
MoveToEx( hdc, iRight + 1, iTop - 1, NULL ); /* Right Outer */
LineTo( hdc, iRight + 1, iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); /* Bottom Outer */
LineTo( hdc, iRight + 2, iBottom + 1 );
SelectObject( hdc, _s->pGUI->penBlack );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
LineTo( hdc, iLeft, iBottom );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
LineTo( hdc, iRight, iTop );
SelectObject( hdc, _s->pGUI->penDarkGray );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
LineTo( hdc, iLeft - 1, iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
LineTo( hdc, iRight + 1, iTop - 1 );
}
static void hb_wvt_DrawOutline( HDC hdc, int iTop, int iLeft, int iBottom, int iRight )
{
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top */
LineTo( hdc, iRight, iTop );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left */
LineTo( hdc, iLeft, iBottom );
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom */
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iRight, iTop, NULL ); /* Right */
MoveToEx( hdc, iRight, iTop, NULL ); /* Right */
LineTo( hdc, iRight, iBottom + 1 );
}
@@ -668,16 +668,16 @@ static void hb_wvt_DrawBoxGet( HDC hdc, int iTop, int iLeft, int iBottom, int iR
PHB_GTWVT _s = hb_wvt_gtGetWVT();
SelectObject( hdc, _s->pGUI->penBlack );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Inner */
LineTo( hdc, iRight - 1, iTop - 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Inner */
LineTo( hdc, iLeft - 1, iBottom - 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Inner */
LineTo( hdc, iRight - 1, iTop - 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Inner */
LineTo( hdc, iLeft - 1, iBottom - 1 );
SelectObject( hdc, _s->pGUI->penDarkGray );
MoveToEx( hdc, iLeft - 2, iTop - 2, NULL ); /* Top Outer */
LineTo( hdc, iRight, iTop - 2 );
MoveToEx( hdc, iLeft - 2, iTop - 2, NULL ); /* Left Outer */
LineTo( hdc, iLeft - 2, iBottom );
MoveToEx( hdc, iLeft - 2, iTop - 2, NULL ); /* Top Outer */
LineTo( hdc, iRight, iTop - 2 );
MoveToEx( hdc, iLeft - 2, iTop - 2, NULL ); /* Left Outer */
LineTo( hdc, iLeft - 2, iBottom );
}
static void hb_wvt_DrawBoxGroup( HDC hdc, int iTop, int iLeft, int iBottom, int iRight )
@@ -686,31 +686,30 @@ static void hb_wvt_DrawBoxGroup( HDC hdc, int iTop, int iLeft, int iBottom, int
SelectObject( hdc, _s->pGUI->penDarkGray );
MoveToEx( hdc, iRight, iTop, NULL ); /* Right Inner */
MoveToEx( hdc, iRight, iTop, NULL ); /* Right Inner */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom Inner */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
LineTo( hdc, iLeft - 1, iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
LineTo( hdc, iRight + 1, iTop - 1 );
SelectObject( hdc, _s->pGUI->penWhite );
MoveToEx( hdc, iRight + 1, iTop, NULL ); /* Right Outer */
MoveToEx( hdc, iRight + 1, iTop, NULL ); /* Right Outer */
LineTo( hdc, iRight + 1, iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); /* Bottom Outer */
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); /* Bottom Outer */
LineTo( hdc, iRight + 1 + 1, iBottom + 1 );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
LineTo( hdc, iLeft, iBottom );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
LineTo( hdc, iRight, iTop );
}
@@ -720,30 +719,30 @@ static void hb_wvt_DrawBoxGroupRaised( HDC hdc, int iTop, int iLeft, int iBottom
SelectObject( hdc, _s->pGUI->penWhite );
MoveToEx( hdc, iRight, iTop, NULL ); /* Right Inner */
MoveToEx( hdc, iRight, iTop, NULL ); /* Right Inner */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom Inner */
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom Inner */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
LineTo( hdc, iLeft - 1, iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
LineTo( hdc, iRight + 1, iTop - 1 );
SelectObject( hdc, _s->pGUI->penDarkGray );
MoveToEx( hdc, iRight + 1, iTop, NULL ); /* Right Outer */
MoveToEx( hdc, iRight + 1, iTop, NULL ); /* Right Outer */
LineTo( hdc, iRight + 1, iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); /* Bottom Outer */
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); /* Bottom Outer */
LineTo( hdc, iRight + 1 + 1, iBottom + 1 );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
LineTo( hdc, iLeft, iBottom );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
LineTo( hdc, iRight, iTop );
}
@@ -753,16 +752,16 @@ static void hb_wvt_DrawToolButtonFlat( HDC hdc, int iTop, int iLeft, int iBottom
SelectObject( hdc, _s->pGUI->penGray );
MoveToEx( hdc, iRight, iTop, NULL ); /* Right */
MoveToEx( hdc, iRight, iTop, NULL ); /* Right */
LineTo( hdc, iRight, iBottom + 1 );
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom */
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left */
LineTo( hdc, iLeft, iBottom );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top */
LineTo( hdc, iRight, iTop );
}
@@ -772,18 +771,18 @@ static void hb_wvt_DrawToolButtonUp( HDC hdc, int iTop, int iLeft, int iBottom,
SelectObject( hdc, _s->pGUI->penBlack );
MoveToEx( hdc, iRight, iTop, NULL ); /* Right */
MoveToEx( hdc, iRight, iTop, NULL ); /* Right */
LineTo( hdc, iRight, iBottom + 1 );
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom */
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom */
LineTo( hdc, iRight, iBottom );
SelectObject( hdc, _s->pGUI->penWhite );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left */
LineTo( hdc, iLeft, iBottom );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top */
LineTo( hdc, iRight, iTop );
}
@@ -793,18 +792,18 @@ static void hb_wvt_DrawToolButtonDown( HDC hdc, int iTop, int iLeft, int iBottom
SelectObject( hdc, _s->pGUI->penWhite );
MoveToEx( hdc, iRight, iTop, NULL ); /* Right */
MoveToEx( hdc, iRight, iTop, NULL ); /* Right */
LineTo( hdc, iRight, iBottom + 1 );
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom */
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom */
LineTo( hdc, iRight, iBottom );
SelectObject( hdc, _s->pGUI->penBlack );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left */
LineTo( hdc, iLeft, iBottom );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top */
LineTo( hdc, iRight, iTop );
}
@@ -846,9 +845,7 @@ static COLORREF hb_wvt_FgColorParam( int iParam )
return color;
}
/*
* Wvt_SetPen( nPenStyle, nWidth, nColor )
*/
/* wvt_SetPen( nPenStyle, nWidth, nColor ) */
HB_FUNC( WVT_SETPEN )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -878,9 +875,7 @@ HB_FUNC( WVT_SETPEN )
hb_retl( HB_FALSE );
}
/*
* Wvt_SetBrush( nStyle, nColor, [ nHatch ] )
*/
/* wvt_SetBrush( nStyle, nColor, [ nHatch ] ) */
HB_FUNC( WVT_SETBRUSH )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -911,9 +906,7 @@ HB_FUNC( WVT_SETBRUSH )
hb_retl( HB_FALSE );
}
/*
* Wvt_DrawBoxGet( nRow, nCol, nWidth )
*/
/* wvt_DrawBoxGet( nRow, nCol, nWidth ) */
HB_FUNC( WVT_DRAWBOXGET )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -933,9 +926,7 @@ HB_FUNC( WVT_DRAWBOXGET )
#endif
}
/*
* Wvt_DrawBoxRaised( nTop, nLeft, nBottom, nRight, aPxlOff )
*/
/* wvt_DrawBoxRaised( nTop, nLeft, nBottom, nRight, aPxlOff ) */
HB_FUNC( WVT_DRAWBOXRAISED )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -952,9 +943,7 @@ HB_FUNC( WVT_DRAWBOXRAISED )
#endif
}
/*
* Wvt_DrawBoxRecessed( nTop, nLeft, nBottom, nRight, aPxlOff )
*/
/* wvt_DrawBoxRecessed( nTop, nLeft, nBottom, nRight, aPxlOff ) */
HB_FUNC( WVT_DRAWBOXRECESSED )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -971,9 +960,7 @@ HB_FUNC( WVT_DRAWBOXRECESSED )
#endif
}
/*
* Wvt_DrawBoxGroup( nTop, nLeft, nBottom, nRight, aPxlOff )
*/
/* wvt_DrawBoxGroup( nTop, nLeft, nBottom, nRight, aPxlOff ) */
HB_FUNC( WVT_DRAWBOXGROUP )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -990,9 +977,7 @@ HB_FUNC( WVT_DRAWBOXGROUP )
#endif
}
/*
* Wvt_DrawBoxRaised( nTop, nLeft, nBottom, nRight, aPxlOff )
*/
/* wvt_DrawBoxRaised( nTop, nLeft, nBottom, nRight, aPxlOff ) */
HB_FUNC( WVT_DRAWBOXGROUPRAISED )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -1009,9 +994,7 @@ HB_FUNC( WVT_DRAWBOXGROUPRAISED )
#endif
}
/*
* Wvt_DrawImage( nTop, nLeft, nBottom, nRight, cImage/nPictureSlot, aPxlOff, lDoNotScale )
*/
/* wvt_DrawImage( nTop, nLeft, nBottom, nRight, cImage/nPictureSlot, aPxlOff, lDoNotScale ) */
HB_FUNC( WVT_DRAWIMAGE )
{
#if ! defined( HB_OS_WIN_CE )
@@ -1121,9 +1104,8 @@ HB_FUNC( WVT_DRAWLABEL )
hb_retl( HB_FALSE );
}
/* 1 2 3 4 5 6 7 8
* Wvt_DrawOutline( nTop, nLeft, nBottom, nRight, nThick, nShape, nRGBColor, aPxlOff )
*/
/* 1 2 3 4 5 6 7 8
wvt_DrawOutline( nTop, nLeft, nBottom, nRight, nThick, nShape, nRGBColor, aPxlOff ) */
HB_FUNC( WVT_DRAWOUTLINE )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -1176,9 +1158,8 @@ HB_FUNC( WVT_DRAWOUTLINE )
}
}
/* 1 2 3 4 5 6 7 8 9 10 11
* Wvt_DrawLine( nTop, nLeft, nBottom, nRight, nOrient, nFormat, nAlign, nStyle, nThick, nColor, aPxlOff )
*/
/* 1 2 3 4 5 6 7 8 9 10 11
wvt_DrawLine( nTop, nLeft, nBottom, nRight, nOrient, nFormat, nAlign, nStyle, nThick, nColor, aPxlOff ) */
HB_FUNC( WVT_DRAWLINE )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -1371,9 +1352,8 @@ HB_FUNC( WVT_DRAWLINE )
hb_retl( HB_TRUE );
}
/*
* Inside the area requested!
* Wvt_DrawEllipse( nTop, nLeft, nBottom, nRight, aPxlOff )
/* Inside the area requested!
* wvt_DrawEllipse( nTop, nLeft, nBottom, nRight, aPxlOff )
*/
HB_FUNC( WVT_DRAWELLIPSE )
{
@@ -1394,9 +1374,7 @@ HB_FUNC( WVT_DRAWELLIPSE )
#endif
}
/*
* Wvt_DrawRectangle( nTop, nLeft, nBottom, nRight, aPxlOff )
*/
/* wvt_DrawRectangle( nTop, nLeft, nBottom, nRight, aPxlOff ) */
HB_FUNC( WVT_DRAWRECTANGLE )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -1416,9 +1394,7 @@ HB_FUNC( WVT_DRAWRECTANGLE )
#endif
}
/*
* Wvt_DrawRoundRect( nTop, nLeft, nBottom, nRight, aPxlOff, nRoundHeight, nRoundWidth )
*/
/* wvt_DrawRoundRect( nTop, nLeft, nBottom, nRight, aPxlOff, nRoundHeight, nRoundWidth ) */
HB_FUNC( WVT_DRAWROUNDRECT )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -1442,9 +1418,7 @@ HB_FUNC( WVT_DRAWROUNDRECT )
#endif
}
/*
* Wvt_DrawFocusRect( nTop, nLeft, nBottom, nRight, aPxlOff )
*/
/* wvt_DrawFocusRect( nTop, nLeft, nBottom, nRight, aPxlOff ) */
HB_FUNC( WVT_DRAWFOCUSRECT )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -1549,10 +1523,8 @@ HB_FUNC( WVT_DRAWGRIDHORZ )
hb_retl( HB_TRUE );
}
/*
* Wvt_DrawGridVert( nTop, nBottom, aCols, nCols, aPxlOff )
* aPxlOff[ 1 ] and aPxlOff[ 3 ] used
*/
/* wvt_DrawGridVert( nTop, nBottom, aCols, nCols, aPxlOff )
aPxlOff[ 1 ] and aPxlOff[ 3 ] used */
HB_FUNC( WVT_DRAWGRIDVERT )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -1596,10 +1568,8 @@ HB_FUNC( WVT_DRAWGRIDVERT )
hb_retl( HB_TRUE );
}
/*
* Wvt_DrawButton( nTop, nLeft, nBottom, nRight, cText, cnImage, ;
* nFormat, nTextColor, nBkColor, nImageAt, aPxlOff ) ;
*/
/* wvt_DrawButton( nTop, nLeft, nBottom, nRight, cText, cnImage, ;
nFormat, nTextColor, nBkColor, nImageAt, aPxlOff ) */
HB_FUNC( WVT_DRAWBUTTON )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -1751,9 +1721,7 @@ HB_FUNC( WVT_DRAWBUTTON )
hb_retl( HB_TRUE );
}
/*
* Wvt_DrawStatusBar( nNumPanels, aTLBRofPanels )
*/
/* wvt_DrawStatusBar( nNumPanels, aTLBRofPanels ) */
HB_FUNC( WVT_DRAWSTATUSBAR )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -1819,10 +1787,8 @@ HB_FUNC( WVT_DRAWSTATUSBAR )
LineTo( _s->hdc, iRight, iTop - 11 );
}
/*
* Wvt_DrawPicture( nTop, nLeft, nBottom, nRight, nSlot, aPxlOff, lDoNotScale ) -> lOk
* nSlot <= 20 aAdj == { 0,0,-2,-2 } To Adjust the pixels for { Top,Left,Bottom,Right }
*/
/* wvt_DrawPicture( nTop, nLeft, nBottom, nRight, nSlot, aPxlOff, lDoNotScale ) --> lOk
nSlot <= 20 aAdj == { 0,0,-2,-2 } To Adjust the pixels for { Top,Left,Bottom,Right } */
HB_FUNC( WVT_DRAWPICTURE )
{
#if ! defined( HB_OS_WIN_CE )
@@ -2375,9 +2341,7 @@ HB_FUNC( WVT_DRAWSCROLLBUTTON )
hb_xfree( Point );
}
/*
* Wvt_DrawScrollbarThumbVert( nTop, nLeft, nBottom, nRight, aPxlOff, nThumbPos )
*/
/* wvt_DrawScrollThumbVert( nTop, nLeft, nBottom, nRight, aPxlOff, nThumbPos ) */
HB_FUNC( WVT_DRAWSCROLLTHUMBVERT )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -2428,9 +2392,7 @@ HB_FUNC( WVT_DRAWSCROLLTHUMBVERT )
#endif
}
/*
* Wvt_DrawScrollbarThumbHorz( nTop, nLeft, nBottom, nRight, aPxlOff, nThumbPos )
*/
/* wvt_DrawScrollThumbHorz( nTop, nLeft, nBottom, nRight, aPxlOff, nThumbPos ) */
HB_FUNC( WVT_DRAWSCROLLTHUMBHORZ )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -2528,11 +2490,9 @@ HB_FUNC( WVT_DRAWSHADEDRECT )
}
/*#endif*/
/*
* Wvt_DrawTextBox( nTop, nLeft, nBottom, nRight, aPxlOff, cText, ;
* nAlignHorz, nAlignVert, nTextColor, nBackColor, ;
* nBackMode, hFont )
*/
/* wvt_DrawTextBox( nTop, nLeft, nBottom, nRight, aPxlOff, cText, ;
nAlignHorz, nAlignVert, nTextColor, nBackColor, ;
nBackMode, hFont ) */
HB_FUNC( WVT_DRAWTEXTBOX )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -2593,10 +2553,8 @@ HB_FUNC( WVT_DRAWTEXTBOX )
hb_strfree( hText );
}
/*
* Wvt_DrawProgressBar( nTop, nLeft, nBottom, nRight, aPxlOff, nPercent,;
* nBackColor, nBarColor, cImage, lVertical, nDirection )
*/
/* wvt_DrawProgressBar( nTop, nLeft, nBottom, nRight, aPxlOff, nPercent, ;
nBackColor, nBarColor, cImage, lVertical, nDirection ) */
HB_FUNC( WVT_DRAWPROGRESSBAR )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -2693,10 +2651,8 @@ HB_FUNC( WVT_DRAWPROGRESSBAR )
}
}
/*
* Wvt_CreateFont( cFontFace, nHeight, nWidth, nWeight, lItalic, lUnderline,
* lStrikeout, nCharSet, nQuality, nEscapement )
*/
/* wvt_CreateFont( cFontFace, nHeight, nWidth, nWeight, lItalic, lUnderline,
lStrikeout, nCharSet, nQuality, nEscapement ) */
HB_FUNC( WVT_CREATEFONT )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -2724,9 +2680,7 @@ HB_FUNC( WVT_CREATEFONT )
hb_retnint( ( HB_PTRUINT ) CreateFontIndirect( &logfont ) );
}
/*
* Wvt_LoadPicture( nSlot, cFilePic )
*/
/* wvt_LoadPicture( nSlot, cFilePic ) */
HB_FUNC( WVT_LOADPICTURE )
{
HB_BOOL bResult = HB_FALSE;
@@ -2755,9 +2709,7 @@ HB_FUNC( WVT_DESTROYPICTURE )
hb_retl( hb_wvt_gtDestroyPicture( iPicture ) );
}
/*
* Wvt_LoadPictureEx( cFilePic )
*/
/* wvt_LoadPictureEx( cFilePic ) */
HB_FUNC( WVT_LOADPICTUREEX )
{
#if ! defined( HB_OS_WIN_CE )
@@ -2812,10 +2764,8 @@ HB_FUNC( WVT_LOADPICTUREFROMRESOURCEEX )
#endif
}
/*
* Wvt_LoadFont( nSlotFont, cFontFace, nHeight, nWidth, nWeight, lItalic, lUnderline, lStrikeout,
* nCharSet, nQuality, nEscapement )
*/
/* wvt_LoadFont( nSlotFont, cFontFace, nHeight, nWidth, nWeight, lItalic, lUnderline, lStrikeout,
nCharSet, nQuality, nEscapement ) */
HB_FUNC( WVT_LOADFONT )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -2851,9 +2801,7 @@ HB_FUNC( WVT_LOADFONT )
}
}
/*
* Wvt_LoadPen( nSlot, nStyle, nWidth, nRGBColor )
*/
/* wvt_LoadPen( nSlot, nStyle, nWidth, nRGBColor ) */
HB_FUNC( WVT_LOADPEN )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -2881,9 +2829,7 @@ HB_FUNC( WVT_LOADPEN )
hb_retl( HB_FALSE );
}
/*
* aScr := Wvt_SaveScreen( nTop, nLeft, nBottom, nRight )
*/
/* wvt_SaveScreen( nTop, nLeft, nBottom, nRight ) --> aSrc */
HB_FUNC( WVT_SAVESCREEN )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -2920,9 +2866,7 @@ HB_FUNC( WVT_SAVESCREEN )
hb_itemReturnRelease( info );
}
/*
* Wvt_RestScreen( nTop, nLeft, nBottom, nRight, aScr, lDoNotDestroyBMP )
*/
/* wvt_RestScreen( nTop, nLeft, nBottom, nRight, aScr, lDoNotDestroyBMP ) */
HB_FUNC( WVT_RESTSCREEN )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
@@ -2981,8 +2925,6 @@ HB_FUNC( WVT_RESTSCREEN )
hb_retl( bResult );
}
/*-*/
HB_FUNC( WVG_GTINFOEX )
{
if( HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) )

View File

@@ -104,9 +104,7 @@ static void hb_wvg_RestFromBuffer( PHB_GTWVT pWVT, int iLeft, int iTop, int iRig
pWVT->hGuiDC, iLeft, iTop, SRCCOPY );
}
/*
Wvg_ClearGUIObjects() -> NIL
*/
/* wvg_ClearGUIObjects() --> NIL */
HB_FUNC( WVG_CLEARGUIOBJECTS )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -177,9 +175,7 @@ HB_FUNC( WVG_SETGOBJSTATE )
hb_retni( iOState );
}
/*
Wvg_SetGuiObjectData( hObj, nGobjDataType, xData, xData1 ) -> lSuccess
*/
/* wvg_SetGObjData( hObj, nGobjDataType, xData, xData1 ) --> lSuccess */
HB_FUNC( WVG_SETGOBJDATA )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -295,9 +291,7 @@ HB_FUNC( WVG_SETGOBJDATA )
hb_retl( bSuccess );
}
/*
Wvg_BoxRaised( nTop, nLeft, nBottom, nRight, aPxlOff )
*/
/* wvg_BoxRaised( nTop, nLeft, nBottom, nRight, aPxlOff ) */
HB_FUNC( WVG_BOXRAISED )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -325,33 +319,31 @@ static void hb_wvg_BoxRaised( PHB_GTWVT pWVT, int iLeft, int iTop, int iRight, i
PHB_GUIDATA pGUI = pWVT->pGUI;
SelectObject( hdc, pGUI->penWhiteDim );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
LineTo( hdc, iRight, iTop );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
LineTo( hdc, iLeft, iBottom );
SelectObject( hdc, pGUI->penWhite );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
LineTo( hdc, iRight + 1, iTop - 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
LineTo( hdc, iLeft - 1, iBottom + 1 );
SelectObject( hdc, pGUI->penDarkGray );
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom Inner */
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom Inner */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iRight, iBottom, NULL ); /* Right Inner */
MoveToEx( hdc, iRight, iBottom, NULL ); /* Right Inner */
LineTo( hdc, iRight, iTop );
SelectObject( hdc, pGUI->penBlack );
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); /* Bottom Outer */
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); /* Bottom Outer */
LineTo( hdc, iRight + 1 + 1, iBottom + 1 );
MoveToEx( hdc, iRight + 1, iTop - 1, NULL ); /* Right Outer */
MoveToEx( hdc, iRight + 1, iTop - 1, NULL ); /* Right Outer */
LineTo( hdc, iRight + 1, iBottom + 1 );
}
/*
Wvg_BoxRecessed( nTop, nLeft, nBottom, nRight, aPxlOff ) -> NIL
*/
/* wvg_BoxRecessed( nTop, nLeft, nBottom, nRight, aPxlOff ) --> NIL */
HB_FUNC( WVG_BOXRECESSED )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -379,33 +371,31 @@ static void hb_wvg_BoxRecessed( PHB_GTWVT pWVT, int iLeft, int iTop, int iRight,
PHB_GUIDATA pGUI = pWVT->pGUI;
SelectObject( hdc, pGUI->penWhiteDim );
MoveToEx( hdc, iRight, iTop, NULL ); /* Right Inner */
MoveToEx( hdc, iRight, iTop, NULL ); /* Right Inner */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom Inner */
LineTo( hdc, iRight, iBottom );
SelectObject( hdc, pGUI->penWhite );
MoveToEx( hdc, iRight + 1, iTop - 1, NULL ); /* Right Outer */
MoveToEx( hdc, iRight + 1, iTop - 1, NULL ); /* Right Outer */
LineTo( hdc, iRight + 1, iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); /* Bottom Outer */
LineTo( hdc, iRight + 2, iBottom + 1 );
SelectObject( hdc, pGUI->penBlack );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
LineTo( hdc, iLeft, iBottom );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
LineTo( hdc, iRight, iTop );
SelectObject( hdc, pGUI->penDarkGray );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
LineTo( hdc, iLeft - 1, iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
LineTo( hdc, iRight + 1, iTop - 1 );
}
/*
Wvt_DrawBoxGet( nRow, nCol, nWidth ) -> NIL
*/
/* wvt_BoxGet( nRow, nCol, nWidth ) --> NIL */
HB_FUNC( WVG_BOXGET )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -434,21 +424,19 @@ static void hb_wvg_BoxGet( PHB_GTWVT pWVT, int iLeft, int iTop, int iRight, int
PHB_GUIDATA pGUI = pWVT->pGUI;
SelectObject( hdc, pGUI->penBlack );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Inner */
LineTo( hdc, iRight - 1, iTop - 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Inner */
LineTo( hdc, iLeft - 1, iBottom - 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Inner */
LineTo( hdc, iRight - 1, iTop - 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Inner */
LineTo( hdc, iLeft - 1, iBottom - 1 );
SelectObject( hdc, pGUI->penDarkGray );
MoveToEx( hdc, iLeft - 2, iTop - 2, NULL ); /* Top Outer */
LineTo( hdc, iRight, iTop - 2 );
MoveToEx( hdc, iLeft - 2, iTop - 2, NULL ); /* Left Outer */
LineTo( hdc, iLeft - 2, iBottom );
MoveToEx( hdc, iLeft - 2, iTop - 2, NULL ); /* Top Outer */
LineTo( hdc, iRight, iTop - 2 );
MoveToEx( hdc, iLeft - 2, iTop - 2, NULL ); /* Left Outer */
LineTo( hdc, iLeft - 2, iBottom );
}
/*
Wvg_BoxGroup( nTop, nLeft, nBottom, nRight, aPxlOff ) -> NIL
*/
/* wvg_BoxGroup( nTop, nLeft, nBottom, nRight, aPxlOff ) --> NIL */
HB_FUNC( WVG_BOXGROUP )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -477,37 +465,35 @@ static void hb_wvg_BoxGroup( PHB_GTWVT pWVT, int iLeft, int iTop, int iRight, in
SelectObject( hdc, pGUI->penDarkGray );
MoveToEx( hdc, iRight, iTop, NULL ); /* Right Inner */
MoveToEx( hdc, iRight, iTop, NULL ); /* Right Inner */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom Inner */
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom Inner */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
LineTo( hdc, iLeft - 1, iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
LineTo( hdc, iRight + 1, iTop - 1 );
SelectObject( hdc, pGUI->penWhite );
MoveToEx( hdc, iRight + 1, iTop, NULL ); /* Right Outer */
MoveToEx( hdc, iRight + 1, iTop, NULL ); /* Right Outer */
LineTo( hdc, iRight + 1, iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); /* Bottom Outer */
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); /* Bottom Outer */
LineTo( hdc, iRight + 1 + 1, iBottom + 1 );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
LineTo( hdc, iLeft, iBottom );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
LineTo( hdc, iRight, iTop );
}
/*
Wvg_BoxRaised( nTop, nLeft, nBottom, nRight, aPxlOff ) -> NIL
*/
/* wvg_BoxRaised( nTop, nLeft, nBottom, nRight, aPxlOff ) --> NIL */
HB_FUNC( WVG_BOXGROUPRAISED )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -536,39 +522,37 @@ static void hb_wvg_BoxGroupRaised( PHB_GTWVT pWVT, int iLeft, int iTop, int iRig
SelectObject( hdc, pGUI->penWhite );
MoveToEx( hdc, iRight, iTop, NULL ); /* Right Inner */
MoveToEx( hdc, iRight, iTop, NULL ); /* Right Inner */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom Inner */
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom Inner */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Left Outer */
LineTo( hdc, iLeft - 1, iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); /* Top Outer */
LineTo( hdc, iRight + 1, iTop - 1 );
SelectObject( hdc, pGUI->penDarkGray );
MoveToEx( hdc, iRight + 1, iTop, NULL ); /* Right Outer */
MoveToEx( hdc, iRight + 1, iTop, NULL ); /* Right Outer */
LineTo( hdc, iRight + 1, iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); /* Bottom Outer */
LineTo( hdc, iRight + 1 + 1, iBottom + 1 );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left Inner */
LineTo( hdc, iLeft, iBottom );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top Inner */
LineTo( hdc, iRight, iTop );
}
/*
* Wvg_Label( nRow, nCol, aPxlOff, cLabel, nAlign,
* nEscapement, nTextColor, nBkColor, cFontFace, nFontHeight,
* nFontWidth, nFontWeight, nQuality, nCharSet, lItalics,
* lUnderline, lStrikeOut )
*/
/* wvg_Label( nRow, nCol, aPxlOff, cLabel, nAlign,
nEscapement, nTextColor, nBkColor, cFontFace, nFontHeight,
nFontWidth, nFontWeight, nQuality, nCharSet, lItalics,
lUnderline, lStrikeOut ) */
HB_FUNC( WVG_LABEL )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -623,9 +607,7 @@ HB_FUNC( WVG_LABEL )
}
}
/*
Wvg_LabelEx( nRow, nCol, aPxlOff, cLabel, nAlign, nTextColor, nBkColor, nSlotFont )
*/
/* wvg_LabelEx( nRow, nCol, aPxlOff, cLabel, nAlign, nTextColor, nBkColor, nSlotFont ) */
HB_FUNC( WVG_LABELEX )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -679,12 +661,10 @@ static void hb_wvg_Label( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop )
}
/*
* Wvg_LabelEx2( nTop, nLeft, nBottom, nRight, aPxlOff, cLabel, nAlign,
* nEscapement, nTextColor, nBkColor, cFontFace, nFontHeight,
* nFontWidth, nFontWeight, nQuality, nCharSet, lItalics,
* lUnderline, lStrikeOut )
*/
/* wvg_LabelEx2( nTop, nLeft, nBottom, nRight, aPxlOff, cLabel, nAlign,
nEscapement, nTextColor, nBkColor, cFontFace, nFontHeight,
nFontWidth, nFontWeight, nQuality, nCharSet, lItalics,
lUnderline, lStrikeOut ) */
HB_FUNC( WVG_LABELEX2 )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -762,12 +742,12 @@ static void hb_wvg_LabelEx2( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop
case 2:
iAlignH = TA_RIGHT;
x = iRight;
x = iRight;
break;
case 1:
iAlignH = TA_CENTER;
x = iLeft + ( ( iRight - iLeft + 1 ) / 2 );
x = iLeft + ( ( iRight - iLeft + 1 ) / 2 );
break;
default:
@@ -790,10 +770,8 @@ static void hb_wvg_LabelEx2( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop
SelectObject( pWVT->hdc, hOldFont );
}
/*
* 1 2 3 4 5 6 7 8
* Wvg_Outline( nTop, nLeft, nBottom, nRight, aPxlOff, nThick, nShape, nRGBColor )
*/
/* 1 2 3 4 5 6 7 8
wvg_Outline( nTop, nLeft, nBottom, nRight, aPxlOff, nThick, nShape, nRGBColor ) */
HB_FUNC( WVG_OUTLINE )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -830,9 +808,7 @@ HB_FUNC( WVG_OUTLINE )
pWVT->gObjs = gObj;
}
/*
Wvg_OutlineEx( nTop, nLeft, nBottom, nRight, aPxlOff, nSlotPen )
*/
/* wvg_OutlineEx( nTop, nLeft, nBottom, nRight, aPxlOff, nSlotPen ) */
HB_FUNC( WVG_OUTLINEEX )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -871,22 +847,21 @@ static void hb_wvg_Outline( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop,
SelectObject( pWVT->hdc, gObj->hPen );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Top */
LineTo( hdc, iRight, iTop );
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left */
MoveToEx( hdc, iLeft, iTop, NULL ); /* Left */
LineTo( hdc, iLeft, iBottom );
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom */
MoveToEx( hdc, iLeft, iBottom, NULL ); /* Bottom */
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iRight, iTop, NULL ); /* Right */
MoveToEx( hdc, iRight, iTop, NULL ); /* Right */
LineTo( hdc, iRight, iBottom + 1 );
}
/* 1 2 3 4 5 6 7 8 9 10 11
* Wvg_Line( nTop, nLeft, nBottom, nRight, aPxlOff, nOrient, nFormat, nAlign, nStyle, nThick, nColor )
*/
wvg_Line( nTop, nLeft, nBottom, nRight, aPxlOff, nOrient, nFormat, nAlign, nStyle, nThick, nColor ) */
HB_FUNC( WVG_LINE )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -919,9 +894,8 @@ HB_FUNC( WVG_LINE )
pWVT->gObjs = gObj;
}
/* 1 2 3 4 5 6 7 8 9
* Wvg_LineEx( nTop, nLeft, nBottom, nRight, aPxlOff, nOrient, nFormat, nAlign, nSlotPen )
*/
/* 1 2 3 4 5 6 7 8 9
wvg_LineEx( nTop, nLeft, nBottom, nRight, aPxlOff, nOrient, nFormat, nAlign, nSlotPen ) */
HB_FUNC( WVG_LINEEX )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -961,34 +935,34 @@ static void hb_wvg_Line( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop, in
switch( gObj->iAlign )
{
case 0: /* Center */
if( gObj->iOrient == 0 ) /* Horizontal */
case 0: /* Center */
if( gObj->iOrient == 0 ) /* Horizontal */
{
iOffset = ( ( iBottom - iTop ) / 2 );
iOffset = ( iBottom - iTop ) / 2;
y = iTop + iOffset;
}
else
{
iOffset = ( ( iRight - iLeft ) / 2 );
iOffset = ( iRight - iLeft ) / 2;
x = iLeft + iOffset;
}
break;
case 1: /* Top */
case 1: /* Top */
break;
case 2: /* bottom */
if( gObj->iFormat == 0 || gObj->iFormat == 1 ) /* Raised/Recessd */
case 2: /* Bottom */
if( gObj->iFormat == 0 || gObj->iFormat == 1 ) /* Raised/Recessed */
y = iBottom - 1;
else
y = iBottom;
break;
case 3: /* Left */
case 3: /* Left */
break;
case 4: /* Right */
if( gObj->iFormat == 0 || gObj->iFormat == 1 ) /* Raised/Recessd */
case 4: /* Right */
if( gObj->iFormat == 0 || gObj->iFormat == 1 ) /* Raised/Recessed */
x = iRight - 1;
else
x = iRight;
@@ -1000,8 +974,8 @@ static void hb_wvg_Line( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop, in
switch( gObj->iFormat )
{
case 0: /* Raised */
if( gObj->iOrient == 0 ) /* Horizontal */
case 0: /* Raised */
if( gObj->iOrient == 0 ) /* Horizontal */
{
SelectObject( hdc, pWVT->pGUI->penWhite );
MoveToEx( hdc, x, y, NULL );
@@ -1010,7 +984,7 @@ static void hb_wvg_Line( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop, in
MoveToEx( hdc, x, y + 1, NULL );
LineTo( hdc, iRight, y + 1 );
}
else /* Vertical */
else /* Vertical */
{
SelectObject( hdc, pWVT->pGUI->penWhite );
MoveToEx( hdc, x, y, NULL );
@@ -1021,8 +995,8 @@ static void hb_wvg_Line( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop, in
}
break;
case 1: /* Recessed */
if( gObj->iOrient == 0 ) /* Horizontal */
case 1: /* Recessed */
if( gObj->iOrient == 0 ) /* Horizontal */
{
SelectObject( hdc, hPen );
MoveToEx( hdc, x, y, NULL );
@@ -1031,7 +1005,7 @@ static void hb_wvg_Line( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop, in
MoveToEx( hdc, x, y + 1, NULL );
LineTo( hdc, iRight, y + 1 );
}
else /* Vertical */
else /* Vertical */
{
SelectObject( hdc, hPen );
MoveToEx( hdc, x, y, NULL );
@@ -1042,14 +1016,14 @@ static void hb_wvg_Line( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop, in
}
break;
case 2: /* Plain */
if( gObj->iOrient == 0 ) /* Horizontal */
case 2: /* Plain */
if( gObj->iOrient == 0 ) /* Horizontal */
{
SelectObject( hdc, hPen );
MoveToEx( hdc, x, y, NULL );
LineTo( hdc, iRight, y );
}
else /* Vertical */
else /* Vertical */
{
SelectObject( hdc, hPen );
MoveToEx( hdc, x, y, NULL );
@@ -1060,10 +1034,8 @@ static void hb_wvg_Line( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop, in
SelectObject( hdc, hOldPen );
}
/*
* Inside the area requested!
* Wvg_Ellipse( nTop, nLeft, nBottom, nRight, aPxlOff )
*/
/* Inside the area requested!
wvg_Ellipse( nTop, nLeft, nBottom, nRight, aPxlOff ) */
HB_FUNC( WVG_ELLIPSE )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -1101,9 +1073,7 @@ static void hb_wvg_Ellipse( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop,
SelectObject( pWVT->hdc, hBrush );
}
/*
Wvg_Rectangle( nTop, nLeft, nBottom, nRight, aPxlOff )
*/
/* wvg_Rectangle( nTop, nLeft, nBottom, nRight, aPxlOff ) */
HB_FUNC( WVG_RECTANGLE )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -1141,9 +1111,7 @@ static void hb_wvg_Rectangle( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTo
SelectObject( pWVT->hdc, hBrush );
}
/*
Wvg_RoundRect( nTop, nLeft, nBottom, nRight, aPxlOff, nRoundHeight, nRoundWidth )
*/
/* wvg_RoundRect( nTop, nLeft, nBottom, nRight, aPxlOff, nRoundHeight, nRoundWidth ) */
HB_FUNC( WVG_ROUNDRECT )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -1184,9 +1152,7 @@ static void hb_wvg_RoundRect( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTo
SelectObject( pWVT->hdc, hBrush );
}
/*
Wvg_ColorRect( nTop, nLeft, nBottom, nRight, aPxlOff, nRGB )
*/
/* wvg_ColorRect( nTop, nLeft, nBottom, nRight, aPxlOff, nRGB ) */
HB_FUNC( WVG_COLORRECT )
{
HBRUSH hBrush = CreateSolidBrush( ( COLORREF ) hb_parnint( 6 ) );
@@ -1224,9 +1190,7 @@ static void hb_wvg_ColorRect( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTo
FillRect( pWVT->hGuiDC, &rc, gObj->hBrush );
}
/*
Wvg_ShadedRect( nTop, nLeft, nBottom, nRight, aPxlOff, nHorVert, aRGBb, aRGBe )
*/
/* wvg_ShadedRect( nTop, nLeft, nBottom, nRight, aPxlOff, nHorVert, aRGBb, aRGBe ) */
HB_FUNC( WVG_SHADEDRECT )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -1287,10 +1251,8 @@ static void hb_wvg_ShadedRect( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iT
HB_SYMBOL_UNUSED( bGF );
}
/*
* Wvg_TextBox( nTop, nLeft, nBottom, nRight, aPxlOff, cText, ;
* nAlignHorz, nAlignVert, nTextColor, nBackColor, hFont )
*/
/* wvg_TextBox( nTop, nLeft, nBottom, nRight, aPxlOff, cText, ;
nAlignHorz, nAlignVert, nTextColor, nBackColor, hFont ) */
HB_FUNC( WVG_TEXTBOX )
{
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
@@ -1356,10 +1318,7 @@ static void hb_wvg_TextBox( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop,
DrawText( hdc, gObj->lpText, lstrlen( gObj->lpText ), &rc, gObj->iAlign | DT_WORDBREAK | DT_TOP );
}
/*
* Wvt_DrawPicture( nTop, nLeft, nBottom, nRight, nSlot, aPxlOff ) -> lOk
* Wvg_Picture( nTop, nLeft, nBottom, nRight, aPxlOff, nSlot, lDoNotScale ) -> NIL
*/
/* wvg_Picture( nTop, nLeft, nBottom, nRight, aPxlOff, nSlot, lDoNotScale ) --> NIL */
HB_FUNC( WVG_PICTURE )
{
#if ! defined( HB_OS_WIN_CE )
@@ -1428,9 +1387,7 @@ HB_FUNC( WVG_PICTUREEX )
#endif
}
/*
Wvg_Image( nTop, nLeft, nBottom, nRight, aPxlOff, nImageSource, cImage/nPictureSlot, cSection, lDoNotScale )
*/
/* wvg_Image( nTop, nLeft, nBottom, nRight, aPxlOff, nImageSource, cImage/nPictureSlot, cSection, lDoNotScale ) */
HB_FUNC( WVG_IMAGE )
{
#if ! defined( HB_OS_WIN_CE )
@@ -1565,16 +1522,15 @@ static void hb_wvg_RenderPicture( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int
#endif
}
/*
Wvg_Object( nObj, bBlock )
/* wvg_Object( nObj, bBlock )
nObj == one of the objects == GOBJ_OBJTYPE_ROUNDRECT | GOBJ_OBJTYPE_IMAGE | etc
bBlock == Block returning the array conataining as many elements as necessary for the given object
bBlock == Block returning the array containing as many elements as necessary for the given object
Also it will return those array elements in the same order expected by the object to draw
This protocol is necessary for dyanamic coordinates which might have been changed by the
This protocol is necessary for dynamic coordinates which might have been changed by the
applications, like TBrowse dimensions.
Wvg_Object( GOBJ_OBJTYPE_BOXRAISED, {|| { oBrw:nTop, oBrw:nLeft, oBrw:nBottom, oBrw:nRight, {-2,-2,2,2} } } )
wvg_Object( GOBJ_OBJTYPE_BOXRAISED, {|| { oBrw:nTop, oBrw:nLeft, oBrw:nBottom, oBrw:nRight, {-2,-2,2,2} } } )
*/
HB_FUNC( WVG_OBJECT )
{
@@ -1590,10 +1546,8 @@ HB_FUNC( WVG_OBJECT )
pWVT->gObjs = gObj;
}
/*
* Wvg_Object( GOBJ_OBJTYPE_GRIDVERT, {|| { nTop, nBottom, aCols, nCols, aPxlOff } } )
* aPxlOff[ 1 ] and aPxlOff[ 3 ] used
*/
/* wvg_Object( GOBJ_OBJTYPE_GRIDVERT, {|| { nTop, nBottom, aCols, nCols, aPxlOff } } )
aPxlOff[ 1 ] and aPxlOff[ 3 ] used */
static void hb_wvg_GridVert( PHB_GTWVT pWVT, PHB_ITEM pArray, RECT * uRect )
{
PHB_ITEM pCols = hb_arrayGetItemPtr( pArray, 3 );
@@ -1601,18 +1555,18 @@ static void hb_wvg_GridVert( PHB_GTWVT pWVT, PHB_ITEM pArray, RECT * uRect )
if( iTabs > 0 )
{
int x, iTop, iBottom;
HB_ISIZ i;
iTop = ( hb_arrayGetNI( pArray, 1 ) * ( int ) pWVT->PTEXTSIZE.y );
iBottom = ( ( hb_arrayGetNI( pArray, 2 ) + 1 ) * ( int ) pWVT->PTEXTSIZE.y ) - 1;
int iTop = hb_arrayGetNI( pArray, 1 ) * ( int ) pWVT->PTEXTSIZE.y;
int iBottom = ( ( hb_arrayGetNI( pArray, 2 ) + 1 ) * ( int ) pWVT->PTEXTSIZE.y ) - 1;
if( ( iTop >= uRect->top && iTop <= uRect->bottom ) ||
( iBottom >= uRect->top && iBottom <= uRect->bottom ) )
{
int x;
HDC hdc = pWVT->hGuiDC;
HB_ISIZ i;
SelectObject( hdc, pWVT->currentPen );
for( i = 1; i <= iTabs; i++ )
for( i = 1; i <= iTabs; ++i )
{
x = hb_arrayGetNI( pCols, i ) * pWVT->PTEXTSIZE.x;
MoveToEx( hdc, x, iTop, NULL );
@@ -1625,7 +1579,7 @@ static void hb_wvg_GridVert( PHB_GTWVT pWVT, PHB_ITEM pArray, RECT * uRect )
*/
hdc = pWVT->hdc;
SelectObject( hdc, pWVT->currentPen );
for( i = 1; i <= iTabs; i++ )
for( i = 1; i <= iTabs; ++i )
{
x = hb_arrayGetNI( pCols, i ) * pWVT->PTEXTSIZE.x;
MoveToEx( hdc, x, iTop, NULL );
@@ -1635,58 +1589,54 @@ static void hb_wvg_GridVert( PHB_GTWVT pWVT, PHB_ITEM pArray, RECT * uRect )
}
}
static void hb_wvg_GridHorz( PHB_GTWVT pWVT, PHB_ITEM pArray, RECT * uRect )
{
int iAtRow = hb_arrayGetNI( pArray, 1 );
int iRows = hb_arrayGetNI( pArray, 4 );
int i, y, iLeft, iRight, iTop, iBottom;
int i, y;
HDC hdc;
iLeft = ( hb_arrayGetNI( pArray, 2 ) * pWVT->PTEXTSIZE.x );
iRight = ( ( ( hb_arrayGetNI( pArray, 3 ) + 1 ) * pWVT->PTEXTSIZE.x ) - 1 );
iTop = iAtRow * pWVT->PTEXTSIZE.y;
iBottom = ( iAtRow + iRows ) * pWVT->PTEXTSIZE.y; /* do not add 1 */
int iLeft = hb_arrayGetNI( pArray, 2 ) * pWVT->PTEXTSIZE.x;
int iRight = ( ( hb_arrayGetNI( pArray, 3 ) + 1 ) * pWVT->PTEXTSIZE.x ) - 1;
int iTop = iAtRow * pWVT->PTEXTSIZE.y;
int iBottom = ( iAtRow + iRows ) * pWVT->PTEXTSIZE.y; /* do not add 1 */
if( ( uRect->left > iRight ) || ( uRect->top > iBottom ) ||
( uRect->bottom < iTop ) || ( uRect->right < iLeft ) )
if( uRect->left > iRight || uRect->top > iBottom ||
uRect->bottom < iTop || uRect->right < iLeft )
return;
hdc = pWVT->hdc;
SelectObject( hdc, pWVT->currentPen );
for( i = 0; i < iRows; i++ )
for( i = 0; i < iRows; ++i, ++iAtRow )
{
y = ( ( iAtRow ) * pWVT->PTEXTSIZE.y );
y = iAtRow * pWVT->PTEXTSIZE.y;
MoveToEx( hdc, iLeft, y, NULL );
LineTo( hdc, iRight, y );
iAtRow++;
}
hdc = pWVT->hGuiDC;
SelectObject( hdc, pWVT->currentPen );
for( i = 0; i < iRows; i++ )
for( i = 0; i < iRows; ++i, ++iAtRow )
{
y = ( ( iAtRow ) * pWVT->PTEXTSIZE.y );
y = iAtRow * pWVT->PTEXTSIZE.y;
MoveToEx( hdc, iLeft, y, NULL );
LineTo( hdc, iRight, y );
iAtRow++;
}
}
/* Owner Draw Implementation */
/* Owner Draw Implementation */
void hb_gt_wvt_PaintGObjects( PHB_GTWVT pWVT, RECT * uRect )
{
PHB_GOBJS gObj = pWVT->gObjs;
int iTop = 0, iLeft = 0, iBottom = 0, iRight = 0;
int iObjType;
while( gObj )
{
iObjType = 0;
if( gObj->iState == GOBJ_OBJSTATE_ENABLED )
{
int iTop = 0, iLeft = 0, iBottom = 0, iRight = 0;
int iObjType = 0;
if( gObj->iObjType == GOBJ_OBJTYPE_OBJECT )
{
if( hb_vmRequestReenter() )
@@ -1713,8 +1663,8 @@ void hb_gt_wvt_PaintGObjects( PHB_GTWVT pWVT, RECT * uRect )
else
{
/* Take care of offsets 5th element */
iTop = ( pWVT->PTEXTSIZE.y * hb_arrayGetNI( pArray, 1 ) );
iLeft = ( pWVT->PTEXTSIZE.x * hb_arrayGetNI( pArray, 2 ) );
iTop = pWVT->PTEXTSIZE.y * hb_arrayGetNI( pArray, 1 );
iLeft = pWVT->PTEXTSIZE.x * hb_arrayGetNI( pArray, 2 );
iBottom = ( pWVT->PTEXTSIZE.y * ( hb_arrayGetNI( pArray, 3 ) + 1 ) ) - 1;
iRight = ( pWVT->PTEXTSIZE.x * ( hb_arrayGetNI( pArray, 4 ) + 1 ) ) - 1;
}
@@ -1722,12 +1672,12 @@ void hb_gt_wvt_PaintGObjects( PHB_GTWVT pWVT, RECT * uRect )
else
iObjType = 0;
/* C A R E F U L */
/* CAREFUL */
#if 0
if( pArray )
{
/*hb_itemRelease( pArray );*/
/*pArray = NULL;*/
hb_itemRelease( pArray );
pArray = NULL;
}
#endif
hb_vmRequestRestore();
@@ -1750,8 +1700,8 @@ void hb_gt_wvt_PaintGObjects( PHB_GTWVT pWVT, RECT * uRect )
case GOBJ_OBJTYPE_BOXGET:
case GOBJ_OBJTYPE_BOXGROUP:
case GOBJ_OBJTYPE_BOXGROUPRAISED:
if( ( uRect->left > iRight + 2 ) || ( uRect->top > iBottom + 2 ) ||
( uRect->bottom < iTop - 2 ) || ( uRect->right < iLeft - 2 ) )
if( uRect->left > ( iRight + 2 ) || uRect->top > ( iBottom + 2 ) ||
uRect->bottom < ( iTop - 2 ) || uRect->right < ( iLeft - 2 ) )
{
/* It is outside of the boundaries */
}
@@ -1794,8 +1744,8 @@ void hb_gt_wvt_PaintGObjects( PHB_GTWVT pWVT, RECT * uRect )
case GOBJ_OBJTYPE_COLORRECT:
case GOBJ_OBJTYPE_SHADEDRECT:
case GOBJ_OBJTYPE_TEXTBOX:
if( ( uRect->left > iRight ) || ( uRect->top > iBottom ) ||
( uRect->bottom < iTop ) || ( uRect->right < iLeft ) )
if( uRect->left > iRight || uRect->top > iBottom ||
uRect->bottom < iTop || uRect->right < iLeft )
{
/* Nothing to do */
}
@@ -1803,7 +1753,6 @@ void hb_gt_wvt_PaintGObjects( PHB_GTWVT pWVT, RECT * uRect )
{
switch( iObjType )
{
case GOBJ_OBJTYPE_LINE:
case GOBJ_OBJTYPE_LINEEX:
hb_wvg_Line( pWVT, gObj, iLeft, iTop, iRight, iBottom );
@@ -1840,8 +1789,8 @@ void hb_gt_wvt_PaintGObjects( PHB_GTWVT pWVT, RECT * uRect )
case GOBJ_OBJTYPE_LABEL:
case GOBJ_OBJTYPE_LABELEX:
#if 0
if( ( uRect->top > iTop + gObj->lf->lfHeight ) ||
( uRect->bottom < iTop ) || ( uRect->right < iLeft ) )
if( uRect->top > ( iTop + gObj->lf->lfHeight ) ||
uRect->bottom < iTop || uRect->right < iLeft )
{
/* Nothing to do */
}
@@ -1853,15 +1802,13 @@ void hb_gt_wvt_PaintGObjects( PHB_GTWVT pWVT, RECT * uRect )
break;
case GOBJ_OBJTYPE_LABEL_EX2:
{
hb_wvg_LabelEx2( pWVT, gObj, iLeft, iTop, iRight, iBottom );
}
hb_wvg_LabelEx2( pWVT, gObj, iLeft, iTop, iRight, iBottom );
break;
case GOBJ_OBJTYPE_OUTLINE:
case GOBJ_OBJTYPE_OUTLINEEX:
if( ( uRect->left > iRight ) || ( uRect->top > iBottom ) ||
( uRect->bottom < iTop ) || ( uRect->right < iLeft ) )
if( uRect->left > iRight || uRect->top > iBottom ||
uRect->bottom < iTop || uRect->right < iLeft )
{
/* It is outside of the boundaries */
}