2012-10-03 19:06 UTC+0200 Viktor Szakats (harbour syenar.net)

+ extras/hbvpdf/fonts.dat
  * contrib/gtwvg/*
  * extras/gtwvw/*
  * contrib/hbct/tests/addascii.prg
  * contrib/hbct/tests/expomant.prg
  * contrib/hbct/tests/finan.prg
  * contrib/hbct/tests/math.prg
  * contrib/hbct/tests/num1.prg
  * contrib/hbct/tests/trig.prg
  * contrib/hbct/tests/wordswap.prg
  * contrib/hbct/token2.c
  * contrib/hbfimage/tests/fitest.prg
  * contrib/hbmisc/stringp.prg
  * contrib/hbnf/tests/aredit.prg
  * contrib/hbpgsql/tests/cache.prg
  * contrib/hbsqlit3/tests/metadata.prg
  * contrib/hbsqlit3/tests/sl3_test.prg
  * contrib/hbtip/popcli.prg
  * contrib/hbwin/tests/olesrv4.prg
  * contrib/hbwin/tests/oletst3.prg
  * contrib/rddads/tests/datad.prg
  * contrib/xhb/hbstruct.ch
  * contrib/xhb/tcgi.prg
  * contrib/xhb/tedit.prg
  * contrib/xhb/thtm.prg
  * contrib/xhb/ttable.prg
  * contrib/xhb/txml.prg
  * contrib/xhb/xhbcls.ch
  * contrib/xhb/xhberr.prg
  * contrib/xhb/xhbtedit.prg
  * doc/en/set.txt
  * extras/guestbk/testcgi.prg
  * extras/hbvpdf/hbvpdf.prg
  * extras/hbvpdf/hbvpdft.prg
  * extras/hbvpdf/hbvpsup.prg
  * extras/hbvpdf/tests/pdf_demo.prg
  * extras/hbvpdf/tests/tstpdf.prg
  * src/compiler/hbopt.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/tlabel.prg
  * src/rtl/treport.prg
  * tests/and_or.prg
  * tests/db_brows.prg
  * tests/gtchars.prg
  * tests/mt/mttest04.prg
  * tests/mt/mttest10.prg
  * tests/parexpr.prg
  * tests/rddtest/rddtst.prg
  * tests/vec1.prg
  * utils/hbtest/rt_misc.prg
  * utils/hbtest/rt_stra.prg
  * utils/hbtest/rt_trans.prg
    * more cleanups
    % font.dat restored and now included in binary form
      in source using __streaminclude #pragma (was base64 encoded)
This commit is contained in:
Viktor Szakats
2012-10-03 17:13:27 +00:00
parent 52d3f27442
commit c33aa5aec1
90 changed files with 2159 additions and 2164 deletions

View File

@@ -16,6 +16,63 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-10-03 19:06 UTC+0200 Viktor Szakats (harbour syenar.net)
+ extras/hbvpdf/fonts.dat
* contrib/gtwvg/*
* extras/gtwvw/*
* contrib/hbct/tests/addascii.prg
* contrib/hbct/tests/expomant.prg
* contrib/hbct/tests/finan.prg
* contrib/hbct/tests/math.prg
* contrib/hbct/tests/num1.prg
* contrib/hbct/tests/trig.prg
* contrib/hbct/tests/wordswap.prg
* contrib/hbct/token2.c
* contrib/hbfimage/tests/fitest.prg
* contrib/hbmisc/stringp.prg
* contrib/hbnf/tests/aredit.prg
* contrib/hbpgsql/tests/cache.prg
* contrib/hbsqlit3/tests/metadata.prg
* contrib/hbsqlit3/tests/sl3_test.prg
* contrib/hbtip/popcli.prg
* contrib/hbwin/tests/olesrv4.prg
* contrib/hbwin/tests/oletst3.prg
* contrib/rddads/tests/datad.prg
* contrib/xhb/hbstruct.ch
* contrib/xhb/tcgi.prg
* contrib/xhb/tedit.prg
* contrib/xhb/thtm.prg
* contrib/xhb/ttable.prg
* contrib/xhb/txml.prg
* contrib/xhb/xhbcls.ch
* contrib/xhb/xhberr.prg
* contrib/xhb/xhbtedit.prg
* doc/en/set.txt
* extras/guestbk/testcgi.prg
* extras/hbvpdf/hbvpdf.prg
* extras/hbvpdf/hbvpdft.prg
* extras/hbvpdf/hbvpsup.prg
* extras/hbvpdf/tests/pdf_demo.prg
* extras/hbvpdf/tests/tstpdf.prg
* src/compiler/hbopt.c
* src/rtl/gtsln/gtsln.c
* src/rtl/tlabel.prg
* src/rtl/treport.prg
* tests/and_or.prg
* tests/db_brows.prg
* tests/gtchars.prg
* tests/mt/mttest04.prg
* tests/mt/mttest10.prg
* tests/parexpr.prg
* tests/rddtest/rddtst.prg
* tests/vec1.prg
* utils/hbtest/rt_misc.prg
* utils/hbtest/rt_stra.prg
* utils/hbtest/rt_trans.prg
* more cleanups
% font.dat restored and now included in binary form
in source using __streaminclude #pragma (was base64 encoded)
2012-10-03 17:29 UTC+0200 Viktor Szakats (harbour syenar.net)
* config/postinst.hb
* utils/hbmk2/hbmk2.prg

View File

@@ -96,7 +96,7 @@ CLASS WvgActiveXControl FROM WvgWindow
DATA interface
DATA interfaceName
DATA lSubStdEvents INIT .f.
DATA lSubStdEvents INIT .F.
DATA hEvents INIT { => }
DATA hContainer
@@ -277,7 +277,7 @@ METHOD WvgActiveXControl:mapEvent( nEvent, bBlock )
//
METHOD WvgActiveXControl:inheritPresParams()
Local lSuccess := .t.
Local lSuccess := .T.
RETURN lSuccess

View File

@@ -93,7 +93,7 @@ CLASS WvgBitmap
DATA hBitmap
DATA hDCcompat
DATA lDCToDestroy INIT .f.
DATA lDCToDestroy INIT .F.
METHOD new()
METHOD create( oPScompat )
@@ -126,7 +126,7 @@ METHOD create( oPScompat ) CLASS WvgBitmap
IF oPScompat == NIL
::hDCComp := WVG_GetDC()
::lDCToDestroy := .t.
::lDCToDestroy := .T.
ELSE
::hDCComp := oPScompat:hDC
ENDIF

View File

@@ -165,7 +165,7 @@ CLASS wvtDialog
DATA nKey
DATA hFonts INIT {}
DATA lEventHandled
DATA lTabStops INIT .f.
DATA lTabStops INIT .F.
DATA bOnCreate
ACCESS nObjects INLINE len( ::aObjects )
@@ -242,7 +242,7 @@ METHOD wvtDialog:New( nRows, nCols, cTitle, cFont, nFontHeight, nFontWidth,nFont
::nKey := 0
::cColor := "N/W"
::nUseObj := 0
::lGui := Wvt_SetGui( .f. )
::lGui := Wvt_SetGui( .F. )
RETURN Self
@@ -251,7 +251,7 @@ METHOD wvtDialog:New( nRows, nCols, cTitle, cFont, nFontHeight, nFontWidth,nFont
METHOD wvtDialog:Create()
LOCAL aPalette, i, j
::oldToolTipActive := Wvt_SetToolTipActive( .t. )
::oldToolTipActive := Wvt_SetToolTipActive( .T. )
IF ::nTooltipWidth != nil
Wvt_setTooltipWidth( ::nTooltipWidth )
ENDIF
@@ -271,7 +271,7 @@ METHOD wvtDialog:Create()
::aOldPnt := WvtSetPaint( {} )
SetMode( ::nRows, ::nCols )
do while .t.
do while .T.
IF Wvt_SetFont( ::cFont, ::nFontHeight, ::nFontWidth, ::nFontBold, ::nFontQuality )
EXIT
ENDIF
@@ -303,7 +303,7 @@ METHOD wvtDialog:Create()
WvtSetPaint( wvg_GetPaint( ::cPaintBlockID ) )
IF ascan( ::aObjects, {| o | o:lTabStop } ) > 0
::lTabStops := .t.
::lTabStops := .T.
ENDIF
::Update()
@@ -374,7 +374,7 @@ METHOD wvtDialog:Event()
METHOD wvtDialog:Execute()
IF ::nObjects == 0
DO WHILE .t.
DO WHILE .T.
IF inkey( 0.1, INKEY_ALL + HB_INKEY_GTEVENT ) == K_ESC
EXIT
ENDIF
@@ -391,7 +391,7 @@ METHOD wvtDialog:Execute()
METHOD wvtDialog:Inkey()
LOCAL n, oObj, nID, i
::lEventHandled := .f.
::lEventHandled := .F.
::nUseObj := 0
::nKey := ::Event()
@@ -406,7 +406,7 @@ METHOD wvtDialog:Inkey()
CASE ::nKey == K_TAB
IF ::lTabStops
DO WHILE .t.
DO WHILE .T.
::nCurObj++
IF ::nCurObj > ::nObjects
::nCurObj := 1
@@ -417,11 +417,11 @@ METHOD wvtDialog:Inkey()
ENDDO
ENDIF
::lEventHandled := .t.
::lEventHandled := .T.
CASE ::nKey == K_SH_TAB
IF ::lTabStops
DO WHILE .t.
DO WHILE .T.
::nCurObj--
IF ::nCurObj < 1
::nCurObj := ::nObjects
@@ -432,7 +432,7 @@ METHOD wvtDialog:Inkey()
ENDDO
ENDIF
::lEventHandled := .t.
::lEventHandled := .T.
CASE ::nKey == K_MOUSEMOVE .or. ::nKey == K_MMLEFTDOWN
::MouseOver()
@@ -443,7 +443,7 @@ METHOD wvtDialog:Inkey()
ELSE
Wvt_SetPointer( WVT_IDC_ARROW )
ENDIF
::lEventHandled := .t.
::lEventHandled := .T.
ENDCASE
@@ -475,7 +475,7 @@ METHOD wvtDialog:Inkey()
::nUseObj := ::nObjOver
ELSE
::lEventHandled := .t.
::lEventHandled := .T.
ENDIF
ENDIF
@@ -530,7 +530,7 @@ METHOD wvtDialog:Inkey()
IF !( ::lEventHandled := ::aObjects[ ::nUseObj ]:LeftDown() )
::lEventHandled := ::Eval( ::aObjects[ ::nUseObj ]:bOnLeftDown )
IF ::aObjects[ ::nUseObj ]:className == "WVTBROWSE"
::lEventHandled := .f.
::lEventHandled := .F.
ENDIF
ENDIF
ENDIF
@@ -758,9 +758,9 @@ CLASS WvtObject
DATA xSettings
DATA cText
DATA cToolTip
DATA lActive INIT .t.
DATA lAnimate INIT .f.
DATA lTabStop INIT .t.
DATA lActive INIT .T.
DATA lAnimate INIT .F.
DATA lTabStop INIT .T.
DATA hFont
DATA aPopup INIT {}
@@ -801,7 +801,7 @@ CLASS WvtObject
DATA bOnFocus INIT {|| NIL }
DATA bOnRefresh INIT {|| NIL }
DATA bOnLeftUp INIT {|| NIL }
DATA bOnLeftDown INIT {|| .f. }
DATA bOnLeftDown INIT {|| .F. }
DATA bOnMMLeftDown INIT {|| NIL }
DATA bOnLeftPressed INIT {|| NIL }
DATA bTooltip INIT {|| NIL }
@@ -828,11 +828,11 @@ CLASS WvtObject
METHOD PaintBlock() INLINE nil
METHOD Hilite() INLINE nil
METHOD DeHilite() INLINE nil
METHOD HandleEvent() INLINE .f.
METHOD LeftDown() INLINE .f.
METHOD LeftUp() INLINE .f.
METHOD MMLeftDown() INLINE .f.
METHOD LeftPressed() INLINE .f.
METHOD HandleEvent() INLINE .F.
METHOD LeftDown() INLINE .F.
METHOD LeftUp() INLINE .F.
METHOD MMLeftDown() INLINE .F.
METHOD LeftPressed() INLINE .F.
METHOD HoverOn() INLINE nil
METHOD HoverOff() INLINE nil
METHOD OnTimer() INLINE nil
@@ -866,7 +866,7 @@ METHOD WvtObject:New( oParent, nType, nID, nTop, nLeft, nBottom, nRight )
CASE DLG_OBJ_STATIC
::ClassName := "WVTSTATIC"
::lTabStop := .f.
::lTabStop := .F.
EXIT
CASE DLG_OBJ_GETS
@@ -875,7 +875,7 @@ METHOD WvtObject:New( oParent, nType, nID, nTop, nLeft, nBottom, nRight )
CASE DLG_OBJ_IMAGE
::ClassName := "WVTIMAGE"
::lTabStop := .f.
::lTabStop := .F.
EXIT
CASE DLG_OBJ_PUSHBUTTON
@@ -884,42 +884,42 @@ METHOD WvtObject:New( oParent, nType, nID, nTop, nLeft, nBottom, nRight )
CASE DLG_OBJ_BUTTON
::ClassName := "WVTBUTTON"
::lTabStop := .f.
::lTabStop := .F.
EXIT
CASE DLG_OBJ_TOOLBAR
::ClassName := "WVTTOOLBAR"
::lTabStop := .f.
::lTabStop := .F.
EXIT
CASE DLG_OBJ_LABEL
::ClassName := "WVTLABEL"
::lTabStop := .f.
::lTabStop := .F.
EXIT
CASE DLG_OBJ_SCROLLBAR
::ClassName := "WVTSCROLLBAR"
::lTabStop := .f.
::lTabStop := .F.
EXIT
CASE DLG_OBJ_STATUSBAR
::ClassName := "WVTSTATUSBAR"
::lTabStop := .f.
::lTabStop := .F.
EXIT
CASE DLG_OBJ_BANNER
::ClassName := "WVTBANNER"
::lTabStop := .f.
::lTabStop := .F.
EXIT
CASE DLG_OBJ_TEXTBOX
::ClassName := "WVTTEXTBOX"
::lTabStop := .f.
::lTabStop := .F.
EXIT
CASE DLG_OBJ_PROGRESSBAR
::ClassName := "WVTPROGRESSBAR"
::lTabStop := .f.
::lTabStop := .F.
EXIT
end
@@ -974,7 +974,7 @@ METHOD WvtObject:CreatePopup()
//
METHOD WvtObject:ShowPopup()
LOCAL lRet := .f., nRet, n, aPos
LOCAL lRet := .F., nRet, n, aPos
IF ::hPopup != nil
aPos := Wvt_GetCursorPos()
@@ -983,7 +983,7 @@ METHOD WvtObject:ShowPopup()
aPos[ 1 ], aPos[ 2 ], 0, Wvt_GetWindowHandle() )
IF nRet > 0
IF ( n := ascan( ::aPopup, {| e_ | e_[ 3 ] == nRet } ) ) > 0
lRet := .t.
lRet := .T.
IF HB_ISBLOCK( ::aPopup[ n,2 ] )
Eval( ::aPopup[ n,2 ] )
@@ -1008,8 +1008,8 @@ CLASS WvtBrowse FROM WvtObject
DATA cAlias
DATA oBrw
DATA lHSBar INIT .t.
DATA lVSBar INIT .t.
DATA lHSBar INIT .T.
DATA lVSBar INIT .T.
DATA oHBar
DATA oVBar
DATA bTotalRecords
@@ -1163,7 +1163,7 @@ METHOD WvtBrowse:Refresh()
//
METHOD WvtBrowse:HandleEvent( nKey )
LOCAL lRet := .f.
LOCAL lRet := .F.
IF valtype( ::bHandleEvent ) == "B"
lRet := eval( ::bHandleEvent, self, ::oParent:cPaintBlockID, ::oBrw, nKey )
@@ -1531,7 +1531,7 @@ METHOD WvtLabel:New( oParent, nID, nTop, nLeft, nBottom, nRight )
METHOD WvtLabel:Create( lConfg )
DEFAULT lConfg TO .f.
DEFAULT lConfg TO .F.
DEFAULT ::nBottom TO ::nTop
DEFAULT ::nRight TO ::nLeft + len( ::Text )
@@ -1616,14 +1616,14 @@ METHOD WvtLabel:Configure()
//
METHOD WvtLabel:HoverOn()
LOCAL lOn := .f.
LOCAL lOn := .F.
IF ::nTextColorHoverOn != nil
lOn := .t.
lOn := .T.
::nTextColor := ::nTextColorHoverOn
ENDIF
IF ::nBackColorHoverOn != nil
lOn := .t.
lOn := .T.
::nBackColor := ::nBackColorHoverOn
ENDIF
@@ -1636,14 +1636,14 @@ METHOD WvtLabel:HoverOn()
//
METHOD WvtLabel:HoverOff()
LOCAL lOn := .f.
LOCAL lOn := .F.
IF ::nTextColorHoverOn != nil
lOn := .t.
lOn := .T.
::nTextColor := ::nTextColorHoverOff
ENDIF
IF ::nBackColorHoverOn != nil
lOn := .t.
lOn := .T.
::nBackColor := ::nBackColorHoverOff
ENDIF
@@ -1667,7 +1667,7 @@ CLASS WvtToolBar FROM WvtObject
DATA nPaintID
DATA aObjects INIT {}
DATA lHidden INIT .f.
DATA lHidden INIT .F.
DATA nCurButton INIT 0
DATA lActive
DATA lFloating
@@ -1699,7 +1699,7 @@ METHOD WvtToolBar:New( oParent, nID, nTop, nLeft, nBottom, nRight )
::Super:New( oParent, DLG_OBJ_TOOLBAR, nID, nTop, nLeft, nBottom, nRight )
::lActive := .t.
::lActive := .T.
::lFloating := .F.
::nPaintID := ::oParent:nPaintID++
@@ -1710,8 +1710,8 @@ METHOD WvtToolBar:New( oParent, nID, nTop, nLeft, nBottom, nRight )
METHOD WvtToolBar:Create()
IF ::lFloating
::lActive := .f.
::lHidden := .t.
::lActive := .F.
::lHidden := .T.
ENDIF
aeval( ::aObjects, {| o | o:lActive := ::lActive } )
@@ -1785,8 +1785,8 @@ METHOD WvtToolBar:AddButton( cFileImage, bBlock, cTooltip )
METHOD WvtToolBar:HoverOn()
IF ::lFloating .and. ::lHidden
::lHidden := .f.
::lActive := .t.
::lHidden := .F.
::lActive := .T.
#IF 0
::cScreen := SaveScreen( ::nTop, ::nLeft, ::nBottom, ::nRight )
::wScreen := Wvt_SaveScreen( ::nTop, ::nLeft, ::nBottom, ::nRight )
@@ -1803,12 +1803,12 @@ METHOD WvtToolBar:HoverOn()
METHOD WvtToolBar:HoverOff()
IF ::lFloating .and. !( ::lHidden )
::lHidden := .t.
::lActive := .f.
::lHidden := .T.
::lActive := .F.
aeval( ::aObjects, {| o | o:lActive := ::lActive } )
#IF 0
RestScreen( ::nTop, ::nLeft, ::nBottom, ::nRight, ::cScreen )
Wvt_RestScreen( ::nTop, ::nLeft, ::nBottom, ::nRight, ::wScreen, .f. )
Wvt_RestScreen( ::nTop, ::nLeft, ::nBottom, ::nRight, ::wScreen, .F. )
#ENDIF
::Refresh()
ENDIF
@@ -1890,11 +1890,11 @@ METHOD WvtToolButton:PaintButton()
//
METHOD WvtToolButton:LeftDown()
LOCAL lRet := .f.
LOCAL lRet := .F.
IF ::lActive .and. ::nBtnType == TLB_BUTTON_TYPE_IMAGE
Wvt_DrawToolButtonState( ::nTop, ::nLeft, ::nBottom, ::nRight, ::aPxlOffSet, 2 )
lRet := .t.
lRet := .T.
ENDIF
RETURN lRet
@@ -1902,12 +1902,12 @@ METHOD WvtToolButton:LeftDown()
//
METHOD WvtToolButton:LeftUp()
LOCAL lRet := .f.
LOCAL lRet := .F.
IF ::lActive .and. ::nBtnType == TLB_BUTTON_TYPE_IMAGE
Wvt_DrawToolButtonState( ::nTop, ::nLeft, ::nBottom, ::nRight, ::aPxlOffSet, 1 )
Eval( ::bOnLeftUp )
lRet := .t.
lRet := .T.
ENDIF
RETURN lRet
@@ -2042,12 +2042,12 @@ METHOD WvtStatic:New( oParent, nID, nTop, nLeft, nBottom, nRight )
//
METHOD WvtStatic:Create()
LOCAL lInside := .f.
LOCAL lInside := .F.
SWITCH ::nStatic
CASE WVT_STATIC_LINE
lInside := .t.
lInside := .T.
::bPaint := {|| Wvt_DrawLine( ::nTop, ::nLeft, ::nBottom, ::nRight, ;
::nOrient, ::nFormat, ::nAlign, ::nStyle, ::nThick, ::nColor ) }
EXIT
@@ -2073,27 +2073,27 @@ METHOD WvtStatic:Create()
EXIT
CASE WVT_STATIC_RECTANGLE
lInside := .t.
lInside := .T.
::bPaint := {|| Wvt_DrawRectangle( ::nTop, ::nLeft, ::nBottom, ::nRight, ::aPxlOffSet ) }
EXIT
CASE WVT_STATIC_ROUNDRECT
lInside := .t.
lInside := .T.
::bPaint := {|| Wvt_DrawRoundRect( ::nTop, ::nLeft, ::nBottom, ::nRight, ::aPxlOffSet ) }
EXIT
CASE WVT_STATIC_FOCUSRECT
lInside := .t.
lInside := .T.
::bPaint := {|| Wvt_DrawFocusRect( ::nTop, ::nLeft, ::nBottom, ::nRight, ::aPxlOffSet ) }
EXIT
CASE WVT_STATIC_ELLIPSE
lInside := .t.
lInside := .T.
::bPaint := {|| Wvt_DrawEllipse( ::nTop, ::nLeft, ::nBottom, ::nRight, ::aPxlOffSet ) }
EXIT
CASE WVT_STATIC_SHADEDRECT
lInside := .t.
lInside := .T.
::bPaint := {|| Wvt_DrawShadedRect( ::nTop, ::nLeft, ::nBottom, ::nRight, ;
::aPxlOffSet, ::nHorzVert, ::aRGBb, ::aRGBe ) }
EXIT
@@ -2205,7 +2205,7 @@ METHOD WvtPushButton:LeftDown()
Wvt_DrawToolButtonState( ::nTop, ::nLeft, ::nBottom, ::nRight,{0,0,0,0} , 2 )
RETURN .t.
RETURN .T.
//
@@ -2214,7 +2214,7 @@ METHOD WvtPushButton:LeftUp()
Wvt_DrawToolButtonState( ::nTop, ::nLeft, ::nBottom, ::nRight, {0,0,0,0}, 1 )
::Eval( ::bOnLeftUp )
RETURN .t.
RETURN .T.
//
//
@@ -2323,12 +2323,12 @@ METHOD WvtGets:AddGets( nRow, nCol, xVar, cPic, cColor, bValid, bWhen )
//
METHOD WvtGets:HandleEvent( nKey )
LOCAL lRet := .f.
LOCAL lRet := .F.
DO CASE
CASE nKey == K_LDBLCLK
::Read()
lRet := .t.
lRet := .T.
ENDCASE
RETURN lRet
@@ -2410,7 +2410,7 @@ CLASS WvtScrollBar FROM WvtObject
DATA bBtnScroll
DATA bTotal
DATA bCurrent
DATA lHidden INIT .t.
DATA lHidden INIT .T.
DATA aPxlBtnTop INIT {0,0,0,0}
DATA aPxlBtnLft INIT {0,0,0,0}
@@ -2418,10 +2418,10 @@ CLASS WvtScrollBar FROM WvtObject
DATA aPxlBtnRgt INIT {0,0,0,0}
DATA aPxlScroll INIT {0,0,0,0}
DATA lLeftDown INIT .f.
DATA lOnThumb INIT .f.
DATA lAnchored INIT .f.
DATA lOnLeftDown INIT .f.
DATA lLeftDown INIT .F.
DATA lOnThumb INIT .F.
DATA lAnchored INIT .F.
DATA lOnLeftDown INIT .F.
DATA nScrollUnits INIT 0
@@ -2489,9 +2489,9 @@ METHOD wvtScrollbar:Create()
{|| Wvt_DrawScrollThumbVert( ::nSTop ,::nSLeft ,::nSBottom,::nSRight,::aPxlScroll,;
::nThumbPos ) }
::bBtnLeftTopDep := ;
{|| Wvt_DrawScrollButton( ::nBtn1Top,::nBtn1Left,::nBtn1Bottom,::nBtn1Right,::aPxlBtnTop,1,.t. ) }
{|| Wvt_DrawScrollButton( ::nBtn1Top,::nBtn1Left,::nBtn1Bottom,::nBtn1Right,::aPxlBtnTop,1,.T. ) }
::bBtnRightBottomDep := ;
{|| Wvt_DrawScrollButton( ::nBtn2Top,::nBtn2Left,::nBtn2Bottom,::nBtn2Right,::aPxlBtnBtm,3,.t. ) }
{|| Wvt_DrawScrollButton( ::nBtn2Top,::nBtn2Left,::nBtn2Bottom,::nBtn2Right,::aPxlBtnBtm,3,.T. ) }
ELSE
DEFAULT ::nBottom TO ::nTop
@@ -2529,14 +2529,14 @@ METHOD wvtScrollbar:Create()
::bBtnScroll := ;
{|| Wvt_DrawScrollThumbHorz( ::nSTop,::nSLeft,::nSBottom,::nSRight, ::aPxlScroll,::nThumbPos ) }
::bBtnLeftTopDep := ;
{|| Wvt_DrawScrollButton( ::nBtn1Top,::nBtn1Left,::nBtn1Bottom,::nBtn1Right,::aPxlBtnLft,2,.t. ) }
{|| Wvt_DrawScrollButton( ::nBtn1Top,::nBtn1Left,::nBtn1Bottom,::nBtn1Right,::aPxlBtnLft,2,.T. ) }
::bBtnRightBottomDep := ;
{|| Wvt_DrawScrollButton( ::nBtn2Top,::nBtn2Left,::nBtn2Bottom,::nBtn2Right,::aPxlBtnRgt,4,.t. ) }
{|| Wvt_DrawScrollButton( ::nBtn2Top,::nBtn2Left,::nBtn2Bottom,::nBtn2Right,::aPxlBtnRgt,4,.T. ) }
ENDIF
::bOnLeftUp := {|| ::HandleEvent( K_LBUTTONUP ) }
::bOnLeftDown := {|| ::HandleEvent( K_LBUTTONDOWN ), .f. }
::bOnLeftDown := {|| ::HandleEvent( K_LBUTTONDOWN ), .F. }
::bOnMMLeftDown := {|| ::HandleEvent( K_MMLEFTDOWN ) }
::bOnLeftPressed := {|| ::HandleEvent( K_LBUTTONPRESSED ) }
@@ -2709,7 +2709,7 @@ METHOD wvtScrollbar:HandleEvent( nKey )
LOCAL mKeys_:={ K_LBUTTONDOWN, K_LBUTTONUP, K_MMLEFTDOWN, K_LBUTTONPRESSED }
IF ascan( mKeys_, nKey ) == 0
RETURN .f.
RETURN .F.
ENDIF
nmRow := MRow()
@@ -2717,7 +2717,7 @@ METHOD wvtScrollbar:HandleEvent( nKey )
DO CASE
CASE ::nBarType == WVT_SCROLLBAR_VERT
lHit := .t.
lHit := .T.
DO CASE
CASE ::lAnchored .and. nKey == K_MMLEFTDOWN
@@ -2742,21 +2742,21 @@ METHOD wvtScrollbar:HandleEvent( nKey )
::SetTooltip()
Wvt_Keyboard( K_SBTHUMBTRACKVERT )
ELSE
lHit := .f.
lHit := .F.
ENDIF
CASE ::lAnchored .and. nKey == K_LBUTTONUP
::lAnchored := .f.
::lAnchored := .F.
OTHERWISE
lHit := .f.
lHit := .F.
IF nmCol >= ::nLeft .and. nmCol <= ::nRight
lHit := .t.
lHit := .T.
DO CASE
CASE nmRow == ::nThumbPos .and. nKey == K_LBUTTONDOWN
::lAnchored := .t.
::lAnchored := .T.
CASE nKey == K_LBUTTONUP
IF ( lHit := ::lOnLeftDown )
@@ -2768,10 +2768,10 @@ METHOD wvtScrollbar:HandleEvent( nKey )
CASE nmRow < ::nThumbPos .and. nmRow > ::nTop
CASE nmRow > ::nThumbPos .and. nmRow < ::nBottom
OTHERWISE
lHit := .f.
lHit := .F.
ENDCASE
IF lHit
::lOnLeftDown := .f.
::lOnLeftDown := .F.
ENDIF
ENDIF
@@ -2787,7 +2787,7 @@ METHOD wvtScrollbar:HandleEvent( nKey )
CASE nmRow > ::nThumbPos .and. nmRow < ::nBottom
Wvt_Keyboard( K_SBPAGEDOWN )
OTHERWISE
lHit := .f.
lHit := .F.
ENDCASE
ENDIF
@@ -2804,10 +2804,10 @@ METHOD wvtScrollbar:HandleEvent( nKey )
CASE nmRow > ::nThumbPos .and. nmRow < ::nBottom
Wvt_Keyboard( K_SBPAGEDOWN )
OTHERWISE
lHit := .f.
lHit := .F.
ENDCASE
IF lHit
::lOnLeftDown := .t.
::lOnLeftDown := .T.
ENDIF
ENDCASE
ENDIF
@@ -2841,8 +2841,8 @@ METHOD wvtScrollbar:HandleEvent( nKey )
ENDIF
CASE ::lAnchored .and. nKey == K_LBUTTONUP
::lAnchored := .f.
lHit := .t.
::lAnchored := .F.
lHit := .T.
OTHERWISE
@@ -2850,7 +2850,7 @@ METHOD wvtScrollbar:HandleEvent( nKey )
DO CASE
CASE nKey == K_LBUTTONDOWN .and. nmCol >= ::nThumbPos .and. nmCol <= ::nThumbPos+1
::lAnchored := .t.
::lAnchored := .T.
CASE nKey == K_LBUTTONUP
@@ -2863,10 +2863,10 @@ METHOD wvtScrollbar:HandleEvent( nKey )
CASE nmCol < ::nThumbPos
CASE nmCol > ::nThumbPos+1
OTHERWISE
lHit := .f.
lHit := .F.
ENDCASE
IF lHit
::lOnLeftDown := .f.
::lOnLeftDown := .F.
ENDIF
ENDIF
@@ -2882,7 +2882,7 @@ METHOD wvtScrollbar:HandleEvent( nKey )
CASE nmCol > ::nThumbPos+1
Wvt_Keyboard( K_SBPAGERIGHT )
OTHERWISE
lHit := .f.
lHit := .F.
ENDCASE
ENDIF
@@ -2899,10 +2899,10 @@ METHOD wvtScrollbar:HandleEvent( nKey )
CASE nmCol > ::nThumbPos+1
Wvt_Keyboard( K_SBPAGERIGHT )
OTHERWISE
lHit := .f.
lHit := .F.
ENDCASE
IF lHit
::lOnLeftDown := .t.
::lOnLeftDown := .T.
ENDIF
ENDCASE
ENDIF
@@ -3198,8 +3198,8 @@ CLASS WvtProgressBar FROM WvtObject
DATA cImage
DATA nDirection INIT 0 /* 0-Left-Right,Top-Bottom 1-Right-Left,Bottom-Top */
DATA nStyle INIT 0
DATA lVertical INIT .f.
DATA lActive INIT .f.
DATA lVertical INIT .F.
DATA lActive INIT .F.
DATA nBarColor INIT RGB( 0,0,128 )
DATA nCurrent INIT 0
@@ -3273,7 +3273,7 @@ METHOD WvtProgressBar:Activate()
::cScreen := SaveScreen( ::nTop, ::nLeft, ::nBottom, ::nRight )
DispBox( ::nTop, ::nLeft, ::nBottom, ::nRight, " ", ::cBackColor )
::lActive := .t.
::lActive := .T.
RETURN Self
@@ -3281,7 +3281,7 @@ METHOD WvtProgressBar:Activate()
METHOD WvtProgressBar:DeActivate()
::lActive := .f.
::lActive := .F.
::nCurrent := 0
::nTotal := 1
RestScreen( ::nTop, ::nLeft, ::nBottom, ::nRight, ::cScreen )

View File

@@ -155,11 +155,11 @@ CLASS WvgCrt INHERIT WvgWindow, WvgPartHandler
DATA sl_dragDrop
/* HARBOUR implementation */
DATA resizable INIT .t.
DATA resizable INIT .T.
DATA resizeMode INIT HB_GTI_RESIZEMODE_FONT
DATA style INIT (WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_SIZEBOX + WS_MINIMIZEBOX + WS_MAXIMIZEBOX)
DATA exStyle INIT 0
DATA lModal INIT .f.
DATA lModal INIT .F.
DATA pGTp
DATA pGT
DATA objType INIT objTypeCrt
@@ -356,7 +356,7 @@ METHOD WvgCrt:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF ::visible
Hb_GtInfo( HB_GTI_SPEC, HB_GTS_SHOWWINDOW, SW_NORMAL )
::lHasInputFocus := .t.
::lHasInputFocus := .T.
ENDIF
RETURN Self
@@ -557,7 +557,7 @@ METHOD WvgCrt:setFontCompoundName()
//
METHOD WvgCrt:setFrameState( nState )
Local lSuccess := .f.
Local lSuccess := .F.
DO CASE
@@ -627,7 +627,7 @@ METHOD WvgCrt:setSize( aSize, lPaint )
METHOD WvgCrt:show()
Hb_GtInfo( HB_GTI_SPEC, HB_GTS_SHOWWINDOW, SW_NORMAL )
::lHasInputFocus := .t.
::lHasInputFocus := .T.
RETURN Self

View File

@@ -180,7 +180,7 @@ METHOD WvgDataRef:setData( xValue, mp2 )
CASE ::className == "SCROLLBAR"
IF ::sl_editBuffer != NIL
WAPI_SetScrollPos( ::pWnd, SB_CTL, ::sl_editBuffer, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, ::sl_editBuffer, .T. )
ENDIF
CASE ::className == "COMBOBOX"
@@ -200,7 +200,7 @@ METHOD WvgDataRef:setData( xValue, mp2 )
METHOD WvgDataRef:undo()
RETURN .f.
RETURN .F.
//
@@ -212,6 +212,6 @@ METHOD WvgDataRef:validate( xParam )
::sl_validate := xParam
ENDIF
RETURN .t.
RETURN .T.
//

View File

@@ -81,7 +81,7 @@ CLASS WvgDialog FROM WvgWindow
DATA oMenu
DATA aRect
DATA drawingArea
DATA tasklist INIT .t.
DATA tasklist INIT .T.
METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -161,10 +161,10 @@ METHOD WvgDialog:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
endif
if ::visible
::lHasInputFocus := .t.
::lHasInputFocus := .T.
ENDIF
oW := WvgDrawingArea():new( Self ):create( , , {0,0}, Self:currentSize(), , .f. )
oW := WvgDrawingArea():new( Self ):create( , , {0,0}, Self:currentSize(), , .F. )
IF ! empty( oW:hWnd )
::drawingArea := oW
ELSE
@@ -207,7 +207,7 @@ METHOD WvgDialog:destroy()
//
METHOD WvgDialog:setFrameState( nState )
LOCAL lSuccess := .f.
LOCAL lSuccess := .F.
DO CASE

View File

@@ -98,7 +98,7 @@ METHOD WvgDrawingArea:new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::exStyle := 0
::className := "DrawingArea"
::objType := objTypeDA
::visible := .t.
::visible := .T.
RETURN Self
@@ -108,7 +108,7 @@ METHOD WvgDrawingArea:create( oParent, oOwner, aPos, aSize, aPresParams, lVisibl
HB_SYMBOL_UNUSED( lVisible )
::wvgWindow:create( oParent, oOwner, aPos, aSize, aPresParams, .t. )
::wvgWindow:create( oParent, oOwner, aPos, aSize, aPresParams, .T. )
::oParent:addChild( Self )

View File

@@ -281,7 +281,7 @@ METHOD WvgMenuBar:addItem( aItem, p2, p3, p4 )
nAttrib := p4
ENDIF
RETURN ::putItem( { xCaption, bAction, nStyle, nAttrib }, -1, .t. )
RETURN ::putItem( { xCaption, bAction, nStyle, nAttrib }, -1, .T. )
//
@@ -289,7 +289,7 @@ METHOD WvgMenuBar:putItem( aItem, nPos, lInsert )
LOCAL nItemIndex, cCaption
LOCAL xCaption, bAction, nStyle, nAttrib
DEFAULT lInsert TO .t.
DEFAULT lInsert TO .T.
ASize( aItem, 4 )
@@ -333,7 +333,7 @@ METHOD WvgMenuBar:putItem( aItem, nPos, lInsert )
ELSE
nItemIndex := nPos
IF lInsert
::aMenuItems := hb_AIns( ::aMenuItems, nPos, aItem, .t. )
::aMenuItems := hb_AIns( ::aMenuItems, nPos, aItem, .T. )
WVG_InsertMenu( ::hMenu, ;
nItemIndex - 1, ;
aItem[ 1 ] + MF_BYPOSITION, ;
@@ -424,7 +424,7 @@ METHOD WvgMenuBar:checkItem( nItemNum, lCheck )
//
METHOD WvgMenuBar:enableItem( nItemNum )
LOCAL lSuccess := .f.
LOCAL lSuccess := .F.
IF !empty( ::hMenu ) .AND. HB_ISNUMERIC( nItemNum )
lSuccess := WVG_EnableMenuItem( ::hMenu, nItemNum-1, MF_BYPOSITION + MF_ENABLED )
@@ -435,7 +435,7 @@ METHOD WvgMenuBar:enableItem( nItemNum )
//
METHOD WvgMenuBar:disableItem( nItemNum )
LOCAL lSuccess := .f.
LOCAL lSuccess := .F.
IF !empty( ::hMenu ) .AND. !empty( nItemNum )
lSuccess := WVG_EnableMenuItem( ::hMenu, nItemNum-1, MF_BYPOSITION + MF_GRAYED )
@@ -457,7 +457,7 @@ METHOD WvgMenuBar:getItem( nItemNum )
METHOD WvgMenuBar:insItem( nItemNum, aItem )
::putItem( aItem, nItemNum, .t. )
::putItem( aItem, nItemNum, .T. )
RETURN Self
@@ -478,16 +478,16 @@ METHOD WvgMenuBar:isItemEnabled( nItemNum )
METHOD WvgMenuBar:selectItem( nItemNum )
IF HB_ISNUMERIC( nItemNum )
RETURN .f.
RETURN .F.
ENDIF
RETURN .t.
RETURN .T.
//
METHOD WvgMenuBar:setItem( nItemNum, aItem )
RETURN ::putItem( aItem, nItemNum, .f. )
RETURN ::putItem( aItem, nItemNum, .F. )
//
/* Callback Methods */

View File

@@ -89,7 +89,7 @@ function WvtPaintObjects()
tlbr_:= Wvt_GetPaintRect()
for i := 1 to nBlocks
lExe := .t.
lExe := .T.
if aBlocks[ i,3 ] != nil .and. !empty( aBlocks[ i,3 ] )
/* Check parameters against tlbr_ depending upon the
@@ -99,7 +99,7 @@ function WvtPaintObjects()
case aBlocks[ i,3,1 ] == WVT_BLOCK_GRID_V
b := aBlocks[ i,3,6 ]
if len( b:aColumnsSep ) == 0
lExe := .f.
lExe := .F.
else
nLeft := b:aColumnsSep[ 1 ]
nRight := b:aColumnsSep[ len( b:aColumnsSep ) ]
@@ -107,7 +107,7 @@ function WvtPaintObjects()
tlbr_[ 3 ] >= aBlocks[ i,3,2 ] .and. ; /* bootm > top */
tlbr_[ 2 ] <= nRight + 1 .and. ; /* left < right */
tlbr_[ 4 ] >= nLeft - 2 ) /* right > left */
lExe := .f.
lExe := .F.
endif
endif
@@ -116,7 +116,7 @@ function WvtPaintObjects()
tlbr_[ 3 ] >= aBlocks[ i,3,2 ] .and. ; /* bootm > top */
tlbr_[ 2 ] <= aBlocks[ i,3,5 ] .and. ; /* left < righ */
tlbr_[ 4 ] >= aBlocks[ i,3,3 ] ) /* right > left */
lExe := .f.
lExe := .F.
endif
otherwise
@@ -127,7 +127,7 @@ function WvtPaintObjects()
tlbr_[ 3 ] >= aBlocks[ i,3,2 ] .and. ; /* bootm >= top */
tlbr_[ 2 ] <= aBlocks[ i,3,5 ] .and. ; /* left < right */
tlbr_[ 4 ] >= aBlocks[ i,3,3 ] ) /* right > left */
lExe := .f.
lExe := .F.
endif
endcase
endif
@@ -200,7 +200,7 @@ function wvg_DelPaint( cID, nAction )
if ( n := ascan( t_paint_, {| e_ | e_[ 1 ] == cID } ) ) > 0
if ( n1 := ascan( t_paint_[ n, 2 ], {| e_ | e_[ 1 ] == nAction } ) ) > 0
xData := t_paint_[ n,2,n1,2 ]
t_paint_[ n,2,n1,2 ] := {|| .t. }
t_paint_[ n,2,n1,2 ] := {|| .T. }
endif
endif
@@ -211,7 +211,7 @@ function wvg_DelPaint( cID, nAction )
function wvg_PurgePaint( cID,lDummy )
local n, aPaint
DEFAULT lDummy TO .f.
DEFAULT lDummy TO .F.
if ( n := ascan( t_paint_, {| e_ | e_[ 1 ] == cID } ) ) > 0
aPaint := t_paint_[ n ]
@@ -230,7 +230,7 @@ function wvg_PurgePaint( cID,lDummy )
function wvg_InsertPaint( cID, aPaint, lSet )
local n
DEFAULT lSet TO .f.
DEFAULT lSet TO .F.
if ( n := ascan( t_paint_, {| e_ | e_[ 1 ] == cID } ) ) > 0
t_paint_[ n ] := aPaint
@@ -476,7 +476,7 @@ Function Wvt_DialogBox( acnDlg, cbDlgProc, hWndParent )
xTemplate := acnDlg
endif
nResult := Wvt_CreateDialogModal( xTemplate, .f., cbDlgProc, nDlgMode, hWndParent )
nResult := Wvt_CreateDialogModal( xTemplate, .F., cbDlgProc, nDlgMode, hWndParent )
Wvg_SetFocus( hWndParent )
@@ -727,8 +727,8 @@ FUNCTION Wvt_GetWindowHandle()
FUNCTION Wvt_CenterWindow( lCenter, lRePaint )
DEFAULT lCenter TO .t.
DEFAULT lRePaint TO .f.
DEFAULT lCenter TO .T.
DEFAULT lRePaint TO .F.
RETURN Hb_GtInfo( HB_GTI_SPEC, HB_GTS_CENTERWINDOW, { lCenter, lRePaint } )
@@ -736,8 +736,8 @@ FUNCTION Wvt_CenterWindow( lCenter, lRePaint )
FUNCTION Wvt_WindowCentre( lCenter, lRePaint )
DEFAULT lCenter TO .t.
DEFAULT lRePaint TO .f.
DEFAULT lCenter TO .T.
DEFAULT lRePaint TO .F.
RETURN Hb_GtInfo( HB_GTI_SPEC, HB_GTS_CENTERWINDOW, { lCenter, lRePaint } )
@@ -747,7 +747,7 @@ FUNCTION Wvt_ProcessMessages()
Hb_GtInfo( HB_GTI_SPEC, HB_GTS_PROCESSMESSAGES )
RETURN .t.
RETURN .T.
//

View File

@@ -205,7 +205,7 @@ METHOD WvgPartHandler:removeChild( oChild )
LOCAL n
IF ( n := ascan( ::aChildren, {| o | o == oChild } ) ) > 0
hb_aDel( ::aChildren, n, .t. )
hb_aDel( ::aChildren, n, .T. )
ENDIF
RETURN Self
@@ -374,13 +374,13 @@ METHOD WvgPartHandler:notifier( nEvent, xParams )
IF HB_ISBLOCK( ::sl_setInputFocus )
eval( ::sl_setInputFocus, NIL, NIL, Self )
ENDIF
::lHasInputFocus := .t.
::lHasInputFocus := .T.
CASE nEvent == HB_GTE_KILLFOCUS
IF HB_ISBLOCK( ::sl_killInputFocus )
eval( ::sl_killInputFocus, NIL, NIL, Self )
ENDIF
::lHasInputFocus := .f.
::lHasInputFocus := .F.
CASE nEvent == HB_GTE_PAINT
/* aeval( ::aChildren, {| o | WVG_InvalidateRect( o:hWnd ) } ) */
@@ -464,7 +464,7 @@ METHOD WvgPartHandler:notifier( nEvent, xParams )
CASE nEvent == HB_GTE_RESIZED
IF ::objType == objTypeDialog
IF ::drawingArea:objType == objTypeDA
::drawingArea:setPosAndSize( {0,0}, ::currentSize(), .f. )
::drawingArea:setPosAndSize( {0,0}, ::currentSize(), .F. )
ENDIF
ENDIF
IF HB_ISBLOCK( ::sl_resize )
@@ -590,7 +590,7 @@ METHOD WvgPartHandler:controlWndProc( hWnd, nMessage, nwParam, nlParam )
CASE WM_MOUSELEAVE
IF ::objType == objTypeScrollBar
::lTracking := .f.
::lTracking := .F.
IF ::oParent:objType == objTypeCrt
WAPI_SetFocus( ::oParent:pWnd )
ENDIF

View File

@@ -118,15 +118,15 @@ typedef struct tagRECT { ;
CLASS WvgScrollBar INHERIT WvgWindow, WvgDataRef
DATA autoTrack INIT .t.
DATA autoTrack INIT .T.
DATA range INIT {0,1}
DATA scrollBoxSize INIT -1
DATA type INIT WVGSCROLL_HORIZONTAL
DATA excludeScrollBox INIT .f.
DATA excludeScrollBox INIT .F.
DATA sl_xbeSB_Scroll
DATA lTracking INIT .f.
DATA lTracking INIT .F.
METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -229,50 +229,50 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgScrollBar
CASE nScrMsg == SB_LEFT
nCommand := WVGSB_PREVPOS
IF nScrPos > ::range[ 1 ]
WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .T. )
ENDIF
CASE nScrMsg == SB_RIGHT
nCommand := WVGSB_NEXTPOS
IF nScrPos < ::range[ 2 ]
WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .T. )
ENDIF
CASE nScrMsg == SB_LINELEFT
nCommand := WVGSB_PREVPAGE
IF nScrPos > ::range[ 1 ]
WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .T. )
ENDIF
CASE nScrMsg == SB_LINERIGHT
nCommand := WVGSB_NEXTPAGE
IF nScrPos < ::range[ 2 ]
WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .T. )
ENDIF
CASE nScrMsg == SB_PAGELEFT
nCommand := WVGSB_PREVPAGE
IF nScrPos > ::range[ 1 ]
WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .T. )
ENDIF
CASE nScrMsg == SB_PAGERIGHT
nCommand := WVGSB_NEXTPAGE
IF nScrPos < ::range[ 2 ]
WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .T. )
ENDIF
CASE nScrMsg == SB_THUMBPOSITION
nCommand := WVGSB_SLIDERTRACK
WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .T. )
CASE nScrMsg == SB_THUMBTRACK
nCommand := WVGSB_ENDTRACK
WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .T. )
CASE nScrMsg == SB_ENDSCROLL
nCommand := WVGSB_ENDSCROLL
WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .T. )
ENDCASE
@@ -301,50 +301,50 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgScrollBar
CASE nScrMsg == SB_TOP
nCommand := WVGSB_TOP
IF nScrPos > ::range[ 1 ]
WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .T. )
ENDIF
CASE nScrMsg == SB_BOTTOM
nCommand := WVGSB_BOTTOM
IF nScrPos < ::range[ 2 ]
WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .T. )
ENDIF
CASE nScrMsg == SB_LINEUP
nCommand := WVGSB_PREVPOS
IF nScrPos > ::range[ 1 ]
WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .T. )
ENDIF
CASE nScrMsg == SB_LINEDOWN
nCommand := WVGSB_NEXTPOS
IF nScrPos < ::range[ 2 ]
WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .T. )
ENDIF
CASE nScrMsg == SB_PAGEUP
nCommand := WVGSB_PREVPAGE
IF nScrPos > ::range[ 1 ]
WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, --nScrPos, .T. )
ENDIF
CASE nScrMsg == SB_PAGEDOWN
nCommand := WVGSB_NEXTPAGE
IF nScrPos < ::range[ 2 ]
WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, ++nScrPos, .T. )
ENDIF
CASE nScrMsg == SB_THUMBPOSITION
nCommand := WVGSB_SLIDERTRACK
WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .T. )
CASE nScrMsg == SB_THUMBTRACK
nCommand := WVGSB_ENDTRACK
WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .T. )
CASE nScrMsg == SB_ENDSCROLL
nCommand := WVGSB_ENDSCROLL
WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .t. )
WAPI_SetScrollPos( ::pWnd, SB_CTL, nScrPos, .T. )
ENDCASE
@@ -387,7 +387,7 @@ METHOD setRange( aRange ) CLASS WvgScrollBar
aOldRange := ::range
ENDIF
IF WAPI_SetScrollRange( ::pWnd, SB_CTL, aRange[ 1 ], aRange[ 2 ], .t. )
IF WAPI_SetScrollRange( ::pWnd, SB_CTL, aRange[ 1 ], aRange[ 2 ], .T. )
::range := aRange
ENDIF

View File

@@ -186,7 +186,7 @@ METHOD WvgSysWindow:show()
METHOD WvgSysWindow:setPos( aPos )
WVG_SetWindowPosition( ::hWnd, aPos[ 1 ], aPos[ 2 ], .f. )
WVG_SetWindowPosition( ::hWnd, aPos[ 1 ], aPos[ 2 ], .F. )
RETURN Self
@@ -284,7 +284,7 @@ CLASS WvgFontDialog INHERIT WvgSysWindow
DATA oScreenPS
DATA oPrinterPS
DATA aPos INIT { 0, 0 }
DATA ok INIT .f.
DATA ok INIT .F.
METHOD wndProc( hWnd, nMessage, nwParam, nlParam )
METHOD GetWvgFont( aFont ) PROTECTED
@@ -328,10 +328,10 @@ METHOD create( oParent, oOwner, oScreenPS, oPrinterPS, aPos ) CLASS WvgFontDialo
::aPos := aPos
IF ::viewPrinterFonts .and. ::oPrinterPS == NIL
::viewPrinterFonts := .f.
::viewPrinterFonts := .F.
ENDIF
IF ( ! ::viewScreenFonts .and. ! ::viewPrinterFonts )
::viewScreenFonts := .t.
::viewScreenFonts := .T.
ENDIF
::WvgSysWindow:create( oParent, oOwner )
@@ -356,33 +356,33 @@ METHOD wndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgFontDialog
WVG_SetWindowText( ::hWnd, ::title )
ENDIF
IF !( ::buttonCancel )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,IDCANCEL ), .f. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,IDCANCEL ), .F. )
ENDIF
IF !( ::buttonApply )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1026 ), .f. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1026 ), .F. )
ENDIF
IF !( ::buttonHelp )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1038 ), .f. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1038 ), .F. )
ENDIF
IF !( ::strikeOut )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1040 ), .f. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1040 ), .F. )
ENDIF
IF !( ::underscore )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1041 ), .f. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1041 ), .F. )
ENDIF
IF !( ::name )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1136 ), .f. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1136 ), .F. )
ENDIF
IF !( ::style )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1137 ), .f. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1137 ), .F. )
ENDIF
IF !( ::size )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1138 ), .f. )
WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1138 ), .F. )
ENDIF
IF ::aPos[ 1 ] > 0 .OR. ::aPos[ 2 ] > 0
aRect := WVG_GetWindowRect( ::hWnd )
WVG_MoveWindow( ::hWnd, ::aPos[ 1 ], ::aPos[ 2 ], aRect[3]-aRect[1], aRect[4]-aRect[2], .f. )
WVG_MoveWindow( ::hWnd, ::aPos[ 1 ], ::aPos[ 2 ], aRect[3]-aRect[1], aRect[4]-aRect[2], .F. )
ENDIF
RETURN 1
@@ -396,7 +396,7 @@ METHOD wndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgFontDialog
DO CASE
CASE nL == IDOK
::ok := .t.
::ok := .T.
IF HB_ISBLOCK( ::sl_activateOk )
eval( ::sl_activateOk, ::GetWvgFont(), NIL, Self )
ENDIF
@@ -430,7 +430,7 @@ METHOD display( nMode ) CLASS WvgFontDialog
hWnd := WVG_GetDesktopWindow()
ENDIF
::ok := .f.
::ok := .F.
aInfo := Wvg_ChooseFont( hWnd, {| h, m, w, l | ::wndProc( h, m, w, l ) }, ::familyName, ;
::nominalPointSize, ::viewScreenFonts, ::viewPrinterFonts )
IF !( ::ok )

View File

@@ -207,7 +207,7 @@ METHOD minimize() CLASS WvgTabPage
::hide()
RETURN .f.
RETURN .F.
//
@@ -215,7 +215,7 @@ METHOD maximize() CLASS WvgTabPage
::show()
RETURN .t.
RETURN .T.
//

View File

@@ -31,15 +31,15 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
//--------------------------- Dialog -------------------------------\\
#if 1
oCrt := WvgDialog():new( , , { 30,30 }, { 800,600 }, , .t. )
oCrt:closable := .t.
oCrt := WvgDialog():new( , , { 30,30 }, { 800,600 }, , .T. )
oCrt:closable := .T.
oCrt:create()
#else
oCrt := WvgCrt():new( , , { 5,5 }, { 30,60 }, , .t. )
oCrt := WvgCrt():new( , , { 5,5 }, { 30,60 }, , .T. )
oCrt:resizeMode := HB_GTI_RESIZEMODE_ROWS
oCrt:closable := .t.
oCrt:closable := .T.
oCrt:create()
SetCursor( .f. )
SetCursor( .F. )
#endif
oDA := oCrt:drawingArea
@@ -51,7 +51,7 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
oTBar := BuildWvgToolBar( oDA, nActiveX )
//--------------------------- StatusBar ---------------------------\\
oSBar := WvgStatusBar():new( oDA ):create( , , , , , .t. )
oSBar := WvgStatusBar():new( oDA ):create( , , , , , .T. )
oSBar:panelClick := {| oPanel | WVG_MessageBox( , oPanel:caption ) }
oPanel := oSBar:getItem( 1 )
oPanel:caption := 'My Root Panel'
@@ -66,12 +66,12 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
oStatic:options := WVGSTATIC_TEXT_CENTER
oStatic:caption := chr(13)+'Implemented Xbase++ Parts'
oStatic:create( , , { 0, oTBar:currentSize()[2]+3 }, { 120, oCrt:currentSize()[2]-;
oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .t. )
oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .T. )
oStatic:setColorBG( RGB( 198,198,198 ) )
#if 0 // panel
//--------------------------- Static + Radio + Checkbox ----------\\
oStatic2:= WvgStatic():New( oCrt, , { 150, 150 }, { 500,310 }, , .f. )
oStatic2:= WvgStatic():New( oCrt, , { 150, 150 }, { 500,310 }, , .F. )
//oStatic2:type := WVGSTATIC_TYPE_RAISEDBOX //BGNDFRAME
oStatic2:exStyle += WS_EX_WINDOWEDGE
//oStatic2:options := WVGSTATIC_FRAMETHICK
@@ -93,7 +93,7 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
oRadio:caption := "Com 2"
oRadio:create()
oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .t. )
oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .T. )
oCheck:caption := 'Checkbox A'
oCheck:create()
oCheck:selected := {| m1, m2, o | m1:=m1,m2:=m2, WVG_MessageBox( , iif( o:getData(), 'I am selected','I am not selected' ) ) }
@@ -139,7 +139,7 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
// assign data code block accessing LOCAL variable
oMLE := WvgMLE():new( oStatic2 )
oMLE:wordWrap := .F.
oMLE:border := .t.
oMLE:border := .T.
oMLE:dataLink := {| x | iif( x == NIL, cText, cText := x ) }
oMLE:create( oStatic2, , { 180,10 }, { 310,250 } )
// Copy text from LOCAL variable into edit buffer via :dataLink
@@ -181,7 +181,7 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
//--------------------------- TreeView ---------------------------\\
oTree := WvgTreeView():new( oDA, , { oCrt:currentSize()[1]-160,oTBar:currentSize()[2]+3 }, ;
{ 160, oCrt:currentSize()[2]-;
oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .t. )
oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .T. )
oTree:hasLines := .T.
oTree:hasButtons := .T.
oTree:alwaysShowSelection := .T.
@@ -202,9 +202,9 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
oItem2:addItem( "Third level C" )
#if 0
oItem1:expand( .t. )
oItem1:expand( .T. )
#else
oTree:showExpanded( .t., 2 )
oTree:showExpanded( .T., 2 )
#endif
oTree:setData( oItem2 )
@@ -227,7 +227,7 @@ FUNCTION ExecuteActiveX( nActiveX, xParam )
ENDIF
#else
oCrt:show()
DO WHILE .t.
DO WHILE .T.
IF inkey() == K_ESC
EXIT
ENDIF
@@ -255,12 +255,12 @@ STATIC FUNCTION ResizeDialog( oCrt, oTBar, oSBar, oStatic, oCom, oTree )
nH := aCrt[2]-aTBar[2]-aSBar[2]
IF oStatic:isVisible
oStatic:setPosAndSize( { 0, nT+3 }, { 120, nH-4 }, .t. )
oCom:setPosAndSize( { 120, nT }, { aCrt[1]-120-150, nH }, .t. )
oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .t. )
oStatic:setPosAndSize( { 0, nT+3 }, { 120, nH-4 }, .T. )
oCom:setPosAndSize( { 120, nT }, { aCrt[1]-120-150, nH }, .T. )
oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .T. )
ELSE
oCom:setPosAndSize( { 0, nT }, { aCrt[1]-150, nH }, .t. )
oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .t. )
oCom:setPosAndSize( { 0, nT }, { aCrt[1]-150, nH }, .T. )
oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .T. )
ENDIF
RETURN 1
@@ -310,7 +310,7 @@ STATIC FUNCTION BuildActiveXControl( nActiveX, oDA )
DEFAULT nActiveX TO 2
oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .t. )
oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .T. )
do case
case nActiveX == 1
@@ -338,8 +338,8 @@ STATIC FUNCTION BuildActiveXControl( nActiveX, oDA )
oCom:mapEvent( evDblClk, {|| oCom:Value := seconds()/86400 ,;
oCom:BackColor := RGB( 0,140,210 ),;
oCom:Refresh() ,;
oCom:ShowSecondsHand := .t. ,;
oCom:Hands3D := .t. ,;
oCom:ShowSecondsHand := .T. ,;
oCom:Hands3D := .T. ,;
oCom:Refresh() ,;
oCom:showAboutBox() ;
} )
@@ -380,12 +380,12 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam )
//
if nActiveX == 1
hb_gtInfo( HB_GTI_WINTITLE, iif( empty( xParam ), 'http://hbide.vouch.info', xParam ) )
oCom:AddressBar := .t.
oCom:AddressBar := .T.
oCom:Navigate( iif( empty( xParam ), 'http://hbide.vouch.info', xParam ) )
elseif nActiveX == 4
ConfigureRMChart( oCom )
oCom:Draw( .t. )
oCom:Draw( .T. )
oCom:Draw2Clipboard()
elseif nActiveX == 5
@@ -400,7 +400,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam )
endif
do while .t.
do while .T.
nKey := inkey()
IF nActiveX == 2
@@ -421,7 +421,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam )
oCom:Region(1):SetProperties( 5.0,5.0,-5.0,-5.0 )
oCom:Draw( .t. )
oCom:Draw( .T. )
endif
elseif nKey == K_F11
@@ -574,7 +574,7 @@ STATIC FUNCTION ExeActiveX( nActiveX, oCom, xParam )
oCom:Reset()
oCom:RMCFile := sData
oCom:Draw( .t. )
oCom:Draw( .T. )
endif
endif

View File

@@ -24,7 +24,7 @@
PROCEDURE ExecGCUI()
IF hb_mtvm()
Hb_ThreadStart( {| oCrt | oCrt := WvgCrt():New( , , { 2,4 }, { 20,81 }, , .t. ) , ;
Hb_ThreadStart( {| oCrt | oCrt := WvgCrt():New( , , { 2,4 }, { 20,81 }, , .T. ) , ;
oCrt:icon := GetResource( "dia_excl.ico" ),;
oCrt:create(), ;
GCUIConsole( oCrt ) , ;
@@ -62,22 +62,22 @@ PROCEDURE GCUIConsole( oCrt )
@ 3, nColGet GET dDate ;
WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 1 ) ) } ;
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,0,0 ) ), .t. }
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,0,0 ) ), .T. }
@ 6, nColGet GET cName ;
WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 2 ) ) } ;
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,255,0 ) ), ;
Wvg_SetGObjState( hBoxR, 3 ), .t. }
Wvg_SetGObjState( hBoxR, 3 ), .T. }
@ 9, nColGet GET cAdd1 ;
WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 3 ) ) } ;
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,0,255 ) ), .t. }
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,0,255 ) ), .T. }
@ 11, nColGet GET cAdd2 ;
WHEN {|| Wvg_SetGObjData( hTxt, 1, FetchText( 4 ) ) } ;
Valid {|| Wvg_SetGObjData( hTxt, 6, RGB( 255,255,255 ) ), ;
Wvg_SetGObjState( hBoxR, 1 ), .t. }
Wvg_SetGObjState( hBoxR, 1 ), .T. }
@ 13, nColGet GET cAdd3 ;
WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 198,21,140 ) ), .t. }
WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 198,21,140 ) ), .T. }
@ 16, nColGet GET nSlry PICTURE "@Z 9999999.99" ;
WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 0,0,0 ) ), .t. }
WHEN {|| Wvg_SetGObjData( hTxt, 6, RGB( 0,0,0 ) ), .T. }
// The only additional calls to render your console GUI
//

View File

@@ -109,10 +109,10 @@ PROCEDURE Main()
SET( _SET_EVENTMASK, INKEY_ALL + HB_INKEY_GTEVENT )
Wvt_SetGui( .t. )
WvtSetKeys( .t. )
Wvt_SetGui( .T. )
WvtSetKeys( .T. )
Popups( 1 )
Wvt_SetMouseMove( .t. )
Wvt_SetMouseMove( .T. )
Wvt_SetFont( "Courier New", 18, 0, 0 )
CLS
@@ -143,7 +143,7 @@ PROCEDURE Main()
aAdd( aBlocks, {|| Wvt_SetIcon( GetResource( "vr_1.ico" ) ) } )
aAdd( aBlocks, {|| Wvt_SetTitle( "Vouch" ) } )
aAdd( aBlocks, {|| Wvt_DrawLabel( 1,40, cLabel,6,, rgb(255,255,255), rgb(198,198,198), "Arial", 26, , , , , .t., .t. ) } )
aAdd( aBlocks, {|| Wvt_DrawLabel( 1,40, cLabel,6,, rgb(255,255,255), rgb(198,198,198), "Arial", 26, , , , , .T., .T. ) } )
aAdd( aBlocks, {|| Wvt_DrawBoxRaised( nTop, nLft, nBtm, nRgt ) } )
aAdd( aBlocks, {|| Wvt_DrawBoxRecessed( 7, 61, 13, 70 ) } )
aAdd( aBlocks, {|| Wvt_DrawBoxGroup( 15, 59, 18, 72 ) } )
@@ -190,10 +190,10 @@ PROCEDURE Main()
WvtSetObjects( aObjects )
SetColor( clr )
RestScreen( 0,0,maxrow(),maxcol(), scr )
WvtSetKeys( .f. )
WvtSetKeys( .F. )
Wvt_SetPopupMenu( hPopup )
Popups( 1, .t. )
Popups( 1, .T. )
SetGT( 1, pGT )
ErrorBlock( oError )
@@ -461,7 +461,7 @@ FUNCTION BuildMainMenu()
LOCAL oMenu
LOCAL g_oMenuBar := WvgSetAppWindow():menuBar()
oMenu := WvgMenu():new( g_oMenuBar, , .t. ):create()
oMenu := WvgMenu():new( g_oMenuBar, , .T. ):create()
oMenu:Caption:= "Wvt*Classes"
oMenu:AddItem( "Dialog One . New Window . Threaded" , {|| DialogWvgClassesOne( 1 ) } )
oMenu:AddItem( "Dialog One . Main Window . Primary Thread", {|| DialogWvgClassesOne( 2 ) } )
@@ -471,7 +471,7 @@ FUNCTION BuildMainMenu()
oMenu:AddItem( "Exit" , {|| __keyboard( K_ESC ) } )
g_oMenuBar:addItem( { oMenu, "Wvt*Classes" } )
oMenu := WvgMenu():new( g_oMenuBar, , .t. ):create()
oMenu := WvgMenu():new( g_oMenuBar, , .T. ):create()
oMenu:caption := "Traditional"
oMenu:AddItem( "Gets . GTWVG . Threaded" , {|| WvtNextGets() } )
oMenu:AddItem( "-")
@@ -490,14 +490,14 @@ FUNCTION BuildMainMenu()
oMenu:AddItem( "Modal Window" , {|| DoModalWindow() } )
g_oMenuBar:addItem( { oMenu, "Traditional" } )
oMenu := WvgMenu():new( g_oMenuBar, , .t. ):create()
oMenu := WvgMenu():new( g_oMenuBar, , .T. ):create()
oMenu:Caption:= "Common Dialogs"
oMenu:AddItem( "Fonts" , {|| Wvt_ChooseFont() } )
oMenu:AddItem( "-")
oMenu:AddItem( "Colors" , {|| Wvt_ChooseColor() } )
g_oMenuBar:addItem( { oMenu, "Common Dialogs" } )
oMenu := WvgMenu():new( g_oMenuBar, , .t. ):create()
oMenu := WvgMenu():new( g_oMenuBar, , .T. ):create()
oMenu:Caption:= "Functionality"
oMenu:AddItem( "Expand" , {|| WvtWindowExpand( 1 ) } )
oMenu:AddItem( "Shrink" , {|| WvtWindowExpand( -1 ) } )
@@ -506,7 +506,7 @@ FUNCTION BuildMainMenu()
oMenu:AddItem( "Maximize" , {|| hb_gtInfo( HB_GTI_SPEC, HB_GTS_WNDSTATE, HB_GTS_WS_MAXIMIZED ) } )
g_oMenuBar:addItem( { oMenu, "Functionality" } )
oMenu := WvgMenu():new( g_oMenuBar, , .t. ):create()
oMenu := WvgMenu():new( g_oMenuBar, , .T. ):create()
oMenu:Caption:= "Modeless Dialogs"
oMenu:AddItem( "Dynamic Dialog . Modeless" , {|| DynWinDialog( 1 ) } )
oMenu:AddItem( "Dynamic Dialog . Modal " , {|| DynWinDialog( 2 ) } )
@@ -514,7 +514,7 @@ FUNCTION BuildMainMenu()
oMenu:AddItem( "Slide Show . Modeless" , {|| DlgSlideShow() } )
g_oMenuBar:addItem( { oMenu, "Modeless Dialogs" } )
oMenu := WvgMenu():new( g_oMenuBar, , .t. ):create()
oMenu := WvgMenu():new( g_oMenuBar, , .T. ):create()
oMenu:Caption := "~XbpDialog()s"
oMenu:AddItem( "Pure Xbase++" , {|| Hb_ThreadStart( {|| demoXbp() } ) } )
oMenu:AddItem( "-")
@@ -580,48 +580,48 @@ FUNCTION BuildButtons()
LOCAL oXbp
oXbp := WvgPushButton():new()
oXbp:pointerFocus := .f.
oXbp:pointerFocus := .F.
oXbp:caption := "Hi"
oXbp:create( , , { {|| -( maxrow()-1 ) }, -1 }, { -2, -4 } )
oXbp:activate := {|| Wvg_MessageBox( , "Harbour!" ) }
oXbp:toolTipText := "Harbour CUI/GUI Console"
oXbp := WvgPushButton():new()
oXbp:pointerFocus := .f.
oXbp:pointerFocus := .F.
oXbp:caption := IMAGE_VOUCH
oXbp:create( , , { {|| -( maxrow()-1 ) }, -6 }, { -2, -4 } )
oXbp:activate := {|| Wvt_Keyboard( K_F2 ) }
oXbp:toolTipText := "Open Another GET Screen"
oXbp := WvgPushButton():new()
oXbp:pointerFocus := .f.
oXbp:pointerFocus := .F.
oXbp:caption := IMAGE_BROWSE
oXbp:create( , , { {|| -( maxrow()-1 ) }, -11 }, { -2, -4 } )
oXbp:activate := {|| Wvt_Keyboard( K_F5 ) }
oXbp:toolTipText := "TBrowse + GUI Controls"
oXbp := WvgPushButton():new()
oXbp:pointerFocus := .f.
oXbp:pointerFocus := .F.
oXbp:caption := IMAGE_NOTES
oXbp:create( , , { {|| -( maxrow()-1 ) }, -16 }, { -2, -4 } )
oXbp:activate := {|| Wvt_Keyboard( K_F3 ) }
oXbp := WvgPushButton():new()
oXbp:pointerFocus := .f.
oXbp:pointerFocus := .F.
oXbp:caption := IMAGE_TOOLS
oXbp:create( , , { {|| -( maxrow()-1 ) }, -21 }, { -2, -4 } )
oXbp:activate := {|| Wvt_Keyboard( K_F6 ) }
oXbp := WvgPushButton():new()
oXbp:pointerFocus := .f.
oXbp:pointerFocus := .F.
oXbp:caption := IMAGE_HELP
oXbp:create( , , { {|| -( maxrow()-1 ) }, -26 }, { -2, -4 } )
oXbp:activate := {|| Wvt_Keyboard( K_F7 ) }
oXbp := WvgPushButton():new()
oXbp:pointerFocus := .f.
oXbp:pointerFocus := .F.
oXbp:caption := IMAGE_VR
oXbp:border := .f.
oXbp:border := .F.
oXbp:create( , , { {|| -( maxrow()-1 ) }, -31 }, { -2, -4 } )
oXbp:activate := {|| Hb_ThreadStart( {|| demoXbp() } ) } // {|| Wvt_Keyboard( K_F8 ) }
oXbp:toolTipText := "Flat Button . Lines: press ESC when finished."

View File

@@ -38,9 +38,9 @@ FUNCTION Main()
SET DATE ANSI
SET( _SET_EVENTMASK, INKEY_ALL + HB_INKEY_GTEVENT )
Wvt_SetGui( .t. )
Wvt_SetGui( .T. )
Wvt_SetFont( "Courier New", 18, 0, 0 )
Wvt_SetMouseMove( .t. )
Wvt_SetMouseMove( .T. )
SetColor( "N/W" )
CLS
@@ -52,7 +52,7 @@ FUNCTION Main()
aPaint := {}
aAdd( aPaint, { "Label" , {|| Wvt_DrawLabel( 1, 40, "Harbour Console GUI Demo", 6, , rgb( 255,255,255 ), rgb( 198,198,198 ), "Arial", 26, , , , , .t., .t. ) } , { WVT_BLOCK_LABEL, 1, 10, 3, 50 } } )
aAdd( aPaint, { "Label" , {|| Wvt_DrawLabel( 1, 40, "Harbour Console GUI Demo", 6, , rgb( 255,255,255 ), rgb( 198,198,198 ), "Arial", 26, , , , , .T., .T. ) } , { WVT_BLOCK_LABEL, 1, 10, 3, 50 } } )
aAdd( aPaint, { "Box_1" , {|| Wvt_DrawBoxRaised( 4, 4, 20, 75 ) } , { WVT_BLOCK_BOX , 4, 4, 20, 75 } } )
aAdd( aPaint, { "Box_2" , {|| Wvt_DrawBoxRecessed( 7, 61, 13, 70 ) } , { WVT_BLOCK_BOX , 7, 61, 13, 70 } } )
aAdd( aPaint, { "Box_3" , {|| Wvt_DrawBoxGroup( 15, 59, 18, 72 ) } , { WVT_BLOCK_BOX , 15, 59, 18, 72 } } )
@@ -164,7 +164,7 @@ FUNCTION DispStatusMsg( cMsg )
//
Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, rgb( 198, 198, 198 ), "Arial", 18, , 900 )
RETURN .t.
RETURN .T.
//
@@ -175,7 +175,7 @@ FUNCTION ClearStatusMsg()
DispOutAt( MaxRow(), 42, space( 37 ), "W/W" )
SetPos( nRow, nCol )
RETURN .t.
RETURN .T.
//
@@ -186,9 +186,9 @@ FUNCTION DoModalDialog()
oCrt := WvgCrt():New( , , { 4,8 }, { 12,49 }, , .T. )
oCrt:lModal := .t.
oCrt:resizable := .f.
oCrt:closable := .f.
oCrt:lModal := .T.
oCrt:resizable := .F.
oCrt:closable := .F.
oCrt:title := 'Modal Dialog!'
oCrt:icon := hb_dirBase() + "vr_1.ico"
@@ -200,7 +200,7 @@ FUNCTION DoModalDialog()
SetColor( 'N/W' )
CLS
DO WHILE .t.
DO WHILE .T.
nSel := Alert( 'A modal window !;Click on parent window;Move this window', { 'OK' } )
IF nSel == 0 .OR. nSel == 1
EXIT

View File

@@ -36,8 +36,8 @@ FUNCTION Main()
LOCAL aParts := {}
//--------------------------- Dialog -------------------------------\\
oCrt := WvgDialog():new( , , { 30,30 }, { 900,600 }, , .t. )
oCrt:closable := .t.
oCrt := WvgDialog():new( , , { 30,30 }, { 900,600 }, , .T. )
oCrt:closable := .T.
oCrt:icon := "vr_1.ico"
oCrt:create()
@@ -52,7 +52,7 @@ FUNCTION Main()
oTBar := ActiveXBuildToolBarXbp( oDA )
//--------------------------- StatusBar ---------------------------\\
oSBar := WvgStatusBar():new( oCrt ):create( , , , , , .t. )
oSBar := WvgStatusBar():new( oCrt ):create( , , , , , .T. )
oSBar:panelClick := {| oPanel | WVG_MessageBox( , oPanel:caption ) }
oPanel := oSBar:getItem( 1 )
oPanel:caption := 'My Root Panel'
@@ -68,7 +68,7 @@ FUNCTION Main()
oStatic:caption := chr(13)+'Implemented Xbase++ Parts'
oStatic:create( , , { 0, oTBar:currentSize()[2]+3 }, { 120, oCrt:currentSize()[2]-;
oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .t. )
oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .T. )
oStatic:setColorBG( RGB( 200,200,200 ) )
//--------------------------- ListBox -----------------------------\\
@@ -115,7 +115,7 @@ FUNCTION Main()
oTree := WvgTreeView():new( oDA, , { oCrt:currentSize()[1]-160,oTBar:currentSize()[2]+3 }, ;
{ 160, oCrt:currentSize()[2]-;
oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .t. )
oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .T. )
oTree:hasLines := .T.
oTree:hasButtons := .T.
oTree:alwaysShowSelection := .T.
@@ -136,9 +136,9 @@ FUNCTION Main()
oItem2:addItem( "Third level C" )
#if 0
oItem1:expand( .t. )
oItem1:expand( .T. )
#else
oTree:showExpanded( .t., 2 )
oTree:showExpanded( .T., 2 )
#endif
oTree:setData( oItem2 )
@@ -146,11 +146,11 @@ FUNCTION Main()
//--------------------------- Active-X ---------------------------\\
hb_gtInfo( HB_GTI_WINTITLE, 'http://www.harbour.vouch.info' )
#if 0
oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .t. )
oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .T. )
oCom:CLSID := 'Shell.Explorer.2'
oCom:mapEvent( 269, {|| QOut( ' E X P L O R E R - 2 6 9' ) } )
#else
oCom := WvgHTMLViewer():New( oDA, , { 0, 0 }, { 100, 100 }, , .t. )
oCom := WvgHTMLViewer():New( oDA, , { 0, 0 }, { 100, 100 }, , .T. )
oCom:beforeNavigate := {| cURL, x, oHTML | x := x, oHTML := oHTML, oPanel:caption := cURL }
oCom:statusTextChange := {| cText | oPanel:caption := cText }
#endif
@@ -159,17 +159,17 @@ FUNCTION Main()
oAddr := WvgSLE():new()
oAddr:bufferLength := 500
oAddr:border := .t.
oAddr:border := .T.
cNavigate := 'http://www.harbour.vouch.info'
oAddr:dataLink := {| x | iif( x == NIL, cNavigate, cNavigate := x ) }
oAddr:setColorFG( RGB( 0,0,255 ) )
oAddr:setColorBG( RGB( 0,255,255 ) )
oAddr:create( oDA, , { 120, oTBar:currentSize()[2] }, { 500,20 }, , .t. )
oAddr:create( oDA, , { 120, oTBar:currentSize()[2] }, { 500,20 }, , .T. )
oAddr:setData()
oAddr:killInputFocus := {| m1, m2, oS | m1:=m1, m2:=m2, oS:getData(), oCom:navigate( cNavigate ) }
//----------------- Panel : Static + Radio + Checkbox ----------\\
oStatic2:= WvgStatic():New( oDA, , { 150, 150 }, { 500,310 }, , .f. )
oStatic2:= WvgStatic():New( oDA, , { 150, 150 }, { 500,310 }, , .F. )
//oStatic2:type := WVGSTATIC_TYPE_RAISEDBOX //BGNDFRAME
oStatic2:exStyle += WS_EX_WINDOWEDGE
//oStatic2:options := WVGSTATIC_FRAMETHICK
@@ -192,7 +192,7 @@ FUNCTION Main()
oRadio:caption := "Com 2"
oRadio:create()
oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .t. )
oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .T. )
oCheck:caption := 'Checkbox A'
oCheck:create()
oCheck:selected := {| m1, m2, o | m1:=m1,m2:=m2, WVG_MessageBox( , iif( o:getData(), 'I am selected','I am not selected' ) ) }
@@ -238,7 +238,7 @@ FUNCTION Main()
// assign data code block accessing LOCAL variable
oMLE := WvgMLE():new()
oMLE:wordWrap := .F.
oMLE:border := .t.
oMLE:border := .T.
oMLE:dataLink := {| x | iif( x == NIL, cText, cText := x ) }
oMLE:create( oStatic2, , { 180,10 }, { 310,250 } )
// Copy text from LOCAL variable into edit buffer via :dataLink
@@ -257,7 +257,7 @@ FUNCTION Main()
oCrt:sendMessage( WM_SIZE, 0, 0 )
oCrt:show()
DO WHILE .t.
DO WHILE .T.
IF inkey() == 27
EXIT
ENDIF
@@ -280,15 +280,15 @@ STATIC FUNCTION ResizeDialogXbp( oCrt, oTBar, oSBar, oStatic, oCom, oTree, oAddr
nH := aCrt[2] - aTBar[2] - aSBar[2]
IF oStatic:isVisible
oStatic:setPosAndSize( { 0, nT+3 }, { 120, nH-4 }, .t. )
oAddr:setPosAndSize( { 120, nT+2 }, { aCrt[1]-120-150, 20 }, .t. )
oCom:setPosAndSize( { 120, nT+2+20 }, { aCrt[1]-120-150, nH-20 }, .t. )
oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .t. )
oStatic:setPosAndSize( { 0, nT+3 }, { 120, nH-4 }, .T. )
oAddr:setPosAndSize( { 120, nT+2 }, { aCrt[1]-120-150, 20 }, .T. )
oCom:setPosAndSize( { 120, nT+2+20 }, { aCrt[1]-120-150, nH-20 }, .T. )
oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .T. )
ELSE
oAddr:setPosAndSize( { 0, nT+2 }, { aCrt[1]-150, 20 }, .t. )
oCom:setPosAndSize( { 0, nT+2+20 }, { aCrt[1]-150, nH-20 }, .t. )
oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .t. )
oAddr:setPosAndSize( { 0, nT+2 }, { aCrt[1]-150, 20 }, .T. )
oCom:setPosAndSize( { 0, nT+2+20 }, { aCrt[1]-150, nH-20 }, .T. )
oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .T. )
ENDIF
@@ -351,7 +351,7 @@ STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt )
oTBar:imageWidth := 26
oTBar:imageHeight := 24
oTBar:showToolTips := .t.
oTBar:showToolTips := .T.
oTBar:create()
@@ -410,16 +410,16 @@ STATIC FUNCTION ExeFontDialog( oCrt )
oFontDlg:title := 'Select a Screen Font'
oFontDlg:aPos := { 150,150 }
oFontDlg:buttonApply := .t.
oFontDlg:buttonApply := .T.
oFontDlg:activateApply := {|| NIL }
oFontDlg:familyName := "Courier New"
oFontDlg:strikeout := .T.
oFontDlg:underscore := .f.
oFontDlg:underscore := .F.
//oFontDlg:activateOk := {|| WVG_MessageBox( , 'activateOK Event Handelled in Windows!' ) }
oFontDlg:nominalPointSize := 12
//oFontDlg:size := .f.
//oFontDlg:style := .f.
//oFontDlg:size := .F.
//oFontDlg:style := .F.
oFontDlg:create()

View File

@@ -117,7 +117,7 @@ FUNCTION DynWinDialog( nInfo )
Wvt_AppendMenu( hMenu, MF_STRING + MF_ENABLED, ID_MNU_FILE , "File" )
Wvt_AppendMenu( hMenu, MF_STRING + MF_ENABLED, ID_MNU_CONTROL, "Controls" )
lOnTop := .f.
lOnTop := .F.
cDlgProc := "DynDlgProc"
// bDlgProc := {| a, b, c, d | DYNDLGPROC( a, b, c, d ) }
cDlgIcon := "v_notes.ico"
@@ -239,7 +239,7 @@ FUNCTION DynDlgProc( hDlg, nMsg, wParam, lParam )
endif
*/
WVG_SetDlgItemText( hDlg, ID_MLE , GetEditText() )
WVG_CheckDlgButton( hDlg, ID_CHK_SATIS, .t. )
WVG_CheckDlgButton( hDlg, ID_CHK_SATIS, .T. )
WVG_CheckRadioButton( hDlg, ID_RDO_XH, ID_RDO_XBASE, ID_RDO_XH )
@@ -317,7 +317,7 @@ FUNCTION DlgSlideShow()
aDlg := Wvt_MakeDlgTemplate( 0, 0, 20, 40, {}, "Slide Show", nStyle )
hDlg := Wvt_CreateDialog( aDlg, .f., "DlgSlideShowProc", "vr_1.ico", 5000 )
hDlg := Wvt_CreateDialog( aDlg, .F., "DlgSlideShowProc", "vr_1.ico", 5000 )
RETURN hDlg

View File

@@ -20,11 +20,11 @@
FUNCTION MyAlert( cMsg, aOpt )
LOCAL nSel, oCrt
oCrt := WvgCrt():New( , , { -1,-1 }, { 9, MaxCol()-6 }, , .t. )
oCrt:lModal := .t.
oCrt := WvgCrt():New( , , { -1,-1 }, { 9, MaxCol()-6 }, , .T. )
oCrt:lModal := .T.
oCrt:icon := "dia_excl.ico"
oCrt:create()
oCrt:resizable := .t.
oCrt:resizable := .T.
SetColor( 'N/W' )
CLS
@@ -199,7 +199,7 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime )
dispend()
lGo := .t.
lGo := .T.
do while lGo
IF ( nKey := Inkey() ) == 0
LOOP
@@ -215,33 +215,33 @@ FUNCTION DialogAlert( cCaption, aText_, aButtons_, sel, aMessage_, nTop, nTime )
do case
case nKey == K_RIGHT_DOWN
sel := 0
lGo := .f.
lGo := .F.
case nKey == K_LEFT_DOWN
if nMRow == nTop
if nMCol >= nLeft .and. nMCol <= nLeft+3
sel := 0
lGo := .f.
lGo := .F.
endif
elseif nMRow == nBtnRow
for i := 1 to len( nBtnCol_ )
if nMCol >= nBtnCol_[ i ] .and. nMCol <= nBtnCol_[ i ] + len( aButtons_[ i ] )+4
sel := i
lGo := .f.
lGo := .F.
endif
next
endif
case nKey == K_ESC
sel := 0
lGo := .f.
lGo := .F.
case nKey == K_ENTER
lGo := .f.
lGo := .F.
case nKey == K_LEFT .or. nKey == K_DOWN
sel--
case nKey == K_RIGHT .or. nKey == K_UP
sel++
case ( nTrg := ascan( aTrg_, upper( chr( nKey ) ) ) ) > 0
sel := nTrg
lGo := .f.
lGo := .F.
otherwise
if setkey( nKey ) != nil
eval( setKey( nKey ) )
@@ -329,9 +329,9 @@ FUNCTION DoModalWindow()
*/
oCrt := WvgCrt():New( , , { 4,8 }, { 12,49 }, , .T. )
oCrt:lModal := .t.
oCrt:resizable := .f.
oCrt:closable := .f.
oCrt:lModal := .T.
oCrt:resizable := .F.
oCrt:closable := .F.
oCrt:title := 'Information! [R:4 C:8]'
oCrt:rbUp := {|| DispOutAt( maxrow(), 0, padc( 'rbUp', maxcol()+1 ),'W+/R*' ) }
@@ -348,7 +348,7 @@ FUNCTION DoModalWindow()
//
SetColor( 'N/W' )
CLS
do while .t.
do while .T.
nSel := Just_Alert( 'I am in modal window !;< Try: MMove LBUp RBUp >;Click Parent Window', { 'OK' } )
if nSel == 0 .or. nSel == 1

View File

@@ -46,7 +46,7 @@ FUNCTION WvtMyBrowse()
oCrt:resizeMode := HB_GTI_RESIZEMODE_ROWS,;
oCrt:icon := GetResource( "dia_excl.ico" ),;
oCrt:create(),;
Wvt_SetGui( .t. ),;
Wvt_SetGui( .T. ),;
ExecBrowser( oCrt ),;
oCrt:destroy();
} )
@@ -62,7 +62,7 @@ FUNCTION WvtMyBrowse()
FUNCTION ExecBrowser( oCrt )
LOCAL nKey, bBlock, oBrowse , aLastPaint, i, pGT
LOCAL cFileIndex, cFileDbf, cRDD, nIndex, oTBar, cScr, info_ //, oLB
LOCAL lEnd := .f.
LOCAL lEnd := .F.
LOCAL aBlocks := {}
LOCAL nTop := 4
LOCAL nLeft := 3
@@ -78,7 +78,7 @@ FUNCTION ExecBrowser( oCrt )
STATIC nStyle := 0
THREAD STATIC nFactor := 200
THREAD STATIC lActiveX := .f.
THREAD STATIC lActiveX := .F.
IF oCrt == NIL
cScr := SaveScreen( 0,0,maxrow(),maxcol() )
@@ -182,10 +182,10 @@ FUNCTION ExecBrowser( oCrt )
hb_gtInfo( HB_GTI_SPEC, HB_GTS_FACTOR, nFactor )
CASE nKey == K_F6
hb_gtInfo( HB_GTI_RESIZABLE, .f. )
hb_gtInfo( HB_GTI_RESIZABLE, .F. )
CASE nKey == K_F7
hb_gtInfo( HB_GTI_RESIZABLE, .t. )
hb_gtInfo( HB_GTI_RESIZABLE, .T. )
CASE nKey == K_F2
nIndex := IndexOrd()
@@ -272,7 +272,7 @@ STATIC FUNCTION BrwHandleResize( oCrt, oBrw, oVBar, oHBar, oCom, oSLE, oLBx, oTr
oCrt:hide()
oCrt:show()
RETURN .t.
RETURN .T.
//
@@ -324,7 +324,7 @@ STATIC FUNCTION BrwBuildTree( oCrt /*, oBrw*/ )
oItem2:addItem( "Third level y" )
oItem2:addItem( "Third level z" )
oTree:showExpanded( .t., 2 )
oTree:showExpanded( .T., 2 )
oTree:setData( oItem2 )
oTree:tooltipText := "Treeview embedded onto CUI window"
@@ -338,7 +338,7 @@ STATIC FUNCTION BrwBuildActiveX( oCrt, oBrw )
HB_SYMBOL_UNUSED( oBrw )
oCom := WvgActiveXControl():new( oCrt, , { -24, -13 }, { {|| -( maxrow()-1-24 ) }, {|| -( maxcol()-1-13 ) } }, , .f. )
oCom := WvgActiveXControl():new( oCrt, , { -24, -13 }, { {|| -( maxrow()-1-24 ) }, {|| -( maxcol()-1-13 ) } }, , .F. )
oCom:CLSID := 'Shell.Explorer.2'
//oCom:mapEvent( 269, {|| uiDebug( ' E X P L O R E R - 2 6 9' ) } )
oCom:create()
@@ -352,7 +352,7 @@ STATIC FUNCTION BrwBuildListBox( oCrt, oBrw )
LOCAL oXbp, i
oXbp := WvgListBox():new( oCrt )
oXbp:create( , , { -4,-1 }, { -10, -10 }, , .t. )
oXbp:create( , , { -4,-1 }, { -10, -10 }, , .T. )
oXbp:setColorFG( "W+" )
oXbp:setColorBG( "B*" )
oXbp:itemMarked := {| m1, m2, o | m1 := m1, m2 := m2, BrwShowColumn( oBrw, o:getCurItem() ) }
@@ -386,7 +386,7 @@ STATIC FUNCTION BrwBuildListBoxIdx( oCrt, oBrw )
oXbp := WvgComboBox():new( oCrt )
oXbp:type := WVGCOMBO_DROPDOWN
oXbp:create( , , { -18,-1 }, { -5, -10 }, , .t. )
oXbp:create( , , { -18,-1 }, { -5, -10 }, , .T. )
oXbp:setColorFG( "W+" )
oXbp:setColorBG( "B*" )
oXbp:itemMarked := {| m1, m2, o | m1 := m2, BrwSetThisOrder( oBrw, o:XbpListBox:getData()-1 ) }
@@ -431,13 +431,13 @@ STATIC FUNCTION BrwBuildNvg( oCrt, oBrw, oCom )
oLbl:type := WVGSTATIC_TYPE_TEXT
oLbl:options := WVGSTATIC_TEXT_LEFT
oLbl:caption := "Navigate"
oLbl:create( , , { -23, -13 }, { -1, -6 }, , .f. )
oLbl:create( , , { -23, -13 }, { -1, -6 }, , .F. )
oLbl:setColorFG( "W+" )
oLbl:setColorBG( "BG" )
oXbp := WvgSLE():new( oCrt )
oXbp:bufferLength := 300
oXbp:create( , , { -23, -19 }, { -1, {|| -( maxcol()-1-19 ) } }, , .f. )
oXbp:create( , , { -23, -19 }, { -1, {|| -( maxcol()-1-19 ) } }, , .F. )
oXbp:setColorFG( "N" )
oXbp:setColorBG( "BG+" )
oXbp:returnPressed := {| m1, m2, o | m1:=m2, oCom:navigate( trim( o:getData() ) ) }
@@ -454,10 +454,10 @@ STATIC FUNCTION BrwBuildCheckBox( oCrt, oBrw, lActiveX )
HB_SYMBOL_UNUSED( oBrw )
oXbp := WvgCheckBox():new( oCrt )
oXbp:pointerFocus := .f.
oXbp:pointerFocus := .F.
oXbp:caption := "ActiveX"
oXbp:selected := {| x, y, o | x := y, lActiveX := o:getData(), Wvt_Keyboard( HB_K_RESIZE ) }
oXbp:selection := .f.
oXbp:selection := .F.
oXbp:create( , , { -23,-1 }, { -1,-10 } )
oXbp:setColorFG( "R+" )
oXbp:setColorBG( "W" )
@@ -510,7 +510,7 @@ STATIC FUNCTION BrwBuildButtons( oCrt, oBrw )
FOR i := 1 TO len( aPmt )
oPB := WvgPushButton():new( oCrt )
IF i == 3 /* We do not want this button to gain focus anytime */
oPB:pointerFocus := .f.
oPB:pointerFocus := .F.
ENDIF
IF i == len( aPmt )
oPB:caption := hb_dirBase() + "\" + "v_lock.bmp"
@@ -595,7 +595,7 @@ STATIC FUNCTION BrwBuildToolBar( oCrt )
oTBar:imageWidth := 26
oTBar:imageHeight := 24
oTBar:showToolTips := .t.
oTBar:showToolTips := .T.
// After setting properties, create toolbar.
oTBar:create()
@@ -615,85 +615,85 @@ STATIC FUNCTION BrwBuildToolBar( oCrt )
//
STATIC FUNCTION BrwHandleKey( oBrowse, nKey, lEnd )
LOCAL lVMove := .f.
LOCAL lHMove := .f.
LOCAL lRet := .t.
LOCAL lVMove := .F.
LOCAL lHMove := .F.
LOCAL lRet := .T.
DO CASE
CASE nKey == K_ESC
lEnd := .t.
lEnd := .T.
CASE nKey == K_ENTER
lEnd := .t.
lEnd := .T.
CASE nKey == K_DOWN
lVMove := .t.
lVMove := .T.
oBrowse:Down()
CASE nKey == K_UP
lVMove := .t.
lVMove := .T.
oBrowse:Up()
CASE nKey == K_PGDN
lVMove := .t.
lVMove := .T.
oBrowse:pageDown()
CASE nKey == K_PGUP
lVMove := .t.
lVMove := .T.
oBrowse:pageUp()
CASE nKey == K_CTRL_PGUP
lVMove := .t.
lVMove := .T.
oBrowse:goTop()
CASE nKey == K_CTRL_PGDN
lVMove := .t.
lVMove := .T.
oBrowse:goBottom()
CASE nKey == K_LEFT
lHMove := .t.
lHMove := .T.
oBrowse:Left()
CASE nKey == K_RIGHT
lHMove := .t.
lHMove := .T.
oBrowse:Right()
CASE nKey == K_HOME
lHMove := .t.
lHMove := .T.
oBrowse:home()
CASE nKey == K_END
lHMove := .t.
lHMove := .T.
oBrowse:end()
CASE nKey == K_CTRL_LEFT
lHMove := .t.
lHMove := .T.
oBrowse:panLeft()
CASE nKey == K_CTRL_RIGHT
lHMove := .t.
lHMove := .T.
oBrowse:panRight()
CASE nKey == K_CTRL_HOME
lHMove := .t.
lHMove := .T.
oBrowse:panHome()
CASE nKey == K_CTRL_END
lHMove := .t.
lHMove := .T.
oBrowse:panEnd()
CASE nKey == K_MWBACKWARD
lVMove := .t.
lVMove := .T.
oBrowse:down()
CASE nKey == K_MWFORWARD
lVMove := .t.
lVMove := .T.
oBrowse:up()
CASE Vou_NavigateToCell( oBrowse, nKey )
OTHERWISE
lRet := .f.
lRet := .F.
ENDCASE
@@ -741,11 +741,11 @@ FUNCTION Vou_NavigateToCell( oBrowse )
DispEnd()
oBrowse:hilite()
RETURN .t.
RETURN .T.
ENDIF
ENDIF
RETURN .f.
RETURN .F.
//
@@ -877,7 +877,7 @@ FUNCTION Vou_BrwSetVScroll( mp1, oBrowse )
//
STATIC FUNCTION BrwOnEvent( oWvtBrw, cPaintID, oBrowse, nKey )
LOCAL lRet := .t., lRefAll := .f.
LOCAL lRet := .T., lRefAll := .F.
HB_SYMBOL_UNUSED( cPaintID )
@@ -896,19 +896,19 @@ STATIC FUNCTION BrwOnEvent( oWvtBrw, cPaintID, oBrowse, nKey )
CASE nKey == K_PGDN
oBrowse:pageDown()
lRefAll := .t.
lRefAll := .T.
CASE nKey == K_PGUP
oBrowse:pageUp()
lRefAll := .t.
lRefAll := .T.
CASE nKey == K_CTRL_PGUP
oBrowse:goTop()
lRefAll := .t.
lRefAll := .T.
CASE nKey == K_CTRL_PGDN
oBrowse:goBottom()
lRefAll := .t.
lRefAll := .T.
CASE nKey == K_HOME
oBrowse:home()
@@ -936,7 +936,7 @@ STATIC FUNCTION BrwOnEvent( oWvtBrw, cPaintID, oBrowse, nKey )
CASE nKey == K_SBTHUMBTRACKVERT
OrdKeyGoTo( oWvtBrw:oVBar:GetPos() )
lRefAll := .t.
lRefAll := .T.
CASE nKey == K_SBTHUMBTRACKHORZ
oBrowse:ColPos := oWvtBrw:oHBar:GetPos()
@@ -966,7 +966,7 @@ STATIC FUNCTION BrwOnEvent( oWvtBrw, cPaintID, oBrowse, nKey )
oBrowse:right()
OTHERWISE
lRet := .f.
lRet := .F.
ENDCASE

View File

@@ -258,7 +258,7 @@ FUNCTION WvtSetObjects( aObject )
FUNCTION SetMouseCheck( lYes )
LOCAL lOYes
STATIC lSYes := .t.
STATIC lSYes := .T.
lOYes := lSYes
IF lYes != NIL
lSYes := lYes
@@ -275,7 +275,7 @@ FUNCTION WvtWindowExpand( nUnits )
Wvt_setFont( "Courier New", sUnits )
RETURN .t.
RETURN .T.
//
@@ -303,7 +303,7 @@ FUNCTION VouChoice( aChoices )
FUNCTION Hb_Clear()
CLS
RETURN .f.
RETURN .F.
//
@@ -314,7 +314,7 @@ FUNCTION MyMenuProcedure( nID )
CASE nID == 102
alert( 'Procedure 102' )
ENDCASE
RETURN .t.
RETURN .T.
//
@@ -334,7 +334,7 @@ FUNCTION BuildWvgToolBar( oDA, nActiveX )
oTBar:imageWidth := 26
oTBar:imageHeight := 24
oTBar:showToolTips := .t.
oTBar:showToolTips := .T.
// After setting properties, create toolbar.
oTBar:create()
@@ -458,7 +458,7 @@ FUNCTION DispStatusMsg( cMsg )
Wvt_DrawLabel( MaxRow(), 60, cMsg, 6, , 0, rgb(198,198,198), "Arial", 18, , 900 )
RETURN .t.
RETURN .T.
//
@@ -470,7 +470,7 @@ FUNCTION ClearStatusMsg()
SetPos( nRow, nCol )
RETURN .t.
RETURN .T.
//

View File

@@ -34,7 +34,7 @@ FUNCTION DialogWvgClassesOne( nMode )
MyDialogOne()
else
bBlock := {| oCrt | ;
oCrt := WvgCrt():New( , , { -1,-1 }, { 54,184 }, , .f. ), ;
oCrt := WvgCrt():New( , , { -1,-1 }, { 54,184 }, , .F. ), ;
oCrt:fontName := 'Courier',;
oCrt:fontHeight := 13 ,;
oCrt:fontWidth := 0 ,;
@@ -64,8 +64,8 @@ STATIC FUNCTION MyDialogOne( oCrt )
HB_SYMBOL_UNUSED( oCrt )
WvtSetKeys( .f. )
lChkMouse := SetMouseCheck( .f. )
WvtSetKeys( .F. )
lChkMouse := SetMouseCheck( .F. )
hPopup := Wvt_SetPopupMenu()
Popups()
@@ -121,9 +121,9 @@ STATIC FUNCTION MyDialogOne( oCrt )
oText:nBackColor := RGB( 0, 0, 255 )
oText:nTextColorHoverOn := RGB( 255, 255, 0 )
oText:nBackColorHoverOn := RGB( 255, 100, 12 )
oText:lItalic := .t.
oText:lItalic := .T.
oText:ToolTip := "Software that GROWS with you"
oText:bOnSelect := {|| .t. }
oText:bOnSelect := {|| .T. }
oDlg:AddObject( oText )
oImg := WvtImage():New( oDlg,102,20,oDlg:MaxCol()-40,37,oDlg:MaxCol()-2 )
@@ -132,7 +132,7 @@ STATIC FUNCTION MyDialogOne( oCrt )
oDlg:AddObject( oImg )
oTBar := WvtToolbar():New( oDlg,103, 0,0,2 )
oTBar:lFloating := .f.
oTBar:lFloating := .F.
oTBar:Tooltip := "Toolbar"
oTBar:AddButton( aImg_[ 1 ], {|| oImg:SetImage( aImg_[ 1 ] ) } , "Lock" )
oTBar:AddButton( aImg_[ 2 ], {|| oImg:SetImage( aImg_[ 2 ] ), oText:SetText( "Harbour" ) } , "New" )
@@ -168,7 +168,7 @@ STATIC FUNCTION MyDialogOne( oCrt )
oPBar2 := WvtProgressBar():New( oDlg, , 14, 129, 25, 137 )
oPBar2:nBarColor := RGB( 240,240,0 )
oPBar2:cBackColor := "W/N*"
oPBar2:lVertical := .t.
oPBar2:lVertical := .T.
oPBar2:nDirection := 0
oPBar2:cImage := GetResource( "vouch1.bmp" )
oDlg:AddObject( oPBar2 )
@@ -176,7 +176,7 @@ STATIC FUNCTION MyDialogOne( oCrt )
oPBar3 := WvtProgressBar():New( oDlg, , 26, 129, 36, 137 )
oPBar3:nBarColor := RGB( 240,240,0 )
oPBar3:cBackColor := "W/N*"
oPBar3:lVertical := .t.
oPBar3:lVertical := .T.
oPBar3:nDirection := 1
oPBar3:cImage := GetResource( "vouch1.bmp" )
oDlg:AddObject( oPBar3 )
@@ -230,14 +230,14 @@ STATIC FUNCTION MyDialogOne( oCrt )
oTBx:cText := cTxt
oTBx:Tooltip := "WvtTextBox():New()"
oTBx:nFontHeight := 16
oTBx:lItalic := .t.
oTBx:lUnderline := .t.
oTBx:lItalic := .T.
oTBx:lUnderline := .T.
oTBx:nAlignHorz := 2
oTBx:nTextColor := RGB( 255,255,255 )
oTBx:nTextColorHoverOn := RGB( 0,0,255 )
oTBx:aPopup := {}
aadd( oTBx:aPopup, { "Getsome" , {|| .t. } } )
aadd( oTBx:aPopup, { "Getsome2", {|| .t. } } )
aadd( oTBx:aPopup, { "Getsome" , {|| .T. } } )
aadd( oTBx:aPopup, { "Getsome2", {|| .T. } } )
oDlg:AddObject( oTBx )
oGetArea := WvtStatic():New( oDlg, , 4, 2, 37, 62 )
@@ -262,7 +262,7 @@ STATIC FUNCTION MyDialogOne( oCrt )
aGets_:= { pad("Pritpal",20 ), pad( "Bedi",20 ), pad( "60, New Professor Colony",30 ), ;
pad( "Ludhiana, INDIA",30 ),;
"PB", pad( "141004",10 ), stod( "20040622" ), .t., 48, 17000, ;
"PB", pad( "141004",10 ), stod( "20040622" ), .T., 48, 17000, ;
pad( "Wvtgui is a classical example of Harbour capabilities...",65 ) }
oGet1 := WvtGets():New( oDlg, , 4, 2, 37, 62 )
@@ -292,20 +292,20 @@ STATIC FUNCTION MyDialogOne( oCrt )
oDlg:oMenu := g_oMenuBar
lOpen := .f.
lOpen := .F.
cUseAlias := "TEST"
USE ( hb_DirBase() + ".." + hb_ps() + ".." + hb_ps() + ".." + hb_ps() + "tests" + hb_ps() + "test.dbf" ) NEW ALIAS ( cUseAlias ) SHARED
if !NetErr()
lOpen := .t.
lOpen := .T.
oWvtBrw := ConfigBrowser( { 1,7,9,10,8 }, cUseAlias, { 6,67,36,120 }, "test.dbf - 1,7,9,10,8", oDlg, "N/W*,N/GR*",1001 )
oDlg:AddObject( oWvtBrw )
endif
lOpen1 := .f.
lOpen1 := .F.
cUseAlias1 := "TEST1"
USE ( hb_DirBase() + ".." + hb_ps() + ".." + hb_ps() + ".." + hb_ps() + "tests" + hb_ps() + "test.dbf" ) NEW ALIAS ( cUseAlias1 ) SHARED
if !NetErr()
lOpen1 := .t.
lOpen1 := .T.
oWvtBrw1 := ConfigBrowser( { 1,2,3,4,5,6 }, cUseAlias1, { 43,4,51,120 }, "test.dbf - 1,2,3,4,5,6",oDlg, "N/BG*,N/W*",1002 )
oDlg:AddObject( oWvtBrw1 )
endif
@@ -326,7 +326,7 @@ STATIC FUNCTION MyDialogOne( oCrt )
endif
WvtSetBlocks( aObjects )
WvtSetKeys( .t. )
WvtSetKeys( .T. )
Wvt_SetPopupMenu( hPopup )
SetMouseCheck( lChkMouse )
@@ -366,7 +366,7 @@ FUNCTION DialogWvgClassesTwo()
oPBar2 := WvtProgressBar():New( oDlg, , 11, 10, 28, 19 )
oPBar2:nBarColor := RGB( 240,240,0 )
oPBar2:cBackColor := "W/N*"
oPBar2:lVertical := .t.
oPBar2:lVertical := .T.
oPBar2:nDirection := 0
oPBar2:cImage := "v_notes.ico"
oDlg:AddObject( oPBar2 )
@@ -374,14 +374,14 @@ FUNCTION DialogWvgClassesTwo()
oPBar3 := WvtProgressBar():New( oDlg, , 11, 77, 28, 80 )
oPBar3:nBarColor := RGB( 0,0,255 )
oPBar3:cBackColor := "W/N*"
oPBar3:lVertical := .t.
oPBar3:lVertical := .T.
oPBar3:nDirection := 1
oDlg:AddObject( oPBar3 )
oPBar4 := WvtProgressBar():New( oDlg, , 22, 22, 28, 74 )
oPBar4:nBarColor := RGB( 255,255,0 )
oPBar4:cBackColor := "W/N*"
oPBar4:lVertical := .t.
oPBar4:lVertical := .T.
oPBar4:nDirection := 0
oDlg:AddObject( oPBar4 )

View File

@@ -34,8 +34,8 @@ FUNCTION demoxbp()
LOCAL aParts := {}
//--------------------------- Dialog -------------------------------\\
oCrt := WvgDialog():new( , , { 30,30 }, { 900,600 }, , .t. )
oCrt:closable := .t.
oCrt := WvgDialog():new( , , { 30,30 }, { 900,600 }, , .T. )
oCrt:closable := .T.
oCrt:icon := GetResource( "vr_1.ico" )
oCrt:create()
@@ -50,7 +50,7 @@ FUNCTION demoxbp()
oTBar := ActiveXBuildToolBarXbp( oDA )
//--------------------------- StatusBar ---------------------------\\
oSBar := WvgStatusBar():new( oCrt ):create( , , , , , .t. )
oSBar := WvgStatusBar():new( oCrt ):create( , , , , , .T. )
oSBar:panelClick := {| oPanel | WVG_MessageBox( , oPanel:caption ) }
oPanel := oSBar:getItem( 1 )
oPanel:caption := 'My Root Panel'
@@ -66,7 +66,7 @@ FUNCTION demoxbp()
oStatic:caption := chr(13)+'Implemented Xbase++ Parts'
oStatic:create( , , { 0, oTBar:currentSize()[2]+3 }, { 120, oCrt:currentSize()[2]-;
oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .t. )
oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .T. )
oStatic:setColorBG( RGB( 200,200,200 ) )
//--------------------------- ListBox -----------------------------\\
@@ -113,7 +113,7 @@ FUNCTION demoxbp()
oTree := WvgTreeView():new( oDA, , { oCrt:currentSize()[1]-160,oTBar:currentSize()[2]+3 }, ;
{ 160, oCrt:currentSize()[2]-;
oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .t. )
oTBar:currentSize()[2]-oSBar:currentSize()[2]-4 }, , .T. )
oTree:hasLines := .T.
oTree:hasButtons := .T.
oTree:alwaysShowSelection := .T.
@@ -134,9 +134,9 @@ FUNCTION demoxbp()
oItem2:addItem( "Third level C" )
#if 0
oItem1:expand( .t. )
oItem1:expand( .T. )
#else
oTree:showExpanded( .t., 2 )
oTree:showExpanded( .T., 2 )
#endif
oTree:setData( oItem2 )
@@ -144,11 +144,11 @@ FUNCTION demoxbp()
//--------------------------- Active-X ---------------------------\\
hb_gtInfo( HB_GTI_WINTITLE, 'http://www.harbour.vouch.info' )
#if 0
oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .t. )
oCom := WvgActiveXControl():New( oDA, , { 0, 0 }, { 100, 100 }, , .T. )
oCom:CLSID := 'Shell.Explorer.2'
oCom:mapEvent( 269, {|| QOut( ' E X P L O R E R - 2 6 9' ) } )
#else
oCom := WvgHTMLViewer():New( oDA, , { 0, 0 }, { 100, 100 }, , .t. )
oCom := WvgHTMLViewer():New( oDA, , { 0, 0 }, { 100, 100 }, , .T. )
oCom:beforeNavigate := {| cURL, x, oHTML | x := x, oHTML := oHTML, oPanel:caption := cURL }
oCom:statusTextChange := {| cText | oPanel:caption := cText }
oCom:mapEvent( 112, {|| oPanel:caption := ' E X P L O R E R - 2 6 9' } )
@@ -158,17 +158,17 @@ FUNCTION demoxbp()
oAddr := WvgSLE():new()
oAddr:bufferLength := 500
oAddr:border := .t.
oAddr:border := .T.
cNavigate := 'http://www.harbour.vouch.info'
oAddr:dataLink := {| x | iif( x == NIL, cNavigate, cNavigate := x ) }
oAddr:setColorFG( RGB( 0,0,255 ) )
oAddr:setColorBG( RGB( 0,255,255 ) )
oAddr:create( oDA, , { 120, oTBar:currentSize()[2] }, { 500,20 }, , .t. )
oAddr:create( oDA, , { 120, oTBar:currentSize()[2] }, { 500,20 }, , .T. )
oAddr:setData()
oAddr:killInputFocus := {| m1, m2, oS | m1:=m1, m2:=m2, oS:getData(), oCom:navigate( cNavigate ) }
//----------------- Panel : Static + Radio + Checkbox ----------\\
oStatic2:= WvgStatic():New( oDA, , { 150, 150 }, { 500,310 }, , .f. )
oStatic2:= WvgStatic():New( oDA, , { 150, 150 }, { 500,310 }, , .F. )
//oStatic2:type := WVGSTATIC_TYPE_RAISEDBOX //BGNDFRAME
oStatic2:exStyle += WS_EX_WINDOWEDGE
//oStatic2:options := WVGSTATIC_FRAMETHICK
@@ -191,7 +191,7 @@ FUNCTION demoxbp()
oRadio:caption := "Com 2"
oRadio:create()
oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .t. )
oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .T. )
oCheck:caption := 'Checkbox A'
oCheck:create()
oCheck:selected := {| m1, m2, o | m1:=m1,m2:=m2, WVG_MessageBox( , iif( o:getData(), 'I am selected','I am not selected' ) ) }
@@ -237,7 +237,7 @@ FUNCTION demoxbp()
// assign data code block accessing LOCAL variable
oMLE := WvgMLE():new()
oMLE:wordWrap := .F.
oMLE:border := .t.
oMLE:border := .T.
oMLE:dataLink := {| x | iif( x==NIL, cText, cText := x ) }
oMLE:create( oStatic2, , { 180,10 }, { 310,250 } )
// Copy text from LOCAL variable into edit buffer via :dataLink
@@ -256,7 +256,7 @@ FUNCTION demoxbp()
oCrt:sendMessage( WM_SIZE, 0, 0 )
oCrt:show()
DO WHILE .t.
DO WHILE .T.
IF inkey() == K_ESC
EXIT
ENDIF
@@ -280,15 +280,15 @@ STATIC FUNCTION ResizeDialogXbp( oCrt, oTBar, oSBar, oStatic, oCom, oTree, oAddr
nH := aCrt[2] - aTBar[2] - aSBar[2]
IF oStatic:isVisible
oStatic:setPosAndSize( { 0, nT+3 }, { 120, nH-4 }, .t. )
oAddr:setPosAndSize( { 120, nT+2 }, { aCrt[1]-120-150, 20 }, .t. )
oCom:setPosAndSize( { 120, nT+2+20 }, { aCrt[1]-120-150, nH-20 }, .t. )
oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .t. )
oStatic:setPosAndSize( { 0, nT+3 }, { 120, nH-4 }, .T. )
oAddr:setPosAndSize( { 120, nT+2 }, { aCrt[1]-120-150, 20 }, .T. )
oCom:setPosAndSize( { 120, nT+2+20 }, { aCrt[1]-120-150, nH-20 }, .T. )
oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .T. )
ELSE
oAddr:setPosAndSize( { 0, nT+2 }, { aCrt[1]-150, 20 }, .t. )
oCom:setPosAndSize( { 0, nT+2+20 }, { aCrt[1]-150, nH-20 }, .t. )
oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .t. )
oAddr:setPosAndSize( { 0, nT+2 }, { aCrt[1]-150, 20 }, .T. )
oCom:setPosAndSize( { 0, nT+2+20 }, { aCrt[1]-150, nH-20 }, .T. )
oTree:setPosAndSize( { aCrt[1]-150, nT }, { 150, nH }, .T. )
ENDIF
@@ -351,7 +351,7 @@ STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt )
oTBar:imageWidth := 26
oTBar:imageHeight := 24
oTBar:showToolTips := .t.
oTBar:showToolTips := .T.
oTBar:create()
@@ -408,16 +408,16 @@ STATIC FUNCTION ExeFontDialogXbp( oCrt )
oFontDlg:title := 'Select a Screen Font'
oFontDlg:aPos := { 150,150 }
oFontDlg:buttonApply := .t.
oFontDlg:buttonApply := .T.
oFontDlg:activateApply := {|| NIL }
oFontDlg:familyName := "Courier New"
oFontDlg:strikeout := .T.
oFontDlg:underscore := .f.
oFontDlg:underscore := .F.
//oFontDlg:activateOk := {|| WVG_MessageBox( , 'activateOK Event Handelled in Windows!' ) }
oFontDlg:nominalPointSize := 12
//oFontDlg:size := .f.
//oFontDlg:style := .f.
//oFontDlg:size := .F.
//oFontDlg:style := .F.
oFontDlg:create()

View File

@@ -299,7 +299,7 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
#if 0
::SendToolbarMessage( TB_SETBUTTONWIDTH, ::buttonWidth, ::buttonWidth )
#endif
::lSized := .t.
::lSized := .T.
ENDIF
oBtn := WvgToolbarButton():new( cCaption, nStyle, cKey )
@@ -313,13 +313,13 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
CASE cType == "C"
IF ( "." $ xImage ) .or. ( "/" $ xImage ) .or. ( "\" $ xImage ) .or. ( ":" $ xImage ) .or. file( 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
CASE cType == "N"
pBitmap := Wvg_PrepareBitmapFromResourceID( xImage, ::imageWidth, ::imageHeight, .t., ::hWnd )
pBitmap := Wvg_PrepareBitmapFromResourceID( xImage, ::imageWidth, ::imageHeight, .T., ::hWnd )
CASE cType == "P"
pBitmap := xImage
@@ -349,7 +349,7 @@ METHOD WvgToolBar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
#endif
::sendToolbarMessage( TB_AUTOSIZE )
ELSE
Wvg_AddToolbarButton( ::pWnd, , , oBtn:command, 3, .f. )
Wvg_AddToolbarButton( ::pWnd, , , oBtn:command, 3, .F. )
ENDIF

View File

@@ -118,7 +118,7 @@ CLASS WvgTreeView INHERIT WvgWindow, WvgDataRef
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 )
iif( HB_ISNIL( lExpanded ), .F., lExpanded ), nLevels )
ENDCLASS
@@ -210,7 +210,7 @@ METHOD WvgTreeView:handleEvent( nMessage, aNM )
ELSE
::setFocus()
ENDIF
RETURN .f.
RETURN .F.
CASE aHdr[ NMH_code ] == TVN_SELCHANGED
::getSelectionInfo( aNM[ 2 ] )
@@ -227,10 +227,10 @@ METHOD WvgTreeView:handleEvent( nMessage, aNM )
ELSE
::setFocus()
ENDIF
RETURN .t.
RETURN .T.
OTHERWISE
RETURN .f.
RETURN .F.
ENDCASE
EXIT
@@ -262,7 +262,7 @@ METHOD WvgTreeView:handleEvent( nMessage, aNM )
::setFocus()
ENDIF
ENDIF
RETURN .f.
RETURN .F.
ENDIF
EXIT
@@ -375,7 +375,7 @@ CLASS WvgTreeViewItem
METHOD destroy()
METHOD expand( lExpand ) INLINE WVG_TreeView_Expand( ::hTree, ::hItem, ;
iif( HB_ISLOGICAL( lExpand ), lExpand, .t. ) )
iif( HB_ISLOGICAL( lExpand ), lExpand, .T. ) )
METHOD isExpanded()
METHOD setCaption( cCaption )
METHOD setExpandedImage( nResIdoBitmap )

View File

@@ -151,11 +151,11 @@ CLASS WvgWindow INHERIT WvgPartHandler
DATA title INIT " "
DATA icon INIT 0
DATA closable INIT .T.
DATA resizable INIT .t.
DATA resizable INIT .T.
DATA resizeMode INIT 0
DATA style INIT WS_OVERLAPPEDWINDOW
DATA exStyle INIT 0
DATA lModal INIT .f.
DATA lModal INIT .F.
DATA pGTp
DATA pGT
DATA objType INIT objTypeNone
@@ -439,23 +439,23 @@ METHOD WvgWindow:captureMouse()
METHOD WvgWindow:disable()
IF WVG_EnableWindow( ::hWnd, .f. )
::is_enabled := .f.
RETURN .t.
IF WVG_EnableWindow( ::hWnd, .F. )
::is_enabled := .F.
RETURN .T.
ENDIF
RETURN .f.
RETURN .F.
//
METHOD WvgWindow:enable()
IF WVG_EnableWindow( ::hWnd, .t. )
::is_enabled := .t.
RETURN .t.
IF WVG_EnableWindow( ::hWnd, .T. )
::is_enabled := .T.
RETURN .T.
ENDIF
RETURN .f.
RETURN .F.
//
@@ -463,7 +463,7 @@ METHOD WvgWindow:hide()
IF WVG_IsWindow( ::hWnd )
WVG_ShowWindow( ::hWnd, SW_HIDE )
::is_hidden := .t.
::is_hidden := .T.
ENDIF
RETURN Self
@@ -608,19 +608,19 @@ METHOD WvgWindow:setSize( aSize, lPaint )
//
METHOD WvgWindow:isDerivedFrom( cClassORoObject )
LOCAL lTrue := .f.
LOCAL lTrue := .F.
LOCAL cCls := __ObjGetClsName( self )
/* Compares without Xbp or Wvg prefixes */
IF HB_ISSTRING( cClassORoObject )
IF upper( substr( cClassORoObject,4 ) ) == upper( substr( cCls,4 ) )
lTrue := .t.
lTrue := .T.
ENDIF
ELSEIF HB_ISOBJECT( cClassORoObject )
IF upper( substr( cClassORoObject:className,4 ) ) == upper( substr( cCls,4 ) )
lTrue := .t.
lTrue := .T.
ENDIF
ENDIF
@@ -631,8 +631,8 @@ METHOD WvgWindow:isDerivedFrom( cClassORoObject )
METHOD WvgWindow:show()
WVG_ShowWindow( ::hWnd, SW_NORMAL )
::is_hidden := .f.
::lHasInputFocus := .t.
::is_hidden := .F.
::lHasInputFocus := .T.
RETURN Self

View File

@@ -72,7 +72,7 @@ PROCEDURE Main()
// csetref() tests
?
? "CSETREF tests:"
? " current csetref setting(should be .f.)................: ", csetref()
? " current csetref setting(should be .F.)................: ", csetref()
? " return value of addascii([A],1,1) call(should be 'B'): ", addascii( "A",1,1 )
? " value of cStr..........................................: ", cStr
? " return value of addascii(cStr,1,1) call...............: ", addascii( cStr,1,1 )
@@ -81,7 +81,7 @@ PROCEDURE Main()
? " value of cStr is now...................................: ", cStr
? " return value of addascii(@cStr,-1,1) call.............: ", addascii( @cStr, - 1,1 )
? " value of cStr is now...................................: ", cStr
? " return value of csetref(.t.)..........................: ", csetref( .T. )
? " return value of csetref(.T.)..........................: ", csetref( .T. )
? " return value of addascii([A],1,1) call................: ", addascii( "A",1,1 )
? " return value of addascii(cStr,1,1) call...............: ", addascii( cStr,1,1 )
? " value of cStr is now...................................: ", cStr
@@ -89,7 +89,7 @@ PROCEDURE Main()
? " value of cStr is now...................................: ", cStr
? " return value of addascii(@cStr,-1,1) call.............: ", addascii( @cStr, - 1,1 )
? " value of cStr is now...................................: ", cStr
? " return value of csetref(.f.)..........................: ", csetref( .F. )
? " return value of csetref(.F.)..........................: ", csetref( .F. )
// tests for the new 4th parameter
?

View File

@@ -56,21 +56,21 @@ PROCEDURE Main()
LOCAL n
CTINIT()
ctinit()
SET DECIMALS TO 15
for n := 1 TO 1000
OutStd( Str( n,20,15 ) + ": " + Str( mantissa(n ),20,15 ) + " " + Str( exponent(n ),4 ) + hb_eol() )
OutStd( Str( Sqrt(n ),20,15 ) + ": " + Str( mantissa(Sqrt(n ) ),20,15 ) + " " + Str( exponent(Sqrt(n ) ),4 ) + hb_eol() )
next n
FOR n := 1 TO 1000
OutStd( Str( n, 20, 15 ) + ": " + Str( mantissa( n ), 20, 15 ) + " " + Str( exponent( n ), 4 ) + hb_eol() )
OutStd( Str( Sqrt( n ), 20, 15 ) + ": " + Str( mantissa( Sqrt( n ) ), 20, 15 ) + " " + Str( exponent( Sqrt( n ) ), 4 ) + hb_eol() )
NEXT n
// The call to str( infinity(.t.) ), generate a GPF.
// outstd(str(infinity(.t.))+str(mantissa( infinity(.t.) ))+str(exponent( infinity(.t.) )))
// outstd(str(infinity(.t.)) )
// The call to str( infinity(.T.) ), generate a GPF.
// OutStd( Str( infinity( .T. ) ) + Str( mantissa( infinity( .T. ) ) ) + Str( exponent( infinity( .T. ) ) ) )
// OutStd( Str( infinity( .T. ) ) )
OutStd( " infinity(.t.): " + Str( mantissa(infinity( .T. ) ),20,15 ) + " " )
OutStd( Str( exponent(infinity( .T. ) ),4 ) + hb_eol() )
OutStd( " infinity(.T.): " + Str( mantissa( infinity( .T. ) ), 20, 15 ) + " " )
OutStd( Str( exponent( infinity( .T. ) ), 4 ) + hb_eol() )
CTEXIT()

View File

@@ -56,7 +56,7 @@
PROCEDURE Main()
CTINIT()
ctinit()
SET DECIMAL TO 3
CLS

View File

@@ -56,7 +56,7 @@
PROCEDURE Main()
CTINIT()
ctinit()
SET DECIMAL TO 2
CLS

View File

@@ -54,7 +54,7 @@
PROCEDURE Main()
CTINIT()
ctinit()
SET DECIMAL TO 14
CLS

View File

@@ -65,7 +65,7 @@ PROCEDURE Main()
LOCAL X, Y
CTINIT()
ctinit()
SET DECIMAL TO 14
CLS

View File

@@ -64,7 +64,7 @@ PROCEDURE Main()
// simple tests
? "Simple tests:"
? [ wordswap("1234567890") == "3412785690" ? --> "] + wordswap( "1234567890" ) + ["]
? [ wordswap("1234567890", .t.) == "4321876590" ? --> "] + wordswap( "1234567890", .T. ) + ["]
? [ wordswap("1234567890", .T.) == "4321876590" ? --> "] + wordswap( "1234567890", .T. ) + ["]
?
? "End test of WORDSWAP()"

View File

@@ -407,7 +407,7 @@ HB_FUNC( TOKENINIT )
}
else
{
/* nothing to rewind -> return .f. */
/* nothing to rewind -> return .F. */
PHB_ITEM pSubst = NULL;
int iArgErrorMode = ct_getargerrormode();

View File

@@ -13,7 +13,7 @@
#include "fileio.ch"
#define IMAGES_IN ""
#define IMAGES_OUT "imgs_out/"
#define IMAGES_OUT "imgs_out" + hb_ps()
PROCEDURE Main()
@@ -27,15 +27,13 @@ PROCEDURE Main()
LOCAL nH, nLen, cStr
// LOCAL appo
//? "Press Alt-D + Enter to activate debug"
//AltD( .T. )
//Inkey(0)
// ? "Press Alt-D + Enter to activate debug"
// AltD( .T. )
// Inkey( 0 )
AltD()
// Check output directory
IF !hb_DirExists( IMAGES_OUT )
#ifdef HB_COMPAT_C53
IF ! hb_DirExists( IMAGES_OUT )
hb_DirCreate( IMAGES_OUT )
#endif
ENDIF
? "Initialise"
@@ -153,42 +151,42 @@ PROCEDURE Main()
//bmpinfoheader:Buffer( fi_GetInfoHeader( im ), .T. )
//bmpinfoheader:Pointer( fi_GetInfoHeader( im ) )
//? "Header :", ValToPrg( bmpinfoheader )
//? bmpinfoheader:SayMembers(" ", .t., .t.)
//? bmpinfoheader:SayMembers(" ", .T., .T. )
//bmpinfo:Pointer( fi_GetInfo( im ) )
bmpinfo := NIL // To fix warning
? "Info :", ValToPrg( bmpinfo )
//? bmpinfo:SayMembers(" ", .t., .t.)
//? bmpinfo:SayMembers(" ", .T., .T. )
? "-----------------------------------------------------"
//? ValType( bmpinfo:Devalue() )
//Tracelog( "bmpinfoheader", ValToPrg( bmpinfoheader ), ;
// bmpinfoheader:SayMembers(, .t.), bmpinfoheader:Value(), bmpinfoheader:DeValue(), hb_dumpvar( bmpinfoheader:Array() ), hb_dumpvar( bmpinfoheader:acMembers ) )
// bmpinfoheader:SayMembers(, .T.), bmpinfoheader:Value(), bmpinfoheader:DeValue(), hb_dumpvar( bmpinfoheader:Array() ), hb_dumpvar( bmpinfoheader:acMembers ) )
//appo := bkcolor:Value()
//? bkcolor:Pointer( fi_GetBackgroundColor( im ) )
//? fi_GetBackgroundColor( im, @bkcolor:Value() )
//bkcolor:Buffer( appo )
//? bkcolor:SayMembers(" ", .t., .t.)
//? bkcolor:SayMembers( " ", .T., .T. )
//bkcolor:rgbBlue := 205
//? fi_SetBackgroundColor( im, hb_String2Pointer( bkcolor:Value() ) )
Tracelog( "linha 168" )
//? fi_SetBackgroundColor( im, bkcolor:Value() )
Tracelog( "linha 170" )
//? bkcolor:SayMembers(" ", .t., .t.)
//? bkcolor:SayMembers( " ", .T., .T. )
Tracelog( "linha 162" )
//? bkcolor:Pointer( fi_GetBackgroundColor( im ) )
//? fi_GetBackgroundColor( im, @bkcolor:Value() )
//bkcolor:Buffer( appo )
Tracelog( "linha 176" )
//? bkcolor:SayMembers(" ", .t., .t.)
//? bkcolor:SayMembers( " ", .T., .T. )
Tracelog( "linha 179" )
//iccprofile:Pointer( fi_GetICCProfile( im ) )
Tracelog( "linha 181" )
//? "Header :", ValToPrg( iccprofile )
Tracelog( "linha 183" )
//? iccprofile:SayMembers(" ", .T., .T. )
//? iccprofile:SayMembers( " ", .T., .T. )
//bmpinfoheader:Reset()
//appo := NIL

View File

@@ -128,7 +128,7 @@ FUNCTION ToChar( xTxt, cSeparator, lDebug )
IF n != nLen
cOut += cSeparator
ENDIF
NEXT n
NEXT
IF lDebug
cOut += "}"
ENDIF
@@ -151,7 +151,7 @@ FUNCTION ToChar( xTxt, cSeparator, lDebug )
IF n != nLen
cOut += cSeparator
ENDIF
NEXT n
NEXT
cOut += "}"
ELSE
cOut := ToChar( xTxt:Run(), cSeparator, lDebug )

View File

@@ -15,7 +15,7 @@ PROCEDURE Main()
ar[ 1, i ] := i // 1 -> 26 Numeric
ar[ 2, i ] := Chr( Asc( "A" ) + i - 1 ) // "A" -> "Z" Character
ar[ 3, i ] := Chr( Asc( "Z" ) - i + 1 ) // "Z" -> "A" Character
NEXT i
NEXT
// Set Up aHeadings[] for column headings
aHeadings := { "Numbers", "Letters", "Reverse" }
// Set Up Blocks Describing Individual Elements in Array ar[]

View File

@@ -267,7 +267,7 @@ PROCEDURE SQLFetchAll()
FUNCTION SQLOpen( cAlias, cQuery, xFetch, cOrder )
LOCAL cFile
LOCAL Result := .t.
LOCAL Result := .T.
LOCAL x
LOCAL s_oServer
LOCAL oQuery
@@ -348,7 +348,7 @@ FUNCTION SQLOpen( cAlias, cQuery, xFetch, cOrder )
FUNCTION SQLConnect( cServer, cDatabase, cUser, cPassword, cSchema )
LOCAL lRetval := .t.
LOCAL lRetval := .T.
s_oServer := TPQServer():New( cServer, cDatabase, cUser, cPassWord, 5432, cSchema )
IF s_oServer:NetErr()

View File

@@ -55,7 +55,7 @@
//#define SQLITE_ENABLE_COLUMN_METADATA
PROCEDURE main()
LOCAL lCreateIfNotExist := .f.
LOCAL lCreateIfNotExist := .F.
LOCAL db := sqlite3_open( "new.s3db", lCreateIfNotExist )
IF ! Empty( db )

View File

@@ -72,7 +72,7 @@ PROCEDURE main()
/*
*/
PROCEDURE t1()
LOCAL lCreateIfNotExist := .f.
LOCAL lCreateIfNotExist := .F.
LOCAL db := sqlite3_open( "new.s3db", lCreateIfNotExist )
IF ! Empty( db )
@@ -84,7 +84,7 @@ PROCEDURE t1()
/*
*/
PROCEDURE t2()
LOCAL lCreateIfNotExist := .t.
LOCAL lCreateIfNotExist := .T.
LOCAL db := sqlite3_open( "new.s3db", lCreateIfNotExist )
LOCAL stmt
LOCAL nCCount, nCType, nI, nJ
@@ -94,8 +94,8 @@ PROCEDURE t2()
IF ! Empty( db )
#ifdef TRACE
sqlite3_profile( db, .t. )
sqlite3_trace( db, .t. )
sqlite3_profile( db, .T. )
sqlite3_trace( db, .T. )
#endif
sqlite3_exec( db, "PRAGMA auto_vacuum=0" )
sqlite3_exec( db, "PRAGMA page_size=4096" )
@@ -168,25 +168,25 @@ PROCEDURE t2()
? "Column type : " + aCType[ nCType ]
? "Column value: "
SWITCH nCType
CASE SQLITE_BLOB
?? "BLOB" //sqlite3_column_blob( stmt, nI )
EXIT
SWITCH nCType
CASE SQLITE_BLOB
?? "BLOB" //sqlite3_column_blob( stmt, nI )
EXIT
CASE SQLITE_INTEGER
?? str ( sqlite3_column_int( stmt, nI ) )
EXIT
CASE SQLITE_INTEGER
?? str ( sqlite3_column_int( stmt, nI ) )
EXIT
CASE SQLITE_NULL
?? "NULL"
EXIT
CASE SQLITE_NULL
?? "NULL"
EXIT
CASE SQLITE_TEXT
?? sqlite3_column_text( stmt, nI )
EXIT
END SWITCH
CASE SQLITE_TEXT
?? sqlite3_column_text( stmt, nI )
EXIT
ENDSWITCH
NEXT nI
NEXT
ENDIF
ENDDO
? "Total records - " + str( nJ )
@@ -213,25 +213,26 @@ PROCEDURE t2()
? "Column name : " + sqlite3_column_name( stmt, nI )
? "Column type : " + aCType[ nCType ]
? "Column value: "
SWITCH nCType
CASE SQLITE_BLOB
?? "BLOB" //sqlite3_column_blob( stmt, nI )
EXIT
CASE SQLITE_INTEGER
?? str( sqlite3_column_int( stmt, nI ) )
EXIT
SWITCH nCType
CASE SQLITE_BLOB
?? "BLOB" //sqlite3_column_blob( stmt, nI )
EXIT
CASE SQLITE_NULL
?? "NULL"
EXIT
CASE SQLITE_INTEGER
?? str( sqlite3_column_int( stmt, nI ) )
EXIT
CASE SQLITE_TEXT
?? sqlite3_column_text( stmt, nI )
EXIT
END SWITCH
CASE SQLITE_NULL
?? "NULL"
EXIT
NEXT nI
CASE SQLITE_TEXT
?? sqlite3_column_text( stmt, nI )
EXIT
ENDSWITCH
NEXT
ENDIF
ENDDO
? "Total records - " + str( nJ )
@@ -265,11 +266,11 @@ PROCEDURE t2()
?
aTable := sqlite3_get_table( db, "SELECT name, age FROM t1 WHERE age BETWEEN 10 AND 20" )
FOR nI := 1 TO Len( aTable )
FOR nJ := 1 TO Len( aTable[nI] )
?? aTable[nI][nJ], " "
NEXT nJ
FOR nJ := 1 TO Len( aTable[ nI ] )
?? aTable[ nI ][ nJ ], " "
NEXT
?
NEXT nI
NEXT
sqlite3_sleep( 3000 )
ENDIF

View File

@@ -146,7 +146,7 @@ METHOD OpenDigest( cUrl ) CLASS tIPClientPOP
METHOD Close( lAutoQuit ) CLASS tIPClientPOP
IF ! HB_ISLOGICAL( lAutoQuit )
lAutoQuit := .t.
lAutoQuit := .T.
ENDIF
::InetTimeOut( ::SocketCon )

View File

@@ -41,7 +41,7 @@ RETURN infoCls():new()
METHOD ref( p1, p2, p3, p4, p5, p6, p7 ) CLASS OleObjServer
p1 := date()
p2 := hb_datetime()
p3 := .t.
p3 := .T.
p4 := { "A", "B", "C" }
p5 := timerCls():new()
p6 := 123.456

View File

@@ -16,7 +16,7 @@ PROCEDURE Main()
BEGIN SEQUENCE WITH {|| break() }
oObject := CreateObject( "MyOleServer" )
? oObject:MyMethod( "Hello", 123, .t., ;
? oObject:MyMethod( "Hello", 123, .T., ;
{ hb_datetime(), 123.45, { date(), 2, 3 } } )
? oObject:Property1
oObject:Property1 := "!!! >>>" + upper( oObject:Property1 ) + "<<< !!!"

View File

@@ -139,7 +139,7 @@ PROCEDURE Main()
NEXT
// AdsUseDictionary(.t.) this function no longer is needed; the system knows if it's using a Data Dictionary connection
// AdsUseDictionary( .T. ) this function no longer is needed; the system knows if it's using a Data Dictionary connection
// Open the "long table name" for Table2
dbUseArea( .T. , , "Customer Data", "custom", .T. , .F. )

View File

@@ -59,24 +59,24 @@
#undef _TSTRUCT_ ;;
#endif ;;
#define _TSTRUCT_ <hStruct> ;;
<hStruct> := HB_Hash() ;;
HB_HCaseMatch( <hStruct>, .f. )
<hStruct> := hb_Hash() ;;
hb_HCaseMatch( <hStruct>, .F. )
#xcommand MEMBER <cName, ...> ;
[ AS <type:STRING,NUMERIC,LOGICAL,DATE,CODEBLOCK,OBJECT> ] ;
[ INIT <uValue> ] ;
=> ;
HB_HashAddMember( {<(cName)>}, <(type)>, <uValue>, _TSTRUCT_ )
hb_HashAddMember( {<(cName)>}, <(type)>, <uValue>, _TSTRUCT_ )
#xcommand MEMBER <cName> ;
[ AS <type:ARRAY> ] ;
[ INIT <uValue> ] ;
=> ;
HB_HashAddMember( {<(cName)>}, <(type)>, <uValue>, _TSTRUCT_ )
hb_HashAddMember( {<(cName)>}, <(type)>, <uValue>, _TSTRUCT_ )
#xcommand ENDSTRUCTURE => HB_HAutoAdd( _TSTRUCT_, .f. )
#xcommand ENDSTRUCTURE => hb_HAutoAdd( _TSTRUCT_, .F. )
#translate DESTROY STRUCTURE <hStruct> => <hStruct> := nil
#translate DESTROY STRUCTURE <hStruct> => <hStruct> := NIL
#endif

View File

@@ -240,7 +240,7 @@ FUNCTION ParseString( cString, cDelim, nRet )
cBuf := Substr( cBuf, nPosFim + 1, Len( cBuf ) )
NEXT i
NEXT
RETURN aElem[ nRet ]

View File

@@ -94,7 +94,7 @@ CLASS THtmlControl
DATA MaxChars // length on screen
DATA Checked INIT .F. // checkboxes...
DATA lLabel INIT .f.
DATA lLabel INIT .F.
DATA Source, Align // images...
DATA Wrap // textarea

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -303,17 +303,17 @@ RETURN Self
METHOD MatchCriteria( oFound ) CLASS TXmlIteratorRegex
IF ::cName != NIL .and. ;
( oFound:cName == NIL .or. ! HB_REGEXLIKE( ::cName, oFound:cName, .t. ) )
( oFound:cName == NIL .or. ! HB_REGEXLIKE( ::cName, oFound:cName, .T. ) )
RETURN .F.
ENDIF
IF ::cAttribute != NIL .and. ;
hb_hScan( oFound:aAttributes, {| cKey | HB_REGEXLIKE( ::cAttribute, cKey, .t. ) } ) == 0
hb_hScan( oFound:aAttributes, {| cKey | HB_REGEXLIKE( ::cAttribute, cKey, .T. ) } ) == 0
RETURN .F.
ENDIF
IF ::cValue != NIL .and. ;
hb_hScan( oFound:aAttributes, {| xKey, cValue | HB_SYMBOL_UNUSED( xKey ), HB_REGEXLIKE( ::cValue, cValue, .t. ) } ) == 0
hb_hScan( oFound:aAttributes, {| xKey, cValue | HB_SYMBOL_UNUSED( xKey ), HB_REGEXLIKE( ::cValue, cValue, .T. ) } ) == 0
RETURN .F.
ENDIF

View File

@@ -64,10 +64,10 @@
#include "hboo.ch"
#xtranslate __xhb_cls_scope( <scope>, .t. ) => <scope> + HB_OO_CLSTP_PERSIST
#xtranslate __xhb_cls_scope( <scope>, .f. ) => <scope>
#xtranslate __xhb_cls_scope( , .t. ) => HB_OO_CLSTP_PERSIST
#xtranslate __xhb_cls_scope( , .f. ) =>
#xtranslate __xhb_cls_scope( <scope>, .T. ) => <scope> + HB_OO_CLSTP_PERSIST
#xtranslate __xhb_cls_scope( <scope>, .F. ) => <scope>
#xtranslate __xhb_cls_scope( , .T. ) => HB_OO_CLSTP_PERSIST
#xtranslate __xhb_cls_scope( , .F. ) =>
#xcommand OVERRIDE METHOD <!Message!> [IN] CLASS <!Class!> ;
WITH [METHOD] <!Method!> [SCOPE <Scope>] => ;

View File

@@ -66,8 +66,6 @@
* LogError()
*/
/* #pragma LINENUMBER=ON */
#include "common.ch"
#include "error.ch"
#include "fileio.ch"
@@ -79,6 +77,7 @@ STATIC s_cErrorLog := "error.log"
STATIC s_lErrorLogAppend := .F.
FUNCTION xhb_ErrorLog( cErrorLog, lErrorLogAppend )
LOCAL aValueOld := { s_cErrorLog, s_lErrorLogAppend }
IF HB_ISSTRING( cErrorLog )
@@ -91,22 +90,28 @@ FUNCTION xhb_ErrorLog( cErrorLog, lErrorLogAppend )
RETURN aValueOld
PROCEDURE xhb_ErrorSys()
ErrorBlock( {| oError | xhb_DefError( oError ) } )
RETURN
STATIC FUNCTION err_ModuleName( oError, n )
RETURN iif( __objHasMsg( oError, "MODULENAME" ), oError:ModuleName, ;
iif( n != NIL, ProcFile( n ), NIL ) )
iif( n != NIL, ProcFile( n ), NIL ) )
STATIC FUNCTION err_ProcName( oError, n )
RETURN iif( __objHasMsg( oError, "PROCNAME" ), oError:ProcName, ;
iif( n != NIL, ProcName( n ), NIL ) )
iif( n != NIL, ProcName( n ), NIL ) )
STATIC FUNCTION err_ProcLine( oError, n )
RETURN iif( __objHasMsg( oError, "PROCLINE" ), oError:ProcLine, ;
iif( n != NIL, ProcLine( n ), NIL ) )
iif( n != NIL, ProcLine( n ), NIL ) )
STATIC FUNCTION xhb_DefError( oError )
LOCAL cMessage
LOCAL cDOSError
@@ -133,22 +138,22 @@ STATIC FUNCTION xhb_DefError( oError )
// By default, retry on RDD lock error failure */
IF oError:genCode == EG_LOCK .AND. ;
oError:canRetry
oError:canRetry
// oError:tries++
RETURN .T.
ENDIF
// Set NetErr() of there was a database open error
IF oError:genCode == EG_OPEN .AND. ;
oError:osCode == 32 .AND. ;
oError:canDefault
oError:osCode == 32 .AND. ;
oError:canDefault
NetErr( .T. )
RETURN .F.
ENDIF
// Set NetErr() if there was a lock error on dbAppend()
IF oError:genCode == EG_APPENDLOCK .AND. ;
oError:canDefault
oError:canDefault
NetErr( .T. )
RETURN .F.
ENDIF
@@ -159,14 +164,14 @@ STATIC FUNCTION xhb_DefError( oError )
ENDDO
cMessage := ErrorMessage( oError )
If !Empty( oError:osCode )
cDOSError := "(DOS Error " + Ltrim( Str( oError:osCode ) ) + ")"
Endif
IF !Empty( oError:osCode )
cDOSError := "(DOS Error " + LTrim( Str( oError:osCode ) ) + ")"
ENDIF
If HB_ISARRAY( oError:Args )
cMessage += " Arguments: (" + Arguments( oError ) + ")"
Endif
IF HB_ISARRAY( oError:Args )
cMessage += " Arguments: (" + Arguments( oError ) + ")"
ENDIF
// Build buttons
@@ -174,15 +179,15 @@ STATIC FUNCTION xhb_DefError( oError )
aOptions := {}
// AAdd( aOptions, "Break" )
Aadd( aOptions, "Quit" )
AAdd( aOptions, "Quit" )
If oError:canRetry
Aadd( aOptions, "Retry" )
Endif
IF oError:canRetry
AAdd( aOptions, "Retry" )
ENDIF
If oError:canDefault
Aadd( aOptions, "Default" )
Endif
IF oError:canDefault
AAdd( aOptions, "Default" )
ENDIF
// Show alert box
//TraceLog( cMessage )
@@ -190,13 +195,13 @@ STATIC FUNCTION xhb_DefError( oError )
nChoice := 0
DO WHILE nChoice == 0
If Empty( oError:osCode )
IF Empty( oError:osCode )
nChoice := Alert( cMessage, aOptions )
Else
ELSE
nChoice := Alert( cMessage + ";" + cDOSError, aOptions )
Endif
ENDIF
Enddo
ENDDO
IF ! Empty( nChoice )
DO CASE
@@ -229,406 +234,407 @@ STATIC FUNCTION xhb_DefError( oError )
n := 2
WHILE ! Empty( ProcName( ++n ) )
? "Called from :", ProcName( n ) + ;
"(" + LTrim( Str( ProcLine( n ) ) ) + ") in Module:", ProcFile( n )
"(" + LTrim( Str( ProcLine( n ) ) ) + ") in Module:", ProcFile( n )
ENDDO
/// For some strange reason, the DOS prompt gets written on the first line
/// *of* the message instead of on the first line *after* the message after
/// the program quits, unless the screen has scrolled. - dgh
// For some strange reason, the DOS prompt gets written on the first line
// *of* the message instead of on the first line *after* the message after
// the program quits, unless the screen has scrolled. - dgh
LogError( oError )
ErrorLevel( 1 )
?
QUIT
RETURN .F.
RETURN .F.
// [vszakats]
STATIC FUNCTION ErrorMessage( oError )
LOCAL cMessage
LOCAL cMessage
// start error message
cMessage := iif( oError:severity > ES_WARNING, "Error", "Warning" ) + " "
// start error message
cMessage := iif( oError:severity > ES_WARNING, "Error", "Warning" ) + " "
// add subsystem name if available
If HB_ISSTRING( oError:subsystem )
cMessage += oError:subsystem()
Else
cMessage += "???"
Endif
// add subsystem name if available
IF HB_ISSTRING( oError:subsystem )
cMessage += oError:subsystem()
ELSE
cMessage += "???"
ENDIF
// add subsystem's error code if available
If HB_ISNUMERIC( oError:subCode )
cMessage += "/" + Ltrim( Str( oError:subCode ) )
Else
cMessage += "/???"
Endif
// add subsystem's error code if available
IF HB_ISNUMERIC( oError:subCode )
cMessage += "/" + LTrim( Str( oError:subCode ) )
ELSE
cMessage += "/???"
ENDIF
// add error description if available
If HB_ISSTRING( oError:description )
cMessage += " " + oError:description
Endif
// add error description if available
IF HB_ISSTRING( oError:description )
cMessage += " " + oError:description
ENDIF
// add either filename or operation
Do Case
Case !Empty( oError:filename )
cMessage += ": " + oError:filename
Case !Empty( oError:operation )
cMessage += ": " + oError:operation
Endcase
// add either filename or operation
DO CASE
CASE ! Empty( oError:filename )
cMessage += ": " + oError:filename
CASE ! Empty( oError:operation )
cMessage += ": " + oError:operation
ENDCASE
Return cMessage
RETURN cMessage
STATIC FUNCTION LogError( oerr )
LOCAL cScreen
LOCAL cLogFile := s_cErrorLog // error log file name
LOCAL lAppendLog := s_lErrorLogAppend // .F. = create a new error log (default) .t. = append to a existing one.
LOCAL nStart := 1
LOCAL nCellSize
LOCAL nRange
LOCAL nCols
LOCAL nRows
LOCAL cScreen
LOCAL cLogFile := s_cErrorLog // error log file name
LOCAL lAppendLog := s_lErrorLogAppend // .F. = create a new error log (default) .T. = append to a existing one.
LOCAL nStart := 1
LOCAL nCellSize
LOCAL nRange
LOCAL nCols
LOCAL nRows
LOCAL nCount
LOCAL nCount
LOCAL nForLoop
LOCAL cOutString
LOCAL cSubString
LOCAL nForLoop
LOCAL cOutString
LOCAL cSubString
LOCAL nHandle
LOCAL nBytes
LOCAL nHandle
LOCAL nBytes
LOCAL nHandle2 := -1
LOCAL cLogFile2 := "_error.log"
LOCAL cBuff := ""
LOCAL nRead
LOCAL nHandle2 := - 1
LOCAL cLogFile2 := "_error.log"
LOCAL cBuff := ""
LOCAL nRead
nCols := MaxCol()
IF nCols > 0
nRows := MaxRow()
cScreen := SaveScreen()
ENDIF
// Alert( "An error occured, Information will be ;written to error.log" )
IF ! lAppendLog
nHandle := FCreate( cLogFile, FC_NORMAL )
ELSE
IF !File( cLogFile )
nHandle := FCreate( cLogFile, FC_NORMAL )
ELSE
nHandle := FCreate( cLogFile2, FC_NORMAL )
nHandle2 := FOpen( cLogFile, FO_READ )
ENDIF
ENDIF
nCols := MaxCol()
IF nCols > 0
nRows := MaxRow()
cScreen := Savescreen()
ENDIF
//Alert( 'An error occured, Information will be ;written to error.log' )
IF nHandle < 3 .AND. !( Lower( cLogFile ) == "error.log" )
// Force creating error.log in case supplied log file cannot
// be created for any reason
cLogFile := "error.log"
nHandle := FCreate( cLogFile, FC_NORMAL )
ENDIF
If !lAppendLog
nHandle := FCreate( cLogFile, FC_NORMAL )
Else
If !File( cLogFile )
nHandle := FCreate( cLogFile, FC_NORMAL )
Else
nHandle := FCreate( cLogFile2, FC_NORMAL )
nHandle2 := FOpen( cLogFile, FO_READ )
Endif
Endif
IF nHandle < 3
ELSE
FWriteLine( nHandle, PadC( " xHarbour Error Log " , 79, "-" ) )
FWriteLine( nHandle, "" )
If nHandle < 3 .and. !( lower( cLogFile ) == "error.log" )
// Force creating error.log in case supplied log file cannot
// be created for any reason
cLogFile := "error.log"
nHandle := FCreate( cLogFile, FC_NORMAL )
Endif
FWriteLine( nHandle, "Date...............: " + DToC( Date() ) )
FWriteLine( nHandle, "Time...............: " + Time() )
If nHandle < 3
Else
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "Application name...: " + hb_cmdargargv() )
FWriteLine( nHandle, "Workstation name...: " + NetName() )
FWriteLine( nHandle, "Available memory...: " + strvalue( Memory(0 ) ) )
FWriteLine( nHandle, "Current disk.......: " + DiskName() )
FWriteLine( nHandle, "Current directory..: " + CurDir() )
FWriteLine( nHandle, "Free disk space....: " + strvalue( DiskSpace() ) )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "Operating system...: " + OS() )
FWriteLine( nHandle, "xHarbour version...: " + Version() )
FWriteLine( nHandle, "xHarbour built on..: " + hb_BuildDate() )
FWriteLine( nHandle, "C/C++ compiler.....: " + hb_Compiler() )
FWriteLine( nHandle, Padc( " xHarbour Error Log " , 79, "-" ) )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "Multi Threading....: " + iif( hb_mtvm(), "YES", "NO" ) )
FWriteLine( nHandle, "VM Optimization....: " + strvalue( Hb_VmMode() ) )
FWriteLine( nHandle, "Date...............: " + dtoc( date() ) )
FWriteLine( nHandle, "Time...............: " + time() )
IF hb_IsFunction( "Select" )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "Current Area ......:" + strvalue( &("Select()" ) ) )
ENDIF
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "Application name...: " + hb_cmdargargv() )
FWriteLine( nHandle, "Workstation name...: " + netname() )
FWriteLine( nHandle, "Available memory...: " + strvalue( Memory(0) ) )
FWriteLine( nHandle, "Current disk.......: " + diskname() )
FWriteLine( nHandle, "Current directory..: " + curdir() )
FWriteLine( nHandle, "Free disk space....: " + strvalue( DiskSpace() ) )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "Operating system...: " + os() )
FWriteLine( nHandle, "xHarbour version...: " + version() )
FWriteLine( nHandle, "xHarbour built on..: " + hb_builddate() )
FWriteLine( nHandle, "C/C++ compiler.....: " + hb_compiler() )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, PadC( " Environmental Information ", 79, "-" ) )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "Multi Threading....: " + iif( hb_mtvm(),"YES","NO" ) )
FWriteLine( nHandle, "VM Optimization....: " + strvalue( Hb_VmMode() ) )
IF hb_IsFunction( "Select" )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "Current Area ......:" + strvalue( &("Select()") ) )
ENDIF
FWriteLine( nHandle, "" )
FWriteLine( nHandle, Padc( " Environmental Information ", 79, "-" ) )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "SET ALTERNATE......: " + strvalue( Set( _SET_ALTERNATE ), .T. ) )
FWriteLine( nHandle, "SET ALTFILE........: " + strvalue( Set( _SET_ALTFILE ) ) )
FWriteLine( nHandle, "SET AUTOPEN........: " + strvalue( Set( _SET_AUTOPEN ), .T. ) )
FWriteLine( nHandle, "SET AUTORDER.......: " + strvalue( Set( _SET_AUTORDER ) ) )
FWriteLine( nHandle, "SET AUTOSHARE......: " + strvalue( Set( _SET_AUTOSHARE ) ) )
FWriteLine( nHandle, "SET ALTERNATE......: " + strvalue( Set( _SET_ALTERNATE ), .T. ) )
FWriteLine( nHandle, "SET ALTFILE........: " + strvalue( Set( _SET_ALTFILE ) ) )
FWriteLine( nHandle, "SET AUTOPEN........: " + strvalue( Set( _SET_AUTOPEN ), .T. ) )
FWriteLine( nHandle, "SET AUTORDER.......: " + strvalue( Set( _SET_AUTORDER ) ) )
FWriteLine( nHandle, "SET AUTOSHARE......: " + strvalue( Set( _SET_AUTOSHARE ) ) )
#ifdef __XHARBOUR__
FWriteLine( nHandle, "SET BACKGROUNDTASKS: " + strvalue( Set( _SET_BACKGROUNDTASKS ), .T. ) )
FWriteLine( nHandle, "SET BACKGROUNDTICK.: " + strvalue( Set( _SET_BACKGROUNDTICK ), .T. ) )
FWriteLine( nHandle, "SET BACKGROUNDTASKS: " + strvalue( Set( _SET_BACKGROUNDTASKS ), .T. ) )
FWriteLine( nHandle, "SET BACKGROUNDTICK.: " + strvalue( Set( _SET_BACKGROUNDTICK ), .T. ) )
#endif
FWriteLine( nHandle, "SET BELL...........: " + strvalue( Set( _SET_BELL ), .T. ) )
FWriteLine( nHandle, "SET BLINK..........: " + strvalue( SetBlink() ) )
FWriteLine( nHandle, "SET BELL...........: " + strvalue( Set( _SET_BELL ), .T. ) )
FWriteLine( nHandle, "SET BLINK..........: " + strvalue( SetBlink() ) )
FWriteLine( nHandle, "SET CANCEL.........: " + strvalue( Set( _SET_CANCEL ), .T. ) )
FWriteLine( nHandle, "SET CENTURY........: " + strvalue( __SetCentury(), .T. ) )
FWriteLine( nHandle, "SET COLOR..........: " + strvalue( Set( _SET_COLOR ) ) )
FWriteLine( nHandle, "SET CONFIRM........: " + strvalue( Set( _SET_CONFIRM ), .T. ) )
FWriteLine( nHandle, "SET CONSOLE........: " + strvalue( Set( _SET_CONSOLE ), .T. ) )
FWriteLine( nHandle, "SET COUNT..........: " + strvalue( Set( _SET_COUNT ) ) )
FWriteLine( nHandle, "SET CURSOR.........: " + strvalue( Set( _SET_CURSOR ) ) )
FWriteLine( nHandle, "SET CANCEL.........: " + strvalue( Set( _SET_CANCEL ), .T. ) )
FWriteLine( nHandle, "SET CENTURY........: " + strvalue( __SetCentury(), .T. ) )
FWriteLine( nHandle, "SET COLOR..........: " + strvalue( Set( _SET_COLOR ) ) )
FWriteLine( nHandle, "SET CONFIRM........: " + strvalue( Set( _SET_CONFIRM ), .T. ) )
FWriteLine( nHandle, "SET CONSOLE........: " + strvalue( Set( _SET_CONSOLE ), .T. ) )
FWriteLine( nHandle, "SET COUNT..........: " + strvalue( Set( _SET_COUNT ) ) )
FWriteLine( nHandle, "SET CURSOR.........: " + strvalue( Set( _SET_CURSOR ) ) )
FWriteLine( nHandle, "SET DATE FORMAT....: " + strvalue( Set( _SET_DATEFORMAT ) ) )
FWriteLine( nHandle, "SET DBFLOCKSCHEME..: " + strvalue( Set( _SET_DBFLOCKSCHEME ) ) )
FWriteLine( nHandle, "SET DEBUG..........: " + strvalue( Set( _SET_DEBUG ), .T. ) )
FWriteLine( nHandle, "SET DECIMALS.......: " + strvalue( Set( _SET_DECIMALS ) ) )
FWriteLine( nHandle, "SET DEFAULT........: " + strvalue( Set( _SET_DEFAULT ) ) )
FWriteLine( nHandle, "SET DEFEXTENSIONS..: " + strvalue( Set( _SET_DEFEXTENSIONS ), .T. ) )
FWriteLine( nHandle, "SET DELETED........: " + strvalue( Set( _SET_DELETED ), .T. ) )
FWriteLine( nHandle, "SET DELIMCHARS.....: " + strvalue( Set( _SET_DELIMCHARS ) ) )
FWriteLine( nHandle, "SET DELIMETERS.....: " + strvalue( Set( _SET_DELIMITERS ), .T. ) )
FWriteLine( nHandle, "SET DEVICE.........: " + strvalue( Set( _SET_DEVICE ) ) )
FWriteLine( nHandle, "SET DIRCASE........: " + strvalue( Set( _SET_DIRCASE ) ) )
FWriteLine( nHandle, "SET DIRSEPARATOR...: " + strvalue( Set( _SET_DIRSEPARATOR ) ) )
FWriteLine( nHandle, "SET DATE FORMAT....: " + strvalue( Set( _SET_DATEFORMAT ) ) )
FWriteLine( nHandle, "SET DBFLOCKSCHEME..: " + strvalue( Set( _SET_DBFLOCKSCHEME ) ) )
FWriteLine( nHandle, "SET DEBUG..........: " + strvalue( Set( _SET_DEBUG ), .T. ) )
FWriteLine( nHandle, "SET DECIMALS.......: " + strvalue( Set( _SET_DECIMALS ) ) )
FWriteLine( nHandle, "SET DEFAULT........: " + strvalue( Set( _SET_DEFAULT ) ) )
FWriteLine( nHandle, "SET DEFEXTENSIONS..: " + strvalue( Set( _SET_DEFEXTENSIONS ), .T. ) )
FWriteLine( nHandle, "SET DELETED........: " + strvalue( Set( _SET_DELETED ), .T. ) )
FWriteLine( nHandle, "SET DELIMCHARS.....: " + strvalue( Set( _SET_DELIMCHARS ) ) )
FWriteLine( nHandle, "SET DELIMETERS.....: " + strvalue( Set( _SET_DELIMITERS ), .T. ) )
FWriteLine( nHandle, "SET DEVICE.........: " + strvalue( Set( _SET_DEVICE ) ) )
FWriteLine( nHandle, "SET DIRCASE........: " + strvalue( Set( _SET_DIRCASE ) ) )
FWriteLine( nHandle, "SET DIRSEPARATOR...: " + strvalue( Set( _SET_DIRSEPARATOR ) ) )
FWriteLine( nHandle, "SET EOL............: " + strvalue( Asc( Set( _SET_EOL ) ) ) )
FWriteLine( nHandle, "SET EPOCH..........: " + strvalue( Set( _SET_EPOCH ) ) )
FWriteLine( nHandle, "SET ERRORLOG.......: " + strvalue( cLogFile ) + "," + strvalue( lAppendLog ) )
FWriteLine( nHandle, "SET EOL............: " + strvalue( Asc( Set( _SET_EOL ) ) ) )
FWriteLine( nHandle, "SET EPOCH..........: " + strvalue( Set( _SET_EPOCH ) ) )
FWriteLine( nHandle, "SET ERRORLOG.......: " + strvalue( cLogFile ) + "," + strvalue( lAppendLog ) )
#ifdef __XHARBOUR__
FWriteLine( nHandle, "SET ERRORLOOP......: " + strvalue( Set( _SET_ERRORLOOP ) ) )
FWriteLine( nHandle, "SET ERRORLOOP......: " + strvalue( Set( _SET_ERRORLOOP ) ) )
#endif
FWriteLine( nHandle, "SET ESCAPE.........: " + strvalue( Set( _SET_ESCAPE ), .T. ) )
FWriteLine( nHandle, "SET EVENTMASK......: " + strvalue( Set( _SET_EVENTMASK ) ) )
FWriteLine( nHandle, "SET EXACT..........: " + strvalue( Set( _SET_EXACT ), .T. ) )
FWriteLine( nHandle, "SET EXCLUSIVE......: " + strvalue( Set( _SET_EXCLUSIVE ), .T. ) )
FWriteLine( nHandle, "SET EXIT...........: " + strvalue( Set( _SET_EXIT ), .T. ) )
FWriteLine( nHandle, "SET EXTRA..........: " + strvalue( Set( _SET_EXTRA ), .T. ) )
FWriteLine( nHandle, "SET EXTRAFILE......: " + strvalue( Set( _SET_EXTRAFILE ) ) )
FWriteLine( nHandle, "SET ESCAPE.........: " + strvalue( Set( _SET_ESCAPE ), .T. ) )
FWriteLine( nHandle, "SET EVENTMASK......: " + strvalue( Set( _SET_EVENTMASK ) ) )
FWriteLine( nHandle, "SET EXACT..........: " + strvalue( Set( _SET_EXACT ), .T. ) )
FWriteLine( nHandle, "SET EXCLUSIVE......: " + strvalue( Set( _SET_EXCLUSIVE ), .T. ) )
FWriteLine( nHandle, "SET EXIT...........: " + strvalue( Set( _SET_EXIT ), .T. ) )
FWriteLine( nHandle, "SET EXTRA..........: " + strvalue( Set( _SET_EXTRA ), .T. ) )
FWriteLine( nHandle, "SET EXTRAFILE......: " + strvalue( Set( _SET_EXTRAFILE ) ) )
FWriteLine( nHandle, "SET FILECASE.......: " + strvalue( Set( _SET_FILECASE ) ) )
FWriteLine( nHandle, "SET FIXED..........: " + strvalue( Set( _SET_FIXED ), .T. ) )
FWriteLine( nHandle, "SET FORCEOPT.......: " + strvalue( Set( _SET_FORCEOPT ), .T. ) )
FWriteLine( nHandle, "SET FILECASE.......: " + strvalue( Set( _SET_FILECASE ) ) )
FWriteLine( nHandle, "SET FIXED..........: " + strvalue( Set( _SET_FIXED ), .T. ) )
FWriteLine( nHandle, "SET FORCEOPT.......: " + strvalue( Set( _SET_FORCEOPT ), .T. ) )
FWriteLine( nHandle, "SET HARDCOMMIT.....: " + strvalue( Set( _SET_HARDCOMMIT ), .T. ) )
FWriteLine( nHandle, "SET HARDCOMMIT.....: " + strvalue( Set( _SET_HARDCOMMIT ), .T. ) )
FWriteLine( nHandle, "SET IDLEREPEAT.....: " + strvalue( Set( _SET_IDLEREPEAT ), .T. ) )
FWriteLine( nHandle, "SET INSERT.........: " + strvalue( Set( _SET_INSERT ), .T. ) )
FWriteLine( nHandle, "SET INTENSITY......: " + strvalue( Set( _SET_INTENSITY ), .T. ) )
FWriteLine( nHandle, "SET IDLEREPEAT.....: " + strvalue( Set( _SET_IDLEREPEAT ), .T. ) )
FWriteLine( nHandle, "SET INSERT.........: " + strvalue( Set( _SET_INSERT ), .T. ) )
FWriteLine( nHandle, "SET INTENSITY......: " + strvalue( Set( _SET_INTENSITY ), .T. ) )
FWriteLine( nHandle, "SET LANGUAGE.......: " + strvalue( Set( _SET_LANGUAGE ) ) )
FWriteLine( nHandle, "SET LANGUAGE.......: " + strvalue( Set( _SET_LANGUAGE ) ) )
FWriteLine( nHandle, "SET MARGIN.........: " + strvalue( Set( _SET_MARGIN ) ) )
FWriteLine( nHandle, "SET MBLOCKSIZE.....: " + strvalue( Set( _SET_MBLOCKSIZE ) ) )
FWriteLine( nHandle, "SET MCENTER........: " + strvalue( Set( _SET_MCENTER ), .T. ) )
FWriteLine( nHandle, "SET MESSAGE........: " + strvalue( Set( _SET_MESSAGE ) ) )
FWriteLine( nHandle, "SET MFILEEXT.......: " + strvalue( Set( _SET_MFILEEXT ) ) )
FWriteLine( nHandle, "SET MARGIN.........: " + strvalue( Set( _SET_MARGIN ) ) )
FWriteLine( nHandle, "SET MBLOCKSIZE.....: " + strvalue( Set( _SET_MBLOCKSIZE ) ) )
FWriteLine( nHandle, "SET MCENTER........: " + strvalue( Set( _SET_MCENTER ), .T. ) )
FWriteLine( nHandle, "SET MESSAGE........: " + strvalue( Set( _SET_MESSAGE ) ) )
FWriteLine( nHandle, "SET MFILEEXT.......: " + strvalue( Set( _SET_MFILEEXT ) ) )
FWriteLine( nHandle, "SET OPTIMIZE.......: " + strvalue( Set( _SET_OPTIMIZE ), .T. ) )
FWriteLine( nHandle, "SET OPTIMIZE.......: " + strvalue( Set( _SET_OPTIMIZE ), .T. ) )
#ifdef __XHARBOUR__
FWriteLine( nHandle, "SET OUTPUTSAFETY...: " + strvalue( Set( _SET_OUTPUTSAFETY ), .T. ) )
FWriteLine( nHandle, "SET OUTPUTSAFETY...: " + strvalue( Set( _SET_OUTPUTSAFETY ), .T. ) )
#endif
FWriteLine( nHandle, "SET PATH...........: " + strvalue( Set( _SET_PATH ) ) )
FWriteLine( nHandle, "SET PRINTER........: " + strvalue( Set( _SET_PRINTER ), .T. ) )
FWriteLine( nHandle, "SET PATH...........: " + strvalue( Set( _SET_PATH ) ) )
FWriteLine( nHandle, "SET PRINTER........: " + strvalue( Set( _SET_PRINTER ), .T. ) )
#ifdef __XHARBOUR__
FWriteLine( nHandle, "SET PRINTERJOB.....: " + strvalue( Set( _SET_PRINTERJOB ) ) )
FWriteLine( nHandle, "SET PRINTERJOB.....: " + strvalue( Set( _SET_PRINTERJOB ) ) )
#endif
FWriteLine( nHandle, "SET PRINTFILE......: " + strvalue( Set( _SET_PRINTFILE ) ) )
FWriteLine( nHandle, "SET PRINTFILE......: " + strvalue( Set( _SET_PRINTFILE ) ) )
FWriteLine( nHandle, "SET SCOREBOARD.....: " + strvalue( Set( _SET_SCOREBOARD ), .T. ) )
FWriteLine( nHandle, "SET SCROLLBREAK....: " + strvalue( Set( _SET_SCROLLBREAK ), .T. ) )
FWriteLine( nHandle, "SET SOFTSEEK.......: " + strvalue( Set( _SET_SOFTSEEK ), .T. ) )
FWriteLine( nHandle, "SET STRICTREAD.....: " + strvalue( Set( _SET_STRICTREAD ), .T. ) )
FWriteLine( nHandle, "SET SCOREBOARD.....: " + strvalue( Set( _SET_SCOREBOARD ), .T. ) )
FWriteLine( nHandle, "SET SCROLLBREAK....: " + strvalue( Set( _SET_SCROLLBREAK ), .T. ) )
FWriteLine( nHandle, "SET SOFTSEEK.......: " + strvalue( Set( _SET_SOFTSEEK ), .T. ) )
FWriteLine( nHandle, "SET STRICTREAD.....: " + strvalue( Set( _SET_STRICTREAD ), .T. ) )
#ifdef __XHARBOUR__
FWriteLine( nHandle, "SET TRACE..........: " + strvalue( Set( _SET_TRACE ), .T. ) )
FWriteLine( nHandle, "SET TRACEFILE......: " + strvalue( Set( _SET_TRACEFILE ) ) )
FWriteLine( nHandle, "SET TRACESTACK.....: " + strvalue( Set( _SET_TRACESTACK ) ) )
FWriteLine( nHandle, "SET TRACE..........: " + strvalue( Set( _SET_TRACE ), .T. ) )
FWriteLine( nHandle, "SET TRACEFILE......: " + strvalue( Set( _SET_TRACEFILE ) ) )
FWriteLine( nHandle, "SET TRACESTACK.....: " + strvalue( Set( _SET_TRACESTACK ) ) )
#endif
FWriteLine( nHandle, "SET TRIMFILENAME...: " + strvalue( Set( _SET_TRIMFILENAME ) ) )
FWriteLine( nHandle, "SET TRIMFILENAME...: " + strvalue( Set( _SET_TRIMFILENAME ) ) )
FWriteLine( nHandle, "SET TYPEAHEAD......: " + strvalue( Set( _SET_TYPEAHEAD ) ) )
FWriteLine( nHandle, "SET TYPEAHEAD......: " + strvalue( Set( _SET_TYPEAHEAD ) ) )
FWriteLine( nHandle, "SET UNIQUE.........: " + strvalue( Set( _SET_UNIQUE ), .T. ) )
FWriteLine( nHandle, "SET UNIQUE.........: " + strvalue( Set( _SET_UNIQUE ), .T. ) )
FWriteLine( nHandle, "SET VIDEOMODE......: " + strvalue( Set( _SET_VIDEOMODE ) ) )
FWriteLine( nHandle, "SET VIDEOMODE......: " + strvalue( Set( _SET_VIDEOMODE ) ) )
FWriteLine( nHandle, "SET WRAP...........: " + strvalue( Set( _SET_WRAP ), .T. ) )
FWriteLine( nHandle, "SET WRAP...........: " + strvalue( Set( _SET_WRAP ), .T. ) )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "" )
IF nCols > 0
FWriteLine( nHandle, Padc( "Detailed Work Area Items", nCols, "-" ) )
ELSE
FWriteLine( nHandle, "Detailed Work Area Items " )
ENDIF
FWriteLine( nHandle, "" )
IF nCols > 0
FWriteLine( nHandle, PadC( "Detailed Work Area Items", nCols, "-" ) )
ELSE
FWriteLine( nHandle, "Detailed Work Area Items " )
ENDIF
FWriteLine( nHandle, "" )
HB_WAEval( {||
IF hb_IsFunction( "Select" )
FWriteLine( nHandle, "Work Area No ......: " + strvalue( &("Select()") ) )
ENDIF
IF hb_IsFunction( "Alias" )
FWriteLine( nHandle, "Alias .............: " + &("Alias()") )
ENDIF
IF hb_IsFunction( "RecNo" )
FWriteLine( nHandle, "Current Recno .....: " + strvalue( &("RecNo()") ) )
ENDIF
IF hb_IsFunction( "DbFilter" )
FWriteLine( nHandle, "Current Filter ....: " + &("DbFilter()") )
ENDIF
IF hb_IsFunction( "DbRelation" )
FWriteLine( nHandle, "Relation Exp. .....: " + &("DbRelation()") )
ENDIF
IF hb_IsFunction( "IndexOrd" )
FWriteLine( nHandle, "Index Order .......: " + strvalue( &("IndexOrd(0)") ) )
ENDIF
IF hb_IsFunction( "IndexKey" )
FWriteLine( nHandle, "Active Key ........: " + strvalue( &("IndexKey(0)") ) )
ENDIF
FWriteLine( nHandle, "" )
Return .T.
} )
FWriteLine( nHandle, "" )
IF nCols > 0
FWriteLine( nHandle, Padc( " Internal Error Handling Information ", nCols, "-" ) )
ELSE
FWriteLine( nHandle, " Internal Error Handling Information " )
ENDIF
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "Subsystem Call ....: " + oErr:subsystem() )
FWriteLine( nHandle, "System Code .......: " + strvalue( oErr:suBcode() ) )
FWriteLine( nHandle, "Default Status ....: " + strvalue( oerr:candefault() ) )
FWriteLine( nHandle, "Description .......: " + oErr:description() )
FWriteLine( nHandle, "Operation .........: " + oErr:operation() )
FWriteLine( nHandle, "Arguments .........: " + Arguments( oErr ) )
FWriteLine( nHandle, "Involved File .....: " + oErr:filename() )
FWriteLine( nHandle, "Dos Error Code ....: " + strvalue( oErr:oscode() ) )
hb_WAeval( {||
IF hb_IsFunction( "Select" )
FWriteLine( nHandle, "Work Area No ......: " + strvalue( &("Select()" ) ) )
ENDIF
IF hb_IsFunction( "Alias" )
FWriteLine( nHandle, "Alias .............: " + &( "Alias()" ) )
ENDIF
IF hb_IsFunction( "RecNo" )
FWriteLine( nHandle, "Current Recno .....: " + strvalue( &("RecNo()" ) ) )
ENDIF
IF hb_IsFunction( "DbFilter" )
FWriteLine( nHandle, "Current Filter ....: " + &( "DbFilter()" ) )
ENDIF
IF hb_IsFunction( "DbRelation" )
FWriteLine( nHandle, "Relation Exp. .....: " + &( "DbRelation()" ) )
ENDIF
IF hb_IsFunction( "IndexOrd" )
FWriteLine( nHandle, "Index Order .......: " + strvalue( &("IndexOrd(0)" ) ) )
ENDIF
IF hb_IsFunction( "IndexKey" )
FWriteLine( nHandle, "Active Key ........: " + strvalue( &("IndexKey(0)" ) ) )
ENDIF
FWriteLine( nHandle, "" )
RETURN .T.
} )
FWriteLine( nHandle, "" )
IF nCols > 0
FWriteLine( nHandle, PadC( " Internal Error Handling Information ", nCols, "-" ) )
ELSE
FWriteLine( nHandle, " Internal Error Handling Information " )
ENDIF
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "Subsystem Call ....: " + oErr:subsystem() )
FWriteLine( nHandle, "System Code .......: " + strvalue( oErr:suBcode() ) )
FWriteLine( nHandle, "Default Status ....: " + strvalue( oerr:candefault() ) )
FWriteLine( nHandle, "Description .......: " + oErr:description() )
FWriteLine( nHandle, "Operation .........: " + oErr:operation() )
FWriteLine( nHandle, "Arguments .........: " + Arguments( oErr ) )
FWriteLine( nHandle, "Involved File .....: " + oErr:filename() )
FWriteLine( nHandle, "Dos Error Code ....: " + strvalue( oErr:oscode() ) )
#ifdef __XHARBOUR__
#ifdef HB_THREAD_SUPPORT
FWriteLine( nHandle, "Running threads ...: " + strvalue( oErr:RunningThreads() ) )
FWriteLine( nHandle, "VM thread ID ......: " + strvalue( oErr:VmThreadId() ) )
FWriteLine( nHandle, "OS thread ID ......: " + strvalue( oErr:OsThreadId() ) )
#endif
#ifdef HB_THREAD_SUPPORT
FWriteLine( nHandle, "Running threads ...: " + strvalue( oErr:RunningThreads() ) )
FWriteLine( nHandle, "VM thread ID ......: " + strvalue( oErr:VmThreadId() ) )
FWriteLine( nHandle, "OS thread ID ......: " + strvalue( oErr:OsThreadId() ) )
#endif
#endif
FWriteLine( nHandle, "" )
FWriteLine( nHandle, " Trace Through:" )
FWriteLine( nHandle, "----------------" )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, " Trace Through:" )
FWriteLine( nHandle, "----------------" )
FWriteLine( nHandle, Padr( ProcName(), 21 ) + " : " + Transform( ProcLine(), "999,999" ) + " in Module: " + ProcFile() )
FWriteLine( nHandle, PadR( ProcName(), 21 ) + " : " + Transform( ProcLine(), "999,999" ) + " in Module: " + ProcFile() )
nCount := 3
While !Empty( Procname( ++ nCount ) )
FWriteLine( nHandle, Padr( Procname( nCount ), 21 ) + " : " + Transform( Procline( nCount ), "999,999" ) + " in Module: " + ProcFile( nCount ) )
Enddo
nCount := 3
WHILE !Empty( ProcName( ++ nCount ) )
FWriteLine( nHandle, PadR( ProcName( nCount ), 21 ) + " : " + Transform( ProcLine( nCount ), "999,999" ) + " in Module: " + ProcFile( nCount ) )
ENDDO
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "" )
IF HB_ISSTRING( cScreen )
FWriteLine( nHandle, Padc( " Video Screen Dump ", nCols, "#" ) )
FWriteLine( nHandle, "" )
//FWriteLine( nHandle, "" )
FWriteLine( nHandle, "+" + Replicate( "-", nCols + 1 ) + "+" )
//FWriteLine( nHandle, "" )
nCellSize := len( Savescreen( 0, 0, 0, 0 ) )
nRange := ( nCols + 1 ) * nCellSize
For nCount := 1 To nRows + 1
cOutString := ""
cSubString := Substr( cScreen, nStart, nRange )
For nForLoop := 1 To nRange step nCellSize
cOutString += Substr( cSubString, nForLoop, 1 )
Next
FWriteLine( nHandle, "|" + cOutString + "|" )
nStart += nRange
Next
FWriteLine( nHandle, "+" + Replicate( "-", nCols + 1 ) + "+" )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "" )
ELSE
FWriteLine( nHandle, " Video Screen Dump not available" )
ENDIF
IF HB_ISSTRING( cScreen )
FWriteLine( nHandle, PadC( " Video Screen Dump ", nCols, "#" ) )
FWriteLine( nHandle, "" )
//FWriteLine( nHandle, "" )
FWriteLine( nHandle, "+" + Replicate( "-", nCols + 1 ) + "+" )
//FWriteLine( nHandle, "" )
nCellSize := Len( SaveScreen( 0, 0, 0, 0 ) )
nRange := ( nCols + 1 ) * nCellSize
FOR nCount := 1 TO nRows + 1
cOutString := ""
cSubString := SubStr( cScreen, nStart, nRange )
FOR nForLoop := 1 TO nRange STEP nCellSize
cOutString += SubStr( cSubString, nForLoop, 1 )
NEXT
FWriteLine( nHandle, "|" + cOutString + "|" )
nStart += nRange
NEXT
FWriteLine( nHandle, "+" + Replicate( "-", nCols + 1 ) + "+" )
FWriteLine( nHandle, "" )
FWriteLine( nHandle, "" )
ELSE
FWriteLine( nHandle, " Video Screen Dump not available" )
ENDIF
#if 0
FWriteLine( nHandle, PadC( " Available Memory Variables ", nCols, "+" ) )
FWriteLine( nHandle, "" )
SAVE ALL Like * TO errormem
nMemHandle := FOpen( "errormem.mem", FO_READWRITE )
nMemLength := FSeek( nMemHandle, 0, FS_END )
FSeek( nMemHandle, 0 )
nCount := 1
WHILE FSeek( nMemHandle, 0, 1 ) + 1 < nMemLength
nMemWidth := Space( 18 )
FRead( nMemHandle, @nMemWidth, 18 )
cVarName := Left( nMemWidth, At( Chr( 0 ), nMemWidth ) - 1 )
cVarType := SubStr( nMemWidth, 12, 1 )
cVarRec := Bin2W( Right( nMemWidth, 2 ) )
nMemCount := iif( cVarType $ Chr( 195 ) + Chr( 204 ), 14 + cVarRec, 22 )
FSeek( nMemHandle, nMemCount, FS_RELATIVE )
cTemp := Left( cVarName + Space( 10 ), 10 )
cTemp += " TYPE " + Type( cVarName )
cTemp += " " + iif( Type( cVarName ) == "C", '"' + &cVarName + '"', strvalue( &cVarName ) )
nBytes := 0
Switch ValType( cVarName )
CASE "C"
nBytes += ( nLenTemp := Len( &cVarName ) )
EXIT
CASE "N"
nBytes += ( nLenTemp := 9 )
EXIT
CASE "L"
nBytes += ( nLenTemp := 2 )
EXIT
CASE "D"
nBytes += ( nLenTemp := 9 )
EXIT
End
FWrite( nFhandle, " " + Transform( nLenTemp, "999999" ) + "bytes -> " )
FWriteLine( nHandle, " " + cTemp )
ENDDO
FClose( nMemHandle )
FErase( "errormem.mem" )
#endif
/*
* FWriteLine( nHandle, padc(" Available Memory Variables ",nCols,"+") )
* FWriteLine( nHandle, "" )
* Save All Like * To errormem
* nMemHandle := Fopen( "errormem.mem", FO_READWRITE )
* nMemLength := Fseek( nMemHandle, 0, 2 )
* Fseek( nMemHandle, 0 )
* nCount := 1
* While Fseek( nMemHandle, 0, 1 ) + 1 < nMemLength
* nMemWidth := Space( 18 )
* Fread( nMemHandle, @nMemWidth, 18 )
* cVarName := Left( nMemWidth, At( Chr( 0 ), nMemWidth ) - 1 )
* cVarType := Substr( nMemWidth, 12, 1 )
* cVarRec := Bin2w( Right( nMemWidth, 2 ) )
* nMemCount := iif( cVarType IN Chr( 195 ) + Chr( 204 ), 14 + cVarRec, 22 )
* Fseek( nMemHandle, nMemCount, 1 )
* cTemp := Left( cVarName + Space( 10 ), 10 )
* cTemp += " TYPE " + Type( cVarName )
* cTemp += " " + iif( Type( cVarName ) == "C", '"' + &cVarName + '"', strvalue( &cVarName ) )
* nBytes := 0
* Switch ValType( cVarName )
* Case "C"
* nBytes += ( nLenTemp := Len( &cVarName ) )
* exit
* Case "N"
* nBytes += ( nLenTemp := 9 )
* exit
* Case "L"
* nBytes += ( nLenTemp := 2 )
* exit
* Case "D"
* nBytes += ( nLenTemp := 9 )
* exit
* End
* Fwrite( nFhandle, " " + Transform( nLenTemp, "999999" ) + "bytes -> " )
* FWriteLine( nHandle, " " + cTemp )
* Enddo
* Fclose( nMemHandle )
* Ferase( "errormem.mem" )
*/
if lAppendLog .and. nHandle2 != -1
IF lAppendLog .AND. nHandle2 != - 1
nBytes := FSeek( nHandle2, 0, FS_END )
nBytes := FSeek( nHandle2, 0, FS_END )
cBuff := Space( 10 )
FSeek( nHandle2, 0, FS_SET )
cBuff := Space( 10 )
FSeek( nHandle2, 0, FS_SET )
while nBytes > 0
nRead := FRead( nHandle2, @cBuff, hb_BLen( cBuff ) )
FWrite( nHandle, cBuff, nRead )
nBytes -= nRead
cBuff := Space( 10 )
enddo
WHILE nBytes > 0
nRead := FRead( nHandle2, @cBuff, hb_BLen( cBuff ) )
FWrite( nHandle, cBuff, nRead )
nBytes -= nRead
cBuff := Space( 10 )
ENDDO
FClose( nHandle2 )
FClose( nHandle )
FClose( nHandle2 )
FClose( nHandle )
FErase( cLogFile )
FRename( cLogFile2, cLogFile )
else
FClose( nHandle )
endif
FErase( cLogFile )
FRename( cLogFile2, cLogFile )
ELSE
FClose( nHandle )
ENDIF
endif
ENDIF
Return .f.
RETURN .F.
STATIC FUNCTION strvalue( c, l )
@@ -638,29 +644,30 @@ STATIC FUNCTION strvalue( c, l )
SWITCH ValType( c )
CASE "C"
cr := c
EXIT
cr := c
EXIT
CASE "N"
cr := hb_ntos( c )
EXIT
cr := hb_ntos( c )
EXIT
CASE "M"
cr := c
EXIT
cr := c
EXIT
CASE "D"
cr := DToC( c )
EXIT
cr := DToC( c )
EXIT
CASE "L"
// cr := iif( l, iif( c, "On", "Off" ), iif( c, "True", "False" ) )
cr := iif( l, iif( c, "On", "Off" ), iif( c, ".t.", ".f." ) )
EXIT
// cr := iif( l, iif( c, "On", "Off" ), iif( c, "True", "False" ) )
cr := iif( l, iif( c, "On", "Off" ), iif( c, ".t.", ".f." ) )
EXIT
ENDSWITCH
RETURN Upper( cr )
STATIC PROCEDURE FWriteLine( nh, c )
Fwrite( nh, c + hb_eol() )
//HB_OutDebug( c + hb_eol() )
FWrite( nh, c + hb_eol() )
// HB_OutDebug( c + hb_eol() )
RETURN
STATIC FUNCTION Arguments( oErr )
@@ -680,9 +687,11 @@ STATIC FUNCTION Arguments( oErr )
RETURN cArguments
FUNCTION __BreakBlock()
RETURN {| e | Break( e ) }
FUNCTION __ErrorBlock( )
RETURN {| e | __MinimalErrorHandler( e ) }
PROCEDURE __MinimalErrorHandler( oError )
@@ -719,8 +728,8 @@ PROCEDURE __MinimalErrorHandler( oError )
RETURN
FUNCTION xhb_ErrorNew( cSubSystem, nGenCode, nSubCode, ;
cOperation, cDescription, aArgs, ;
cModuleName, cProcName, nProcLine )
cOperation, cDescription, aArgs, ;
cModuleName, cProcName, nProcLine )
LOCAL oError := ErrorNew()
LOCAL aStack, n

View File

@@ -134,7 +134,7 @@
DATA nTabWidth INIT 5 // Size of Tab chars
DATA lEditAllow INIT .T. // Are changes to text allowed?
DATA lSaved INIT .F. // True if user exited editor with K_CTRL_W
DATA lWordWrap INIT .T. // .f. earlier, True if word wrapping is active
DATA lWordWrap INIT .T. // .F. earlier, True if word wrapping is active
DATA nWordWrapCol INIT 0 // At which column word wrapping occurs
DATA lChanged INIT .F. // .T. if there are changes not saved
DATA lExitEdit INIT .F. // .T. if user requested to end Edit() method
@@ -361,7 +361,7 @@ METHOD New( cString, nTop, nLeft, nBottom, nRight, lEditMode, nLineLength, nTabS
// Load text to internal array.
// TODO: if at ME_INIT mode (when udf is called), the ::lWordWrap is toggled
// to .F. (default is .t.), the <cString> should not be splitted, but
// to .F. (default is .T.), the <cString> should not be splitted, but
// in the Text2Array function the <cString> will be splitted in
// accordance with nLineLength.
//

View File

@@ -168,8 +168,8 @@
*
* _SET_DEBUG <lStatus>
*
* When set to .t., pressing Alt+D activates the debugger.
* When set to .f., which is the default, Alt+D can be read
* When set to .T., pressing Alt+D activates the debugger.
* When set to .F., which is the default, Alt+D can be read
* by INKEY(). (Also affected by AltD(1) and AltD(0))
*
* _SET_DECIMALS <nNumberOfDecimals>

View File

@@ -36,7 +36,7 @@ local ch,ncursor
setcolor("N/W")
WVW_SetTitle(NIL,"Quick Survey")
WVW_NoClose(NIL)
WVW_SetAltF4Close(.f.)
WVW_SetAltF4Close(.F.)
WVW_SetLineSpacing(NIL,4)
//WVW_SetLSpaceColor(NIL,7)
WVW_cbSetFont(NIL, "Arial", 16)
@@ -89,8 +89,8 @@ local ch,ncursor
endcase
enddo
wvw_cbEnable(NIL, nCBid, .f.)
wvw_pbEnable(NIL, nPBid, .f.)
wvw_cbEnable(NIL, nCBid, .F.)
wvw_pbEnable(NIL, nPBid, .F.)
@ 6,1 say "Your response is:"
@ 7,1 say wvw_cbGetCurText(NIL, nCBid)
@ 9,1 say s_cThankYou
@@ -105,17 +105,17 @@ static function CBhandler(nWinNum,nId,nEvent,nIndex, nPBid)
case nEvent==4 //CBN_KILLFOCUS
* none
if nIndex==0
wvw_pbEnable(nWinNum, nPBid, .t.)
wvw_pbEnable(nWinNum, nPBid, .T.)
else
wvw_pbEnable(nWinNum, nPBid, .f.)
wvw_pbEnable(nWinNum, nPBid, .F.)
endif
case nEvent==1 //CBN_SELCHANGE
if !wvw_cbIsDropped(nWinNum, nId)
* nIndex is 0-based
if nIndex==0
wvw_pbEnable(nWinNum, nPBid, .t.)
wvw_pbEnable(nWinNum, nPBid, .T.)
else
wvw_pbEnable(nWinNum, nPBid, .f.)
wvw_pbEnable(nWinNum, nPBid, .F.)
endif
wvw_cbSetFocus(nWinNum, nId)
endif

View File

@@ -62,7 +62,7 @@ local __nCBid__,__temp__ //these two are temporary var required by CB get creat
WVW_cbSetFont(NIL, "Arial", 14) //std: 20-2
//set(_SET_TRACESTACK, 0)
//wvw_setmousemove(,.t.)
//wvw_setmousemove(,.T.)
CLS
@@ -78,7 +78,7 @@ local __nCBid__,__temp__ //these two are temporary var required by CB get creat
read
* disable all comboboxes:
aeval(s_aComboList, {| x | wvw_cbenable(NIL, x[1], .f.)})
aeval(s_aComboList, {| x | wvw_cbenable(NIL, x[1], .F.)})
devpos(5,0)
? "name: '" + mname + "'"
@@ -271,14 +271,14 @@ local oGet
oGet:updatebuffer()
else
//oGet:undo()
return .f.
return .F.
endif
endif
oGet:exitstate := GE_MOUSEHIT
oGetList:nNextGet := nPos
oGetList:settle(,.f.)
oGetList:settle(,.F.)
endif
return .t.
return .T.
*/
/* miscellaneous **********************************/

View File

@@ -80,14 +80,14 @@ local ntop := 7,;
nmidver:=INT((ntop+nbot)/2),;
nmidhor:=INT((nleft+nrig)/2)
local cpict := "vouch1.gif",;
ltransp := .f.,;
ltransp := .F.,;
nMaxCache := wvw_SetMaxBMcache()
local i,j,oWPaint
local getlist := {}
setcolor("N/W,N/GR*,,,N/W*")
wvw_setcodepage(,255)
wg_ResetWPaintObj( 0 )
do while .t.
do while .T.
CLS
setcursor(1)
cpict := padr(cpict,40)
@@ -147,7 +147,7 @@ local getlist := {}
* delete all image objects
wg_DelWPaintObj(0, WPAINTOBJ_IMAGE, NIL)
enddo //while .t.
enddo //while .T.
setcursor(1)
return
@@ -182,10 +182,10 @@ ENDCLASS //wPaintOBJ
METHOD New(nWinNum, nType, cId, nRow1, nCol1, nRow2, nCol2, aOffTLBR, lTransp) CLASS wPaintObj
default aOffTLBR to {0,0,0,0}
default lTransp to .f.
default lTransp to .F.
::nWinNum := nWinNum
::lVisible := .t.
::lVisible := .T.
::nType := nType
::cId := cId
@@ -223,7 +223,7 @@ RETURN NIL //DRAW()
METHOD Undraw() CLASS wPaintObj
* undraw the object
* normally this is called with ::lVisible == .f.,
* normally this is called with ::lVisible == .F.,
* otherwise the object will be redrawn by WVW_PAINT
local cScreen
local nRow1, nCol1, nRow2, nCol2, nMaxRow, nMaxCol
@@ -252,13 +252,13 @@ RETURN NIL //undraw()
METHOD Hide() CLASS wPaintObj
* temporarily hides the object
::lVisible := .f.
::lVisible := .F.
::Undraw()
RETURN NIL
METHOD Show() CLASS wPaintObj
* show the object
::lVisible := .t.
::lVisible := .T.
::draw()
RETURN NIL
@@ -269,7 +269,7 @@ function wg_ResetWPaintObj( nWinNum, nObjNum, lStrict )
* if nObjNum specified, clears object >= nObjNum
local i
default nObjNum to 0
default lStrict to .f.
default lStrict to .F.
do while len(s_aPObjList) < nWinNum+1
aadd( s_aPObjList, {} )
@@ -277,14 +277,14 @@ local i
asize(s_aPObjList[ nWinNum+1 ], nObjNum)
return .t.
return .T.
function wg_AddWPaintObj( nWinNum, oWPaint, lStrict, nOperation )
* adds a WPaint object oWPaint into window nWinNum
* returns ::cId if successful. "" if failed.
local i
local nLen, aRect //20050720
default lStrict to .f.
default lStrict to .F.
default nOperation to WOBJ_ADD_OVERWRITE
* simplified:
@@ -303,7 +303,7 @@ local nLen, aRect //20050720
if lStrict
s_aPObjList[ nWinNum+1 ][i]:Hide()
else
s_aPObjList[ nWinNum+1 ][i]:lVisible := .f.
s_aPObjList[ nWinNum+1 ][i]:lVisible := .F.
endif
s_aPObjList[ nWinNum+1 ][i] := oWPaint
@@ -315,7 +315,7 @@ local nLen, aRect //20050720
if oWPaint:lVisible
oWPaint:draw()
endif
return oWPaint:cId //20040811 was .t.
return oWPaint:cId //20040811 was .T.
function wg_DelWPaintObj( nWinNum, nType, cId, lStrict )
* deletes a WPaint object oWPaint from window nWinNum
@@ -327,7 +327,7 @@ local lDelAll := (cId == NIL)
local nDeleted := 0
local nLen
local cCurId
default lStrict to .f.
default lStrict to .F.
* is nType set?
if nType < 1
@@ -343,7 +343,7 @@ local cCurId
if lStrict
s_aPObjList[ nWinNum+1 ][i]:Hide()
else
s_aPObjList[ nWinNum+1 ][i]:lVisible := .f.
s_aPObjList[ nWinNum+1 ][i]:lVisible := .F.
endif
cCurId := s_aPObjList[ nWinNum+1 ][i]:cId
adel(s_aPObjList[ nWinNum+1 ], i)

View File

@@ -55,7 +55,7 @@
proc main
local nOpen, nClose
local lClosepermitted := .f.
local lClosepermitted := .F.
local bSetKey := SETKEY(K_F8, {|| MyHelp()})
SET CENTURY ON
SET DATE ANSI
@@ -66,9 +66,9 @@ local bSetKey := SETKEY(K_F8, {|| MyHelp()})
WVW_PBSetFont(0, "Arial") //font for pushbuttons
Wvw_SetCodePage(0, 255)
wvw_allownontopEvent(.t.) //this will make pushbuttons to work
wvw_allownontopEvent(.T.) //this will make pushbuttons to work
//even on non-topmost window
wvw_recurseCblock(.t.) //this will allow recursed execution
wvw_recurseCblock(.T.) //this will allow recursed execution
//of control's codeblocks
//eg. multiple executions of pushbutton's codeblock
// invoking "GetSession()"
@@ -174,7 +174,7 @@ return NIL
* 20070525
function AddEBGet(aEBGets, mnrow, mncol, mxValue, mcVarName, mbAssign, mcLabel, mlMultiline, mcPict)
* adding one EBGet variable into aEBGets array
* returns .t. if successful
* returns .T. if successful
local mcVarType, mbText
mcVarType := valtype(mxValue)
do case
@@ -189,7 +189,7 @@ local mcVarType, mbText
mbText := {|| dtoc(mxValue)}
otherwise
* unsupported valtype
return .f.
return .F.
endcase
if !(valtype(aEBGets)=="A")
@@ -198,7 +198,7 @@ local mcVarType, mbText
if !(valtype(mlMultiline)=="L") .or.;
!(valtype(mxValue)=="C")
mlMultiline := .f.
mlMultiline := .F.
endif
if !(valtype(mcLabel)=="C")
mcLabel := mcVarName + ":"
@@ -214,17 +214,17 @@ local mcVarType, mbText
mbText,; //__GET_BTEXT
mbAssign,; //__GET_BASSIGN
NIL,; //__GET_NEBID
.f. }) //__GET_LFOCUSED
.F. }) //__GET_LFOCUSED
return .t.
return .T.
procedure EBReadGets(nwinnum, aEBGets)
* generic procedure to run aEBGets, array of editboxes
local nmaxrow, nmincol
local i, nlen, lmultiline, clabel, ;
nrow1,ncol1,nrow2,ncol2
local creport, nOKbutton, nCancelbutton, nClosebutton, ldone := .f.
local lclosePermitted := .f.
local creport, nOKbutton, nCancelbutton, nClosebutton, ldone := .F.
local lclosePermitted := .F.
local nNumGets := len(aEBGets)
local ch
local nfocus, lchangefocus
@@ -278,7 +278,7 @@ local nfocus, lchangefocus
ncol1 := ncol1+10+1
nClosebutton := wvw_pbcreate(nwinnum, nrow1, ncol1, nrow1, ncol1+10-1, "Close", NIL, ;
{|| ToCloseWindow(nwinnum, @lClosepermitted)})
wvw_pbenable(nwinnum, nclosebutton, .f.)
wvw_pbenable(nwinnum, nclosebutton, .F.)
* register a keyhandler for WVW_INPFOCUS
inp_handler(nwinnum, {| n, ch | InpKeyHandler(n, ch, aEBGets, nOKbutton, nCancelbutton)})
@@ -291,7 +291,7 @@ local nfocus, lchangefocus
if valtype(setkey(ch))=="B"
eval(setkey(ch))
elseif ch!=0
lchangefocus := .t.
lchangefocus := .T.
do case
case ch==K_TAB .or. ch==K_DOWN .or. ch==K_ENTER
if nFocus<(nNumGets+2) //incl buttons
@@ -306,7 +306,7 @@ local nfocus, lchangefocus
nFocus := nNumGets+2
endif
otherwise
lchangefocus := .f. //!wvw_ebisfocused(nwinnum, aEBGets[nFocus][__GET_NEBID])
lchangefocus := .F. //!wvw_ebisfocused(nwinnum, aEBGets[nFocus][__GET_NEBID])
endcase
if lchangefocus
if nFocus<=nNumGets
@@ -354,7 +354,7 @@ local nFocus, lchangefocus
else
nFocus := nFocused(aEBGets)
endif
lchangefocus := .t.
lchangefocus := .T.
do case
case ch==K_TAB .and. !lShiftPressed()
if nFocus<(nNumGets+2) //incl buttons
@@ -369,7 +369,7 @@ local nFocus, lchangefocus
nFocus := nNumGets+2
endif
otherwise
lchangefocus := .f.
lchangefocus := .F.
endcase
if lchangefocus
if nFocus<=nNumGets
@@ -386,16 +386,16 @@ static procedure EndGets(nwinnum, aEBGets, nOKbutton, nCancelbutton, nCloseButto
local i
* session ended
for i := 1 to len(aEBGets)
wvw_ebenable(nwinnum, aEBGets[i][__GET_NEBID], .f.)
wvw_ebenable(nwinnum, aEBGets[i][__GET_NEBID], .F.)
next
wvw_pbenable(nwinnum, nOKbutton, .f.)
wvw_pbenable(nwinnum, nCancelbutton, .f.)
wvw_pbenable(nwinnum, nOKbutton, .F.)
wvw_pbenable(nwinnum, nCancelbutton, .F.)
* clear the getlist
asize(aEBGets,0)
* wait until user click the close button
wvw_pbenable(nwinnum, nclosebutton, .t.)
wvw_pbenable(nwinnum, nclosebutton, .T.)
return
static procedure SaveVar(nwinnum, aEBGets, lDone)
@@ -406,7 +406,7 @@ local i, cdebugreport
eval(aEBGets[i][__GET_BASSIGN], ;
GetValFromText(wvw_ebgettext(nwinnum, aEBGets[i][__GET_NEBID]), aEBGets[i][__GET_CVALTYPE]))
next
lDone := .t.
lDone := .T.
* debugging text
cdebugreport := "Get session in window "+alltrim(str(nwinnum))+" is ended with confirmation"+ chr(13)+chr(10)+;
@@ -421,7 +421,7 @@ local i, cdebugreport
eval(aEBGets[i][__GET_BASSIGN], ;
aEBGets[i][__GET_XINIT])
next
lDone := .t.
lDone := .T.
* debugging text
cdebugreport := "Get session in window "+alltrim(str(nwinnum))+" is ended with cancellation"+ chr(13)+chr(10)+;
@@ -444,7 +444,7 @@ return ascan(aEBGets, {| x | x[__GET_NEBID]==nEBId})
static function nFocused(aEBGets)
* returns index to aEBGets array containing editbox that is/was in focus
return ascan(aEBGets, {| x | x[__GET_LFOCUSED]==.t.})
return ascan(aEBGets, {| x | x[__GET_LFOCUSED]==.T.})
@@ -482,7 +482,7 @@ return ascan(aEBGets, {| x | x[__GET_LFOCUSED]==.t.})
static function MaskEditBox(nWinNum,nId,nEvent,aEBGets)
* callback function called by GTWVW during some events on editbox
static bBusy := .f.
static bBusy := .F.
local ctext
local nIndex := nGetIndex(aEBGets, nId)
local mcvaltype, mcpict, mlmultiline
@@ -493,7 +493,7 @@ local nwasfocus
if nIndex==0
return NIL
endif
bBusy := .t.
bBusy := .T.
mcvaltype := aEBGets[nIndex][__GET_CVALTYPE]
mcpict := aEBGets[nIndex][__GET_CPICT]
mlmultiline := aEBGets[nIndex][__GET_LMULTILINE]
@@ -517,15 +517,15 @@ local nwasfocus
wvw_ebsetsel(nwinnum, nid, 0, -1)
nwasFocus := nFocused(aEBGets)
if nwasFocus!=0
aEBGets[nwasFocus][__GET_LFOCUSED] := .f.
aEBGets[nwasFocus][__GET_LFOCUSED] := .F.
endif
aEBGets[nIndex][__GET_LFOCUSED] := .t.
aEBGets[nIndex][__GET_LFOCUSED] := .T.
case nEvent==EN_CHANGE
if !mlmultiline
ProcessCharMask(nwinnum, nId, mcvaltype, mcpict)
endif
endcase
bBusy := .f.
bBusy := .F.
return NIL
/************* borrowed and modified from minigui *************/
@@ -557,7 +557,7 @@ Local ol := 0
InBuffer := wvw_ebgettext(mnwinnum, mnebid)
pc := 0 //x for clarity
pFlag := .f. //x for clarity
pFlag := .F. //x for clarity
if mcvaltype=="N"
// RL 104
If Left ( AllTrim(InBuffer) , 1 ) == '-' .And. Val(InBuffer) == 0
@@ -731,7 +731,7 @@ RETURN
//from h_textbox.prg
static Function CharMaskTekstOK( cString, cvaltype, cMask )
Local lPassed:=.t.,CB,CM,x
Local lPassed:=.T.,CB,CM,x
//x BEGIN
if cvaltype=="D"
For x := 1 To min(Len(cString),Len(cMask))
@@ -740,15 +740,15 @@ Local lPassed:=.t.,CB,CM,x
Do Case
Case CM == '9'
If IsDigit ( CB ) .Or. CB == ' '
* lPassed:=.t.
* lPassed:=.T.
Else
Return .f.
Return .F.
EndIf
OtherWise
* lPassed:=.t.
* lPassed:=.T.
EndCase
next i
return .t.
return .T.
endif
//x END
@@ -759,27 +759,27 @@ Local lPassed:=.t.,CB,CM,x
// JK
Case (CM) == 'A' .or. (CM) == '!'
If IsAlpha ( CB ) .Or. CB == ' '
* lPassed:=.t.
* lPassed:=.T.
Else
Return .f.
Return .F.
EndIf
Case CM == '9'
If IsDigit ( CB ) .Or. CB == ' '
* lPassed:=.t.
* lPassed:=.T.
Else
Return .f.
Return .F.
EndIf
Case CM == ' '
If CB == ' '
* lPassed:=.t.
* lPassed:=.T.
Else
Return .f.
Return .F.
EndIf
OtherWise
* lPassed:=.t.
* lPassed:=.T.
EndCase
next i
Return .t. //lPassed
Return .T. //lPassed
//from h_textbox.prg
static Function GetValFromText ( Text , mcvaltype )
@@ -878,7 +878,7 @@ local bhandler
* did user perform a menu/toolbar action on Main Window?
//if message==WM_COMMAND .and. nWinNum==0 //menu,toolbar,pushbutton
// return .f.
// return .F.
//endif
* now we handle input on other non-topmost windows
@@ -889,16 +889,16 @@ local bhandler
bhandler := inp_handler(nWinNum)
if valtype(bhandler)=="B"
eval( bhandler, nWinNum, ch )
return .t.
return .T.
else
return .f.
return .F.
endif
otherwise
* ignore
return .t.
return .T.
endcase
return .f.//WVW_INPUTFOCUS()
return .F.//WVW_INPUTFOCUS()
function inp_handler(nwinnum, bhandler)
static sbhandlers := {}

View File

@@ -75,7 +75,7 @@ return //main
static function CreateToolbar(nWinNum)
//for toolbar:
local nSysBitmap := 1 //0:none 1:small 2:large
local lDisplayText := .f. //text will be displayed as tooltip instead
local lDisplayText := .F. //text will be displayed as tooltip instead
local hWndTB
local ldefault
@@ -85,14 +85,14 @@ local ldefault
if hWndTB==0
wvw_messagebox(nWinNum, "FAILED to create toolbar", "Error", MB_OK+MB_ICONEXCLAMATION)
return .f.
return .F.
endif
/* using system std & view bitmaps */
wvw_tbAddButton(nWinNum, IDM_OPENWIN, STD_FILENEW, "Open a new typewriter window", 1 /*system std bitmap*/)
wvw_tbAddButton(nWinNum, IDM_CLOSEWIN, STD_DELETE, "Close last window", 1 /*system std bitmap*/)
wvw_tbAddButton(nWinNum, IDM_ARRANGEWIN, VIEW_PARENTFOLDER, "Reposition all windows", 2 /*system view bitmap*/)
return .t. //CreateToolbar()
return .T. //CreateToolbar()
static function CreateStatusbar(nWinNum)
local hWndSB
@@ -102,9 +102,9 @@ local ldefault
hWndSB := wvw_sbcreate(nWinNum)
if hWndSB==0
wvw_messagebox(nWinNum, "FAILED to create statusbar", "Error", MB_OK+MB_ICONEXCLAMATION)
return .f.
return .F.
endif
return .t. //CreateStatusbar()
return .T. //CreateStatusbar()
static function MenuAction(nWinNum, nCommand)
* Handle Menu/Toolbar actions
@@ -131,7 +131,7 @@ local ch
if nWinNum > _MAX_WINNUM
wvw_messagebox(nWinNum-1, "Sorry, I don't think you can handle that many of windows :-)",;
"Sorry", MB_OK+MB_ICONASTERISK)
return .f.
return .F.
endif
* prepare titles and coordinates
@@ -173,7 +173,7 @@ local ch
elseif nWinNum==1
setcursor(SC_NONE)
endif
return .t.//OpenNewWindow()
return .T.//OpenNewWindow()
static function CloseLastWindow()
* closes the last window. If no window left, Main Window will be closed too.
@@ -215,8 +215,8 @@ return NIL
* Parameter passed to this function is somewhat 'raw', so their handling
* is a bit tricky.
*
* This function should return .t. if it has handled the event,
* otherwise return .f. to sign GTWVW that the input is considered invalid.
* This function should return .T. if it has handled the event,
* otherwise return .F. to sign GTWVW that the input is considered invalid.
*
*/
@@ -230,12 +230,12 @@ local nCommand, ch
if message==WM_COMMAND .and. nWinNum==0 //menu,toolbar,pushbutton
nCommand := wParamLow
MenuAction(0, nCommand)
return .t.
return .T.
endif
* other types of input on main window is not handled here
if nWinNum==0
return .f.
return .F.
endif
* now we handle input on other non-topmost windows
@@ -247,10 +247,10 @@ local nCommand, ch
case message==WM_CHAR
ch := wParam
eval( s_akeyhandlers[nWinNum], nWinNum, ch )
return .t.
return .T.
otherwise
* let it be ignored
return .t.
return .T.
endcase
/*
@@ -264,7 +264,7 @@ local nCommand, ch
wvw_messagebox(0, cdebug, "Debug", MB_OK)
*/
return .f.//WVW_INPUTFOCUS()
return .F.//WVW_INPUTFOCUS()
//********************************************************************
// SUPPORTING FUNCTIONS

View File

@@ -13,10 +13,10 @@
proc main
setcolor("N/W")
WVW_SetMainCoord(.f.) //Standard Mode
WVW_SetMainCoord(.F.) //Standard Mode
fillscreen()
WVW_SetMainCoord(.t.) //MainCoord Mode
WVW_SetMainCoord(.T.) //MainCoord Mode
fillscreen()
return

View File

@@ -18,14 +18,14 @@ STATIC s_lSizeReady := .F.
procedure main
local ch
* activate WVW_SIZE()
s_lSizeReady := .t.
s_lSizeReady := .T.
* the biggest possible window
setcolor("N/W")
setmode(wvw_maxmaxrow()+1, wvw_maxmaxcol()+1)
* enable MAXIMIZE button
wvw_enablemaximize(0, .t.)
wvw_enablemaximize(0, .T.)
* set the window to MAXIMIZED state
wvw_maximize(0)
@@ -69,7 +69,7 @@ function WVW_SIZE(nWinNum, hWnd, message, wParam, lParam)
* this function is called by gtwvw AFTER the size is changed
* WARNING: screen repainting is not performed completely by gtwvw at this point of call
local cScreen
local lNeedReset := .f., ;
local lNeedReset := .F., ;
maxsavedscrrow, maxsavedscrcol
if !s_lSizeReady
* program is not ready to handle window resizing
@@ -82,7 +82,7 @@ local lNeedReset := .f., ;
endif
* avoid reentrance
s_lSizeReady := .f.
s_lSizeReady := .F.
do case
case wParam == 2 //SIZE_MAXIMIZED
@@ -118,5 +118,5 @@ local lNeedReset := .f., ;
endcase
* allow next call
s_lSizeReady := .t.
s_lSizeReady := .T.
return NIL

View File

@@ -60,7 +60,7 @@ local cName := padr("Name",20)
local cAddr := padr("Address",25)
local cPhone:= padr("Phone",15)
local cFax := padr("Fax",15)
local lDone := .f.
local lDone := .F.
local getlist := {}
local oldCurs := setcursor(SC_NORMAL)
@@ -89,7 +89,7 @@ return //xGet1()
for illustration purposes only */
FUNCTION xBrowse1()
LOCAL nKey, bBlock, oBrowse , i
LOCAL lEnd := .f.
LOCAL lEnd := .F.
LOCAL info_ := {}
LOCAL nTop := 6
LOCAL nLeft := 3
@@ -220,14 +220,14 @@ RETURN {|| fieldget( i ) }
// supporting functions ***************************
function lMessage(cMsg)
* displays a message on maxrow() and returns .t.
* displays a message on maxrow() and returns .T.
local cOldColor := setcolor(s_cStdColor)
@ maxrow(), 0 say padc(cMsg, maxcol()+1)
setcolor(cOldColor)
return .t.
return .T.
function lYesNo(cMsg)
* display cmsg with Yes/No option, returns .t. if Yes selected
* display cmsg with Yes/No option, returns .T. if Yes selected
local nTopLine, ;
nLeft := 5, ;
nBotLine := maxrow()-2,;
@@ -304,7 +304,7 @@ local oldColor := setcolor(s_cStdColor)
setcursor(oldCurs)
setcolor(oldColor)
return .t.
return .T.
FUNCTION ZNEWWINDOW(wtype,r1,c1,r2,c2,ctitle, ccolor)
* Draw a new window on screen and register it in window list

View File

@@ -48,7 +48,7 @@ static s_cStdColor := "N/W,N/GR*,,,N/W*"
proc main
local i,j
#ifdef __GTWVW__
local lMainCoord := WVW_SetMainCoord( .t. )
local lMainCoord := WVW_SetMainCoord( .T. )
WVW_SetCodePage(,255)
#endif
SET SCOREBOARD OFF
@@ -84,7 +84,7 @@ local cName := padr("Name",20)
local cAddr := padr("Address",25)
local cPhone:= padr("Phone",15)
local cFax := padr("Fax",15)
local lDone := .f.
local lDone := .F.
local getlist := {}
local oldCurs := setcursor(SC_NORMAL)
@@ -113,7 +113,7 @@ return //xGet1()
for illustration purposes only */
FUNCTION xBrowse1()
LOCAL nKey, bBlock, oBrowse , i
LOCAL lEnd := .f.
LOCAL lEnd := .F.
LOCAL info_ := {}
LOCAL nTop := 6
LOCAL nLeft := 3
@@ -244,14 +244,14 @@ RETURN {|| fieldget( i ) }
// supporting functions ***************************
function lMessage(cMsg)
* displays a message on maxrow() and returns .t.
* displays a message on maxrow() and returns .T.
local cOldColor := setcolor(s_cStdColor)
@ maxrow(), 0 say padc(cMsg, maxcol()+1)
setcolor(cOldColor)
return .t.
return .T.
function lYesNo(cMsg)
* display cmsg with Yes/No option, returns .t. if Yes selected
* display cmsg with Yes/No option, returns .T. if Yes selected
local nTopLine, ;
nLeft := 5, ;
nBotLine := maxrow()-2,;
@@ -328,7 +328,7 @@ local oldColor := setcolor(s_cStdColor)
setcursor(oldCurs)
setcolor(oldColor)
return .t.
return .T.
FUNCTION ZNEWWINDOW(wtype,r1,c1,r2,c2,ctitle, ccolor)
* Draw a new window on screen and register it in window list

View File

@@ -40,7 +40,7 @@ static s_amiscobjlist := {} //x misc object list (actually: list of codeblo
proc main
local i,j
#ifdef __GTWVW__
local lMainCoord := WVW_SetMainCoord( .t. )
local lMainCoord := WVW_SetMainCoord( .T. )
local nMaxRow := maxrow(), nMaxCol := maxcol()
WVW_SetFont(,"Lucida Console",16,-8)
WVW_SetCodePage(,255)
@@ -85,7 +85,7 @@ local cName := padr("Name",20)
local cAddr := padr("Address",25)
local cPhone:= padr("Phone",15)
local cFax := padr("Fax",15)
local lDone := .f.
local lDone := .F.
local getlist := {}
local oldCurs := setcursor(SC_NORMAL)
#ifdef __GTWVW__
@@ -121,7 +121,7 @@ return //xGet1()
for illustration purposes only */
FUNCTION xBrowse1()
LOCAL nKey, bBlock, oBrowse , i
LOCAL lEnd := .f.
LOCAL lEnd := .F.
LOCAL info_ := {}
LOCAL nTop := 6
LOCAL nLeft := 3
@@ -277,22 +277,22 @@ function lMessage(cMsg)
#ifndef __GTWVW__
* displays a message on maxrow() and returns .t.
* displays a message on maxrow() and returns .T.
local cOldColor := setcolor(s_cStdColor)
@ maxrow(), 0 say padc(cMsg, maxcol()+1)
setcolor(cOldColor)
#ELSE
* displays a message on status bar of Main Window and returns .t.
* displays a message on status bar of Main Window and returns .T.
wvw_SBsettext(0, 0, cMsg)
#endif
return .t.
return .T.
function lYesNo(cMsg)
* display cmsg with Yes/No option, returns .t. if Yes selected
* display cmsg with Yes/No option, returns .T. if Yes selected
local nTopLine, ;
nLeft := 5, ;
nBotLine := maxrow()-2,;
@@ -369,7 +369,7 @@ local oldColor := setcolor(s_cStdColor)
setcursor(oldCurs)
setcolor(oldColor)
return .t.
return .T.
FUNCTION ZNEWWINDOW(wtype,r1,c1,r2,c2,ctitle, ccolor)
* Draw a new window on screen and register it in window list
@@ -463,11 +463,11 @@ function ResetMiscObjects( nWinNum )
aadd( s_amiscobjlist, {} )
enddo
s_amiscobjlist[ nWinNum+1 ] := {}
return .t.
return .T.
function AddMiscObjects( nWinNum, bAction )
aadd( s_amiscobjlist[ nWinNum+1 ], bAction )
return .t.
return .T.
#endif

View File

@@ -130,7 +130,7 @@ METHOD New(cCaption, nRow1, nCol1, nRow2, nCol2, bClickBlock, nType, lDraw, nWin
default nRow2 to nRow1
default nCol2 to nCol1 + max(10, len(cCaption) + 2) -1
default nType to _BUTTON_NORMAL //20040303
default lDraw to .t.
default lDraw to .T.
default nWinId to wvw_nNumWindows()-1 //20040303
//TODO: ::nId := iif(empty(s_amouseobjlist), 1, s_amouseobjlist[len(s_amouseobjlist)]:nGetId()+1)
@@ -145,10 +145,10 @@ METHOD New(cCaption, nRow1, nCol1, nRow2, nCol2, bClickBlock, nType, lDraw, nWin
::bClickBlock := iif(valtype(bClickBlock)=="B", bClickBlock, NIL)
::bPressBlock := NIL
::lRepeatPress := .f.
::lRepeatPress := .F.
::lPressed := .f.
::lHover := .f. //20040303
::lPressed := .F.
::lHover := .F. //20040303
::cCaption := cCaption
::cCaptionFont := _DEFAULT_CAPTION_FONT
::nCaptionHeight := _DEFAULT_CAPTION_HEIGHT
@@ -159,9 +159,9 @@ METHOD New(cCaption, nRow1, nCol1, nRow2, nCol2, bClickBlock, nType, lDraw, nWin
::cNormalColor := "W"
::cPressedColor := "W"
::lVisible := .t.
::lEnable := .t.
::lTight := .f.
::lVisible := .T.
::lEnable := .T.
::lTight := .F.
::nType := nType
if lDraw //20040304
@@ -199,14 +199,14 @@ local lWasPressed
endif
lWasPressed := ::lPressed
::lPressed := .t.
::lPressed := .T.
::Draw()
if ::lRepeatPress //.and. ::lPressed
if !lWasPressed
xKeyRepeater(.t.) //init it
xKeyRepeater(.T.) //init it
endif
wvwm_SetKeyRepeater( .t. ) //activate key repeater
wvwm_SetKeyRepeater( .T. ) //activate key repeater
endif
if valtype(::bPressBlock) == "B"
@@ -232,11 +232,11 @@ local lWasPressed := ::lPressed
return Self
endif
::lPressed := .f.
::lPressed := .F.
::Draw()
if ::lRepeatPress //.and. ::lPressed
wvwm_SetKeyRepeater( .f. ) //deactivate key repeater
wvwm_SetKeyRepeater( .F. ) //deactivate key repeater
endif
if lWasPressed
@@ -250,10 +250,10 @@ METHOD OnReleaseOut() CLASS WVWMouseButton
return Self
endif
::lPressed := .f.
::lPressed := .F.
::Draw()
//NOTE: no need to do SetKeyRepeater( .f. ),
//NOTE: no need to do SetKeyRepeater( .F. ),
// because it was already handled by onMouseOut
return Self
@@ -265,10 +265,10 @@ METHOD OnMouseOut() CLASS WVWMouseButton
endif
if ::lRepeatPress .and. ::lPressed
wvwm_SetKeyRepeater( .f. ) //stop key repeater
wvwm_SetKeyRepeater( .F. ) //stop key repeater
endif
::lHover := .f.
::lHover := .F.
::Draw()
return Self
@@ -280,10 +280,10 @@ METHOD OnMouseOver() CLASS WVWMouseButton
endif
if ::lRepeatPress .and. ::lPressed
wvwm_SetKeyRepeater( .t. ) //activate key repeater
wvwm_SetKeyRepeater( .T. ) //activate key repeater
endif
::lHover := .t.
::lHover := .T.
::Draw()
return Self
@@ -324,7 +324,7 @@ local lUseImage := (valtype(::cImage)=="C") //20040325
endif
if !empty(::cCaption)
Wvw_DrawLabel(nWinNum, ::nRow1, nCeiling((::nCol2+::nCol1)/2), ::cCaption, 6,, nLabelColor, rgb(198,198,198), ::cCaptionFont, iif(valtype(afontinfo)=="A",afontinfo[2],::nCaptionHeight), 0, , , , .f., .f. )
Wvw_DrawLabel(nWinNum, ::nRow1, nCeiling((::nCol2+::nCol1)/2), ::cCaption, 6,, nLabelColor, rgb(198,198,198), ::cCaptionFont, iif(valtype(afontinfo)=="A",afontinfo[2],::nCaptionHeight), 0, , , , .F., .F. )
endif
else
if lMouseOver .or. (::nType==_BUTTON_NORMAL) .or. (::nType==_BUTTON_HARD)
@@ -348,7 +348,7 @@ local lUseImage := (valtype(::cImage)=="C") //20040325
endif
if !empty(::cCaption)
Wvw_DrawLabel(nWinNum, ::nRow1, nCeiling((::nCol2+::nCol1)/2), ::cCaption, 6,, nLabelColor, rgb(198,198,198), ::cCaptionFont, iif(valtype(afontinfo)=="A",afontinfo[2],::nCaptionHeight), 0, , , , .f., .f. )
Wvw_DrawLabel(nWinNum, ::nRow1, nCeiling((::nCol2+::nCol1)/2), ::cCaption, 6,, nLabelColor, rgb(198,198,198), ::cCaptionFont, iif(valtype(afontinfo)=="A",afontinfo[2],::nCaptionHeight), 0, , , , .F., .F. )
endif
endif
setcursor(nOldCursor)
@@ -371,13 +371,13 @@ function wvwm_ResetMouseObjects( nWinNum )
aadd( s_amouseobjlist, {} )
enddo
s_amouseobjlist[ nWinNum+1 ] := {}
return .t.
return .T.
function wvwm_AddMouseObjects( nWinNum, oMouse, nObjType )
* adds a mouse object oMouse into window nWinNum
default nObjType to _MOBJECT_BUTTON
aadd( s_amouseobjlist[ nWinNum+1 ], {nObjType, oMouse} )
return .t.
return .T.
function wvwm_nNumMouseObjects( nWinNum )
* returns number of mouse objects in window nWinNum
@@ -388,7 +388,7 @@ function wvwm_nObjectType( nWinNum, nObjNum )
return s_amouseobjlist[ nWinNum+1 ][nObjNum][1]
function wvwm_SetKeyRepeater( lSet )
* returns .t. if KeyRepeater is active
* returns .T. if KeyRepeater is active
* if lSet is supplied, KeyRepeater is enable/disable accordingly
local lWasSet := (s_nkeyrepeater != NIL)
if !(lSet==NIL)
@@ -501,14 +501,14 @@ return nKey //wvwm_nMouseChecker(nkey)
static procedure xKeyRepeater(lInit)
static nLastValidCheck := 0
static lFirstRepeat := .t.
static lFirstRepeat := .T.
local nNow
local nRepeatInterval
default lInit to .f.
default lInit to .F.
if lInit
* simply init the locally static var
lFirstRepeat := .t.
lFirstRepeat := .T.
nLastValidCheck := seconds()
return
endif
@@ -534,7 +534,7 @@ local nRepeatInterval
nLastValidCheck := seconds() //nNow
* next repeat will be quicker
lFirstRepeat := .f.
lFirstRepeat := .F.
return //xKeyRepeater()

View File

@@ -180,7 +180,7 @@ local ch
SET DATE ANSI
SET SCOREBOARD OFF
//wvw_SetPaintRefresh(0)
wvw_SetVertCaret(.t.)
wvw_SetVertCaret(.T.)
wvw_pbSetFont(, "Tahoma", 14)
nCursor := setcursor(0)
@@ -199,7 +199,7 @@ local ch
s_afontinfo := WVW_getfontinfo()
hb_gtInfo( HB_GTI_INKEYFILTER, {| nkey | nAfterInkey(nkey) } )
WVW_SETMOUSEMOVE(,.t.) //required by wvwmouse
WVW_SETMOUSEMOVE(,.T.) //required by wvwmouse
kF1 := SetKey( K_F1, {|| xHelp() } )
kF2 := SetKey( K_F2, {|| xDebugInfo() } )
kF3 := SetKey( K_F3, {|| Demo_Console() } )
@@ -251,7 +251,7 @@ local ch
CreateToolbar(nCurWindow)
ResetMiscObjects( nCurWindow )
AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawLabel( nWindow, 1,40, cLabel,6,, rgb(255,255,255), rgb(198,198,198), 'Arial', s_afontinfo[2], , , , , .t., .t. ) } )
AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawLabel( nWindow, 1,40, cLabel,6,, rgb(255,255,255), rgb(198,198,198), 'Arial', s_afontinfo[2], , , , , .T., .T. ) } )
wvwm_ResetMouseObjects( nCurWindow )
wvwm_AddMouseObjects( nCurWindow, WVWMouseButton():New("Info!", maxrow()-2,67, , , {|| xDebugInfo() } ))
@@ -262,16 +262,16 @@ local ch
wvwm_AddMouseObjects( nCurWindow, oMouse )
oMouse := WVWMouseButton():New("None", maxrow()-2,67-11-11, , , {|| lboxmessage("none") }, 2, NIL )
oMouse:Enable(.t.)
oMouse:Enable(.T.)
wvwm_AddMouseObjects( nCurWindow, oMouse )
wvwm_AddMouseObjects( nCurWindow, WVWMouseButton():New("Hard", maxrow()-2,67-11-11-11, , , {|| lboxmessage("hard") }, 3, NIL ))
oMouse := WVWMouseButton():New("Disabled", maxrow()-2,67-11-11-11-11, , , {|| xDebugInfo() } )
oMouse:Enable(.f.)
oMouse:Enable(.F.)
wvwm_AddMouseObjects( nCurWindow, oMouse )
oMouse := WVWMouseButton():New("Tight", maxrow()-2,67-11-11-11-11-11, , , {|| lboxmessage("tight") } )
oMouse:lTight := .t.
oMouse:lTight := .T.
wvwm_AddMouseObjects( nCurWindow, oMouse )
* 20070525 the real pushbutton, easier and better looking. Nothing to do with wvwmouse.prg.
@@ -350,7 +350,7 @@ local nCursor
local cColor
local ch
local lMouseMove
local lEchoing := .f.
local lEchoing := .F.
default nTop to 2
default nLeft to 2
default nBottom to nTop+10
@@ -367,7 +367,7 @@ local lEchoing := .f.
nCursor := setcursor(SC_NORMAL)
cColor := setcolor("W+/N")
lMouseMove := WVW_SETMOUSEMOVE(,.f.)
lMouseMove := WVW_SETMOUSEMOVE(,.F.)
nMaxrow := maxrow(); nMaxcol := maxcol()
ResetMiscObjects( nCurWindow )
@@ -449,7 +449,7 @@ memvar x
WVW_SetIcon(, 'vr_1.ico' )
ResetMiscObjects( nCurWindow )
AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawLabel( nWindow, 1,nRight-nLeft, cLabel,2,, rgb(255,255,255), rgb(198,198,198), 'Arial', s_afontinfo[2], , , , , .t., .t. ) } )
AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawLabel( nWindow, 1,nRight-nLeft, cLabel,2,, rgb(255,255,255), rgb(198,198,198), 'Arial', s_afontinfo[2], , , , , .T., .T. ) } )
AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawBoxRecessed( nWindow, 7-nTop, 61-nLeft, 13-nTop, 70-nLeft ) } )
AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawBoxGroup( nWindow, 15-nTop, 59-nLeft, 18-nTop, 72-nLeft ) } )
AddMiscObjects( nCurWindow, {| nWindow | WVW_DrawBoxGroup( nWindow, 5-nTop, 6-nLeft, 19-nTop, 44-nLeft ) } )
@@ -496,7 +496,7 @@ RETURN //Demo_Get()
FUNCTION DEMO_Browse()
LOCAL nKey, bBlock, oBrowse , i
LOCAL lEnd := .f.
LOCAL lEnd := .F.
LOCAL info_ := {} //WVW_nOpenWindow() has not been performed, so...
LOCAL nTop := 3 //pls notice that this is relative to PARENT window!
LOCAL nLeft := 3 //pls notice that this is relative to PARENT window!
@@ -583,7 +583,7 @@ FUNCTION DEMO_Browse()
do case
case nKey == K_ESC .or. nKey == K_ENTER
lEnd := .t.
lEnd := .T.
loop
case nKey == K_DOWN
@@ -677,8 +677,8 @@ local lNeedStabilize
nOldWin := wvw_nSetCurWindow(nWinNum)
lNeedStabilize := .f.
do while .t. //dummy loop
lNeedStabilize := .F.
do while .T. //dummy loop
do case
case XBmsg == 0 //SB_LINEUP
if ordKeyNo() == 1; exit; endif
@@ -694,10 +694,10 @@ local lNeedStabilize
oBrowse:pagedown()
otherwise
* ignore
lNeedStabilize := .f.
lNeedStabilize := .F.
exit
endcase
lNeedStabilize := .t.
lNeedStabilize := .T.
exit
enddo //dummy loop
@@ -720,8 +720,8 @@ local lNeedStabilize
nOldWin := wvw_nSetCurWindow(nWinNum)
lNeedStabilize := .f.
do while .t. //dummy loop
lNeedStabilize := .F.
do while .T. //dummy loop
do case
case XBmsg == 0 //SB_LINELEFT
if oBrowse:colPos== 1; exit; endif
@@ -737,10 +737,10 @@ local lNeedStabilize
oBrowse:panright()
otherwise
* ignore
lNeedStabilize := .f.
lNeedStabilize := .F.
exit
endcase
lNeedStabilize := .t.
lNeedStabilize := .T.
exit
enddo //dummy loop
if lNeedStabilize
@@ -910,7 +910,7 @@ return NIL
function CreateToolbar(nWinNum)
//for toolbar:
local nSysBitmap := 1 //0:none 1:small 2:large
local lDisplayText := .f. //text will be displayed as tooltip instead
local lDisplayText := .F. //text will be displayed as tooltip instead
local hWndTB
local ldefault
@@ -960,14 +960,14 @@ return NIL
function xDisableToolbar(nWinNum)
local i
for i := 0 to wvw_tbButtonCount(nWinNum)-1
WVW_TBEnableButton(nWinNum, i, .f.)
WVW_TBEnableButton(nWinNum, i, .F.)
next
return NIL
function xEnableToolbar(nWinNum)
local i
for i := 0 to wvw_tbButtonCount(nWinNum)-1
WVW_TBEnableButton(nWinNum, i, .t.)
WVW_TBEnableButton(nWinNum, i, .T.)
next
return NIL
@@ -978,11 +978,11 @@ function ResetMiscObjects( nWinNum )
aadd( s_amiscobjlist, {} )
enddo
s_amiscobjlist[ nWinNum+1 ] := {}
return .t.
return .T.
function AddMiscObjects( nWinNum, bAction )
aadd( s_amiscobjlist[ nWinNum+1 ], bAction )
return .t.
return .T.
// inkey() handler **************************************
@@ -1065,7 +1065,7 @@ return nkey //nMenuChecker()
function lBoxMessage(cMsg, cTitle)
default cTitle to "Info"
win_messagebox(WVW_GETWINDOWHANDLE(), cMsg, cTitle, MB_OK + MB_ICONINFORMATION + MB_SYSTEMMODAL)
return .t.
return .T.
function lYesNo(cMsg, cTitle)
default cTitle to "Konfirmasi"
@@ -1079,7 +1079,7 @@ function xDebugInfo()
static s_nfh := 0
MSETPOS(maxrow(), maxcol())
//SETMOUSE(.t., maxrow(), maxcol())
//SETMOUSE(.T., maxrow(), maxcol())
//WVW_SETMOUSEPOS(WVW_nNumWindows()-1, maxrow(), maxcol())
@@ -1160,7 +1160,7 @@ return nNumber
/* Note: width < 0 appears better, but mouse caption will look bad */
FUNCTION SetDefaultWindowSize()
//x was: LOCAL Result:= SetMode(32,98), ScreenWidth
LOCAL Result:= .t., ScreenWidth
LOCAL Result:= .T., ScreenWidth
SetMode(25,80)
IF Result
screenWidth := Wvw_GetScreenWidth()

View File

@@ -222,12 +222,12 @@ STATIC FUNCTION Generate()
/* TODO: Clear remaining (not matched) tags */
/*
cRes := ""
FOR i := 1 TO len( ::cContent )
FOR i := 1 TO Len( ::cContent )
IF SubStr( ::cContent, i, 1 ) == "<" .AND. ;
SubStr( ::cContent, i + 1, 1 ) == "#"
lFlag := .t.
lFlag := .T.
ELSEIF SubStr( ::cContent, i, 1 ) == ">" .AND. lFlag
lFlag := .f.
lFlag := .F.
ELSEIF ! lFlag
cRes += SubStr( ::cContent, i, 1 )
ENDIF
@@ -304,9 +304,9 @@ STATIC FUNCTION ProcessCGI()
IF i > Len( cQuery ) .OR. SubStr( cQuery, i, 1 ) == "&"
AAdd( ::aQueryFields, ;
AAdd( ::aQueryFields, ;
{ SubStr( cBuff, 1, At( "=", cBuff ) - 1 ), ;
StrTran( SubStr( cBuff, At( "=", cBuff ) + 1, ;
StrTran( SubStr( cBuff, At( "=", cBuff ) + 1, ;
Len( cBuff ) - At( "=", cBuff ) + 1 ), "+", " " ) } )
cBuff := ""
ELSE

Binary file not shown.

View File

@@ -35,7 +35,7 @@ local _nFont, lReverse, nAt
DEFAULT nRow to t_aReport[ REPORTLINE ]
DEFAULT cUnits to "R"
DEFAULT lExact to .f.
DEFAULT lExact to .F.
DEFAULT cId to ""
IF t_aReport[ HEADEREDIT ]
@@ -46,7 +46,7 @@ DEFAULT cId to ""
cString := left( cString, nAt - 1 ) + ltrim(str( pdfPageNumber())) + substr( cString, nAt + 12 )
ENDIF
lReverse := .f.
lReverse := .F.
IF cUnits == "M"
nRow := pdfM2Y( nRow )
nCol := pdfM2X( nCol )
@@ -66,7 +66,7 @@ DEFAULT cId to ""
cString := left( cString, len( cString ) - 1 )
pdfBox( t_aReport[ PAGEY ] - nRow - t_aReport[ FONTSIZE ] + 2.0 , nCol, t_aReport[ PAGEY ] - nRow + 2.0, nCol + pdfM2X( pdfLen( cString )) + 1,,100, "D")
t_aReport[ PAGEBUFFER ] += " 1 g "
lReverse := .t.
lReverse := .T.
ELSEIF right( cString, 1 ) == chr(254) //underline
cString := left( cString, len( cString ) - 1 )
pdfBox( t_aReport[ PAGEY ] - nRow + 0.5, nCol, t_aReport[ PAGEY ] - nRow + 1, nCol + pdfM2X( pdfLen( cString )) + 1,,100, "D")
@@ -347,7 +347,7 @@ function pdfCenter( cString, nRow, nCol, cUnits, lExact, cId ) /*
local nLen, nAt
DEFAULT nRow to t_aReport[ REPORTLINE ]
DEFAULT cUnits to "R"
DEFAULT lExact to .f.
DEFAULT lExact to .F.
DEFAULT nCol to iif( cUnits == "R", t_aReport[ REPORTWIDTH ] / 2, t_aReport[ PAGEX ] / 72 * 25.4 / 2 )
IF t_aReport[ HEADEREDIT ]
@@ -883,7 +883,7 @@ function pdfOpen( cFile, nLen, lOptimize ) /*
========================================== */
local cTemp, nI, nJ, n1, n2 := 896, n12
DEFAULT nLen to 200
DEFAULT lOptimize to .f.
DEFAULT lOptimize to .F.
t_aReport[ FONTNAME ] := 1
t_aReport[ FONTSIZE ] := 10
@@ -901,8 +901,8 @@ DEFAULT lOptimize to .f.
t_aReport[ REPORTOBJ ] := 1//2
t_aReport[ DOCLEN ] := 0
t_aReport[ TYPE1 ] := { "Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic", "Helvetica", "Helvetica-Bold", "Helvetica-Oblique", "Helvetica-BoldOblique", "Courier", "Courier-Bold", "Courier-Oblique", "Courier-BoldOblique" } // 0.04
t_aReport[ MARGINS ] := .t.
t_aReport[ HEADEREDIT ] := .f.
t_aReport[ MARGINS ] := .T.
t_aReport[ HEADEREDIT ] := .F.
t_aReport[ NEXTOBJ ] := 0
t_aReport[ PDFTOP ] := 1 // top
t_aReport[ PDFLEFT ] := 10 // left & right
@@ -1050,7 +1050,7 @@ function pdfRJust( cString, nRow, nCol, cUnits, lExact, cId ) /*
local nLen, nAdj := 1.0, nAt
DEFAULT nRow to t_aReport[ REPORTLINE ]
DEFAULT cUnits to "R"
DEFAULT lExact to .f.
DEFAULT lExact to .F.
IF t_aReport[ HEADEREDIT ]
return pdfHeader( "PDFRJUST", cId, { cString, nRow, nCol, cUnits, lExact } )
@@ -1123,7 +1123,7 @@ return cString
==============================================================================*/
function pdfTextCount( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits )/*
==============================================================================*/
return pdfText( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits, .f. )
return pdfText( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits, .F. )
/*
=================================================================================*/
function pdfText( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits, cColor, lPrint )/*
@@ -1134,7 +1134,7 @@ local lParagraph, nSpace, nNew, nTokenLen, nCRLF, nTokens, nLen
DEFAULT nTab to -1
DEFAULT cUnits to 'R'
DEFAULT nJustify to 4 // justify
DEFAULT lPrint to .t.
DEFAULT lPrint to .T.
DEFAULT cColor to ""
IF cUnits == "M"
@@ -1169,7 +1169,7 @@ DEFAULT cColor to ""
nL += nNew * nSpace // first always paragraph
nLineLen := nSpace * nNew - nSpace
lParagraph := .t.
lParagraph := .T.
nI := 1
while nI <= nTokens
@@ -1189,7 +1189,7 @@ DEFAULT cColor to ""
IF nJustify != 2
nL += nSpace * nNew
ENDIF
lParagraph := .f.
lParagraph := .F.
ENDIF
IF nJustify == 2
nL := nLeft + ( nLength - pdfLen( cTemp ) ) / 2
@@ -1278,7 +1278,7 @@ local nFinish, nL, nB, nJ, cToken, nRow
nStart := nFinish + 1
lParagraph := .f.
lParagraph := .F.
nLineLen := 0.00
nLineLen += nSpace * nNew
@@ -1340,22 +1340,22 @@ DEFAULT cFile to ""
ELSE
t_aReport[ HEADER ] := {}
ENDIF
t_aReport[ MARGINS ] := .t.
t_aReport[ MARGINS ] := .T.
return nil
function pdfEditOnHeader()
t_aReport[ HEADEREDIT ] := .t.
t_aReport[ MARGINS ] := .t.
t_aReport[ HEADEREDIT ] := .T.
t_aReport[ MARGINS ] := .T.
return nil
function pdfEditOffHeader()
t_aReport[ HEADEREDIT ] := .f.
t_aReport[ MARGINS ] := .t.
t_aReport[ HEADEREDIT ] := .F.
t_aReport[ MARGINS ] := .T.
return nil
function pdfCloseHeader()
t_aReport[ HEADER ] := {}
t_aReport[ MARGINS ] := .f.
t_aReport[ MARGINS ] := .F.
return nil
function pdfDeleteHeader( cId )
@@ -1366,7 +1366,7 @@ local nRet := -1, nId
nRet := len( t_aReport[ HEADER ] ) - 1
aDel( t_aReport[ HEADER ], nId )
aSize( t_aReport[ HEADER ], nRet )
t_aReport[ MARGINS ] := .t.
t_aReport[ MARGINS ] := .T.
ENDIF
return nRet
@@ -1375,8 +1375,8 @@ local nId
cId := upper( cId )
nId := ascan( t_aReport[ HEADER ], {| arr | arr[ 3 ] == cId })
IF nId > 0
t_aReport[ HEADER ][ nId ][ 1 ] := .t.
t_aReport[ MARGINS ] := .t.
t_aReport[ HEADER ][ nId ][ 1 ] := .T.
t_aReport[ MARGINS ] := .T.
ENDIF
return nil
@@ -1385,8 +1385,8 @@ local nId
cId := upper( cId )
nId := ascan( t_aReport[ HEADER ], {| arr | arr[ 3 ] == cId })
IF nId > 0
t_aReport[ HEADER ][ nId ][ 1 ] := .f.
t_aReport[ MARGINS ] := .t.
t_aReport[ HEADER ][ nId ][ 1 ] := .F.
t_aReport[ MARGINS ] := .T.
ENDIF
return nil
@@ -1417,7 +1417,7 @@ local nId, nI, nLen, nIdLen
++nId
cId += ltrim(str(nId))
ENDIF
aadd( t_aReport[ HEADER ], { .t., cFunction, cId } )
aadd( t_aReport[ HEADER ], { .T., cFunction, cId } )
++nLen
for nI := 1 to len( arr )
aadd( t_aReport[ HEADER ][ nLen ], arr[ nI ] )
@@ -1476,7 +1476,7 @@ local nI, _nFont, _nSize, nLen := len( t_aReport[ HEADER ] )
t_aReport[ PDFLEFT ] := 10 // left & right
t_aReport[ PDFBOTTOM ] := t_aReport[ PAGEY ] / 72 * t_aReport[ LPI ] - 1 // bottom, default "LETTER", "P", 6
t_aReport[ MARGINS ] := .f.
t_aReport[ MARGINS ] := .F.
ENDIF
ENDIF
return nil
@@ -1650,7 +1650,7 @@ local nI, nLen := len( t_aReport[ HEADER ] ), nTemp, aTemp, nHeight
ENDIF
next
t_aReport[ MARGINS ] := .f.
t_aReport[ MARGINS ] := .F.
return nil
@@ -1726,22 +1726,22 @@ DEFAULT _width to 200
ENDIF
pdfSetFont("Helvetica", BOLD, 10) // 0.04
pdfAtSay( "Test Line 1", t_aReportStyle[ nStyle ][ 1 ], 1, "R", .t. )
pdfAtSay( "Test Line 1", t_aReportStyle[ nStyle ][ 1 ], 1, "R", .T. )
pdfSetFont("Times", BOLD, 18)
pdfCenter( "Test Line 2", t_aReportStyle[ nStyle ][ 2 ],,"R", .t. )
pdfCenter( "Test Line 2", t_aReportStyle[ nStyle ][ 2 ],,"R", .T. )
pdfSetFont("Times", BOLD, 12)
pdfCenter( "Test Line 3", t_aReportStyle[ nStyle ][ 3 ],,"R", .t. )
pdfCenter( "Test Line 3", t_aReportStyle[ nStyle ][ 3 ],,"R", .T. )
pdfSetFont("Helvetica", BOLD, 10) // 0.04
pdfAtSay( "Test Line 4", t_aReportStyle[ nStyle ][ 4 ], 1, "R", .t. )
pdfAtSay( "Test Line 4", t_aReportStyle[ nStyle ][ 4 ], 1, "R", .T. )
pdfSetFont("Helvetica", BOLD, 10) // 0.04
pdfAtSay( "Test Line 5", t_aReportStyle[ nStyle ][ 5 ], 1, "R", .t. )
pdfAtSay( "Test Line 5", t_aReportStyle[ nStyle ][ 5 ], 1, "R", .T. )
pdfAtSay( dtoc( date()) + " " + TimeAsAMPM( time() ), t_aReportStyle[ nStyle ][ 6 ], 1, "R", .t. )
pdfRJust( "Page: #pagenumber#", t_aReportStyle[ nStyle ][ 6 ], t_aReport[ REPORTWIDTH ], "R", .t. )
pdfAtSay( dtoc( date()) + " " + TimeAsAMPM( time() ), t_aReportStyle[ nStyle ][ 6 ], 1, "R", .T. )
pdfRJust( "Page: #pagenumber#", t_aReportStyle[ nStyle ][ 6 ], t_aReport[ REPORTWIDTH ], "R", .T. )
pdfEditOffHeader()
pdfSaveHeader( _file )

View File

@@ -133,7 +133,7 @@ METHOD Init( cFile, nLen, lOptimize )
local cTemp, nI, nJ, n1, n2 := 896, n12
DEFAULT nLen TO 200
DEFAULT lOptimize TO .f.
DEFAULT lOptimize TO .F.
::aReport := array( PARAMLEN )
@@ -155,8 +155,8 @@ DEFAULT lOptimize TO .f.
::aReport[ TYPE1 ] := { "Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic", ;
"Helvetica", "Helvetica-Bold", "Helvetica-Oblique", "Helvetica-BoldOblique", ;
"Courier", "Courier-Bold", "Courier-Oblique", "Courier-BoldOblique" }
::aReport[ MARGINS ] := .t.
::aReport[ HEADEREDIT ] := .f.
::aReport[ MARGINS ] := .T.
::aReport[ HEADEREDIT ] := .F.
::aReport[ NEXTOBJ ] := 0
::aReport[ PDFTOP ] := 1 // top
::aReport[ PDFLEFT ] := 10 // left & right
@@ -205,7 +205,7 @@ local _nFont, lReverse, nAt
DEFAULT nRow TO ::aReport[ REPORTLINE ]
DEFAULT cUnits TO "R"
DEFAULT lExact TO .f.
DEFAULT lExact TO .F.
DEFAULT cId TO ""
IF ::aReport[ HEADEREDIT ]
@@ -216,7 +216,7 @@ DEFAULT cId TO ""
cString := left( cString, nAt - 1 ) + ltrim(str( ::PageNumber())) + substr( cString, nAt + 12 )
ENDIF
lReverse := .f.
lReverse := .F.
IF cUnits == "M"
nRow := ::M2Y( nRow )
nCol := ::M2X( nCol )
@@ -236,7 +236,7 @@ DEFAULT cId TO ""
cString := left( cString, len( cString ) - 1 )
::Box( ::aReport[ PAGEY ] - nRow - ::aReport[ FONTSIZE ] + 2.0 , nCol, ::aReport[ PAGEY ] - nRow + 2.0, nCol + ::M2X( ::length( cString )) + 1,,100, "D")
::aReport[ PAGEBUFFER ] += " 1 g "
lReverse := .t.
lReverse := .T.
ELSEIF right( cString, 1 ) == chr(254) //underline
cString := left( cString, len( cString ) - 1 )
::Box( ::aReport[ PAGEY ] - nRow + 0.5, nCol, ::aReport[ PAGEY ] - nRow + 1, nCol + ::M2X( ::length( cString )) + 1,,100, "D")
@@ -503,7 +503,7 @@ METHOD Center( cString, nRow, nCol, cUnits, lExact, cId )
local nLen, nAt
DEFAULT nRow TO ::aReport[ REPORTLINE ]
DEFAULT cUnits TO "R"
DEFAULT lExact TO .f.
DEFAULT lExact TO .F.
DEFAULT nCol TO iif( cUnits == "R", ::aReport[ REPORTWIDTH ] / 2, ::aReport[ PAGEX ] / 72 * 25.4 / 2 )
IF ::aReport[ HEADEREDIT ]
@@ -893,7 +893,7 @@ local nLen, nAdj := 1.0, nAt
DEFAULT nRow TO ::aReport[ REPORTLINE ]
DEFAULT cUnits TO "R"
DEFAULT lExact TO .f.
DEFAULT lExact TO .F.
IF ::aReport[ HEADEREDIT ]
return ::Header( "PDFRJUST", cId, { cString, nRow, nCol, cUnits, lExact } )
@@ -986,7 +986,7 @@ METHOD tPdf:TextCount( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits )
METHOD TextCount( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits )
#endif
RETURN ::Text( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits, .f. )
RETURN ::Text( cString, nTop, nLeft, nLength, nTab, nJustify, cUnits, .F. )
//-------------------------\\
@@ -1003,7 +1003,7 @@ local lParagraph, nSpace, nNew, nTokenLen, nCRLF, nTokens, nLen
DEFAULT nTab TO -1
DEFAULT cUnits TO "R"
DEFAULT nJustify TO 4
DEFAULT lPrint TO .t.
DEFAULT lPrint TO .T.
DEFAULT cColor TO ""
IF cUnits == "M"
@@ -1037,7 +1037,7 @@ DEFAULT cColor TO ""
nL += nNew * nSpace
nLineLen := nSpace * nNew - nSpace
lParagraph := .t.
lParagraph := .T.
nI := 1
while nI <= nTokens
@@ -1057,7 +1057,7 @@ DEFAULT cColor TO ""
IF nJustify != 2
nL += nSpace * nNew
ENDIF
lParagraph := .f.
lParagraph := .F.
ENDIF
IF nJustify == 2
nL := nLeft + ( nLength - ::length( cTemp ) ) / 2
@@ -1146,7 +1146,7 @@ DEFAULT cFile TO ""
ELSE
::aReport[ HEADER ] := {}
ENDIF
::aReport[ MARGINS ] := .t.
::aReport[ MARGINS ] := .T.
RETURN self
@@ -1158,8 +1158,8 @@ METHOD tPdf:EditOnHeader()
METHOD EditOnHeader()
#endif
::aReport[ HEADEREDIT ] := .t.
::aReport[ MARGINS ] := .t.
::aReport[ HEADEREDIT ] := .T.
::aReport[ MARGINS ] := .T.
RETURN self
@@ -1171,8 +1171,8 @@ METHOD tPdf:EditOffHeader()
METHOD EditOffHeader()
#endif
::aReport[ HEADEREDIT ] := .f.
::aReport[ MARGINS ] := .t.
::aReport[ HEADEREDIT ] := .F.
::aReport[ MARGINS ] := .T.
RETURN self
@@ -1185,7 +1185,7 @@ METHOD CloseHeader()
#endif
::aReport[ HEADER ] := {}
::aReport[ MARGINS ] := .f.
::aReport[ MARGINS ] := .F.
RETURN self
//-------------------------\\
@@ -1203,7 +1203,7 @@ local nRet := -1, nId
nRet := len( ::aReport[ HEADER ] ) - 1
aDel( ::aReport[ HEADER ], nId )
aSize( ::aReport[ HEADER ], nRet )
::aReport[ MARGINS ] := .t.
::aReport[ MARGINS ] := .T.
ENDIF
RETURN nRet
@@ -1219,8 +1219,8 @@ local nId
cId := upper( cId )
nId := ascan( ::aReport[ HEADER ], {| arr | arr[ 3 ] == cId })
IF nId > 0
::aReport[ HEADER ][ nId ][ 1 ] := .t.
::aReport[ MARGINS ] := .t.
::aReport[ HEADER ][ nId ][ 1 ] := .T.
::aReport[ MARGINS ] := .T.
ENDIF
RETURN self
@@ -1236,8 +1236,8 @@ local nId
cId := upper( cId )
nId := ascan( ::aReport[ HEADER ], {| arr | arr[ 3 ] == cId })
IF nId > 0
::aReport[ HEADER ][ nId ][ 1 ] := .f.
::aReport[ MARGINS ] := .t.
::aReport[ HEADER ][ nId ][ 1 ] := .F.
::aReport[ MARGINS ] := .T.
ENDIF
RETURN self
@@ -1287,7 +1287,7 @@ local nId, nI, nLen, nIdLen
++nId
cId += ltrim(str(nId))
ENDIF
aadd( ::aReport[ HEADER ], { .t., cFunction, cId } )
aadd( ::aReport[ HEADER ], { .T., cFunction, cId } )
++nLen
for nI := 1 to len( arr )
aadd( ::aReport[ HEADER ][ nLen ], arr[ nI ] )
@@ -1353,7 +1353,7 @@ local nI, _nFont, _nSize, nLen := len( ::aReport[ HEADER ] )
::aReport[ PDFLEFT ] := 10 // left & right
::aReport[ PDFBOTTOM ] := ::aReport[ PAGEY ] / 72 * ::aReport[ LPI ] - 1 // bottom, default "LETTER", "P", 6
::aReport[ MARGINS ] := .f.
::aReport[ MARGINS ] := .F.
ENDIF
ENDIF
RETURN self
@@ -1532,7 +1532,7 @@ local nI, nLen := len( ::aReport[ HEADER ] ), nTemp, aTemp, nHeight
::aReport[ PDFBOTTOM ] := nBottom
ENDIF
::aReport[ MARGINS ] := .f.
::aReport[ MARGINS ] := .F.
RETURN self
@@ -1615,22 +1615,22 @@ DEFAULT _width TO 200
ENDIF
::SetFont("Arial", BOLD, 10)
::AtSay( "Test Line 1", aReportStyle[ nStyle ][ 1 ], 1, "R", .t. )
::AtSay( "Test Line 1", aReportStyle[ nStyle ][ 1 ], 1, "R", .T. )
::SetFont("Times", BOLD, 18)
::Center( "Test Line 2", aReportStyle[ nStyle ][ 2 ],,"R", .t. )
::Center( "Test Line 2", aReportStyle[ nStyle ][ 2 ],,"R", .T. )
::SetFont("Times", BOLD, 12)
::Center( "Test Line 3", aReportStyle[ nStyle ][ 3 ],,"R", .t. )
::Center( "Test Line 3", aReportStyle[ nStyle ][ 3 ],,"R", .T. )
::SetFont("Arial", BOLD, 10)
::AtSay( "Test Line 4", aReportStyle[ nStyle ][ 4 ], 1, "R", .t. )
::AtSay( "Test Line 4", aReportStyle[ nStyle ][ 4 ], 1, "R", .T. )
::SetFont("Arial", BOLD, 10)
::AtSay( "Test Line 5", aReportStyle[ nStyle ][ 5 ], 1, "R", .t. )
::AtSay( "Test Line 5", aReportStyle[ nStyle ][ 5 ], 1, "R", .T. )
::AtSay( dtoc( date()) + " " + TimeAsAMPM( time() ), aReportStyle[ nStyle ][ 6 ], 1, "R", .t. )
::RJust( "Page: #pagenumber#", aReportStyle[ nStyle ][ 6 ], ::aReport[ REPORTWIDTH ], "R", .t. )
::AtSay( dtoc( date()) + " " + TimeAsAMPM( time() ), aReportStyle[ nStyle ][ 6 ], 1, "R", .T. )
::RJust( "Page: #pagenumber#", aReportStyle[ nStyle ][ 6 ], ::aReport[ REPORTWIDTH ], "R", .T. )
::EditOffHeader()
::SaveHeader( _file )
@@ -2140,7 +2140,7 @@ local nFinish, nL, nB, nJ, cToken, nRow
nStart := nFinish + 1
lParagraph := .f.
lParagraph := .F.
nLineLen := 0.00
nLineLen += nSpace * nNew
@@ -2621,7 +2621,7 @@ RETURN n
//-------------------------\\
static function RunExternal( cCmd, cVerb, cFile )
local lRet := .t.
local lRet := .T.
#ifdef __CLP__
lRet := SwpRunCmd( cCmd, 0, "", "" )
@@ -2639,7 +2639,7 @@ local lRet := .t.
#endif
#ifdef __XPP__
RunShell( cCmd, , .t., .t. )
RunShell( cCmd, , .T., .T. )
#endif
return lRet

View File

@@ -3,99 +3,4 @@
*/
FUNCTION vpdf_FontsDat()
RETURN hb_base64Decode( ;
"+gD6APoA+gBNAU0BTQGFAZgBKwKkASsC9AH0AfQB9AH0AfQB9AH0AUED6ANBA0EDCgNBAwoDCgNN" +;
"AU0BTQFNAU0BTQFNAU0BTQFNAU0BTQH0AfQB9AH0ATQCOgKjAjoC+gD6APoA+gBNAU0BTQFNAfoA" +;
"+gD6APoAFgEWARYBFgH0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0" +;
"AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH0ARYBTQFNAU0BFgFNAU0BTQE0AjoC" +;
"owI6AjQCOgKjAjoCNAI6AqMCOgK8AfQB9AH0AZkDogOYA0AD0gLSAmMCmwKbApsCYwKbApsC0gKb" +;
"ApsC0gLSAtIC0gJjApsCYwKbAiwCYwJjApsC0gIKA9IC0gLSAgoD0gIKA00BhQFNAYUBhQH0AbwB" +;
"9AHSAgoDmwKbAmMCmwIsAmMCeQOwA0EDeQPSAtICmwLSAtICCgPSAtICLAJjAmMCYwLSAgoD0gLS" +;
"ApsC0gJjApsCLAIsAvQBLAJjApsCLAJjAtIC0gLSAtIC0gLSAmMCmwKwA+gDQQN5A9IC0gJjApsC" +;
"0gLSAiwCYwJjApsCLAJjAk0BTQGFAU0BFgEWARYBFgFNAU0BhQFNAdUBRQKmAToC9AH0AfQB9AFN" +;
"AU0BTQFNAbwB9AH0AfQB9AEsAvQB9AG8AbwBvAG8AfQBLAL0AfQBvAG8AbwBvAFNAU0BFgFNAfQB" +;
"9AH0AfQB9AEsAvQBLAIWARYBFgEWARYBTQEWARYB9AEsArwB9AEWARYBFgEWAQoDQQPSAgoD9AEs" +;
"AvQBLAL0AfQB9AH0AfQBLAL0AfQB9AEsAvQB9AFNAbwBhQGFAYUBhQGFAYUBFgFNARYBFgH0ASwC" +;
"9AEsAvQB9AG8AbwB0gLSApsCmwL0AfQBvAH0AfQB9AG8AbwBvAG8AYUBhQHgAYoBkAFcAcgA3AAT" +;
"AdwA4AGKAZABXAEdAggCHQI6AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAAATQFNAYUBhQH0AfQB9AH0AfQB9AH0AfQBpwCnAKcApwD0AfQB9AH0AfQB9AH0AfQB9AH0" +;
"AfQB9AH0AfQB9AH0AbQAFgHWABYBvAH0ASwC9AH0AfQB9AH0AU0BTQFNAU0BTQFNAU0BTQEsAiwC" +;
"9AEsAiwCLAL0ASwCAAAAAAAAAAD0AfQB9AH0AfQB9AH0AfQB9AH0AfQB9AH6APoA+gD6AAAAAAAA" +;
"AAAAxQEcAgsC9AFeAV4BXgFeAU0BTQFNAU0BvAH0ASwC9AG8AfQBLAL0AfQB9AH0AfQB6APoA3kD" +;
"6APoA+gD6APoAwAAAAAAAAAAvAH0AfQB9AEAAAAAAAAAAE0BTQFNAU0BTQFNAU0BTQFNAU0BTQFN" +;
"AU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQEAAAAAAAAAAE0BTQFNAU0B" +;
"TQFNAU0BTQEAAAAAAAAAAE0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAegD6AN5A+gDAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAB5A+gDeQOwAwAAAAAAAAAAFAEsARQBCgEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAGMCmwIsAmMC0gIKA9IC0gJ5A+gDsAOwAzYBSgE2ASwBAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAJsC0gKbAtICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFgEWARYB" +;
"FgEAAAAAAAAAAAAAAAAAAAAAFgEWARYBFgH0AfQB9AH0AdIC0gKbAtIC9AEsAvQB9AEAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYBFgEWARYBFgFNARYBTQFjAdoBYwHaASwCLAIsAiwC" +;
"LAIsAiwCLAJ5A3kDeQN5A5sC0gKbAtIC3gAWAd4AFgFNAU0BTQFNAU0BTQFNAU0BhQGFAYUBhQFI" +;
"AkgCSAJIAhYBFgEWARYBTQFNAU0BTQEWARYBFgEWARYBFgEWARYBLAIsAiwCLAIsAiwCLAIsAiwC" +;
"LAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIs" +;
"AiwCLAIWAU0BFgFNARYBTQEWAU0BSAJIAkgCSAJIAkgCSAJIAkgCSAJIAkgCLAJjAiwCYwL3A88D" +;
"9wPPA5sC0gKbAtICmwLSApsC0gLSAtIC0gLSAtIC0gLSAtICmwKbApsCmwJjAmMCYwJjAgoDCgMK" +;
"AwoD0gLSAtIC0gIWARYBFgEWAfQBLAL0ASwCmwLSApsC0gIsAmMCLAJjAkEDQQNBA0ED0gLSAtIC" +;
"0gIKAwoDCgMKA5sCmwKbApsCCgMKAwoDCgPSAtIC0gLSApsCmwKbApsCYwJjAmMCYwLSAtIC0gLS" +;
"ApsCmwKbApsCsAOwA7ADsAObApsCmwKbApsCmwKbApsCYwJjAmMCYwIWAU0BFgFNARYBFgEWARYB" +;
"FgFNARYBTQHVAUgC1QFIAiwCLAIsAiwC3gAWAd4AFgEsAiwCLAIsAiwCYwIsAmMC9AEsAvQBLAIs" +;
"AmMCLAJjAiwCLAIsAiwCFgFNARYBTQEsAmMCLAJjAiwCYwIsAmMC3gAWAd4AFgHeABYB3gAWAfQB" +;
"LAL0ASwC3gAWAd4AFgFBA3kDQQN5AywCYwIsAmMCLAJjAiwCYwIsAmMCLAJjAiwCYwIsAmMCTQGF" +;
"AU0BhQH0ASwC9AEsAhYBTQEWAU0BLAJjAiwCYwL0ASwC9AEsAtICCgPSAgoD9AEsAvQBLAL0ASwC" +;
"9AEsAvQB9AH0AfQBTgGFAU4BhQEEARgBBAEYAU4BhQFOAYUBSAJIAkgCSAIAAAAAAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE0BTQFNAU0BLAIsAiwCLAIsAiwCLAIsAqcA" +;
"pwCnAKcALAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAIsAiwCLAK/AO4AvwDuAE0B9AFNAfQBLAIs" +;
"AiwCLAJNAU0BTQFNAU0BTQFNAU0B9AFjAvQBYwL0AWMC9AFjAgAAAAAAAAAALAIsAiwCLAIsAiwC" +;
"LAIsAiwCLAIsAiwCFgEWARYBFgEAAAAAAAAAABkCLAIZAiwCXgFeAV4BXgHeABYB3gAWAU0B9AFN" +;
"AfQBTQH0AU0B9AEsAiwCLAIsAugD6APoA+gD6APoA+gD6AMAAAAAAAAAAGMCYwJjAmMCAAAAAAAA" +;
"AABNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFNAU0BTQFN" +;
"AU0BTQFNAU0BAAAAAAAAAABNAU0BTQFNAU0BTQFNAU0BAAAAAAAAAABNAU0BTQFNAU0BTQFNAU0B" +;
"TQFNAU0BTQHoA+gD6APoAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6APoA+gD6AMAAAAAAAAAAHIBcgFyAXIBAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAmMCLAJjAgoDCgMKAwoD6APoA+gD6ANtAW0B" +;
"bQFtAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB5A3kDeQN5AwAAAAAA" +;
"AAAAAAAAAAAAAAAAAAAAAAAAABYBFgEWARYBAAAAAAAAAAAAAAAAAAAAAN4AFgHeABYBYwJjAmMC" +;
"YwKwA7ADsAOwA2MCYwJjAmMCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJY" +;
"AlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgCWAJYAlgC" +;
"WAJYAlgCWAJYAlgCWAJYAlgC" )
#pragma __streaminclude "fonts.dat" | RETURN { %s }

View File

@@ -4,36 +4,37 @@
#include "hbvpdf.ch"
procedure main()
PROCEDURE Main()
local aReport
local nWidth, nTab, nI, nJ, nK, nCol, nRow, aStyle, aFonts
local nTop, nLeft, nBottom, nRight, cTestFile
local aColor := { ;
"FF0000", "8B0000", "800000", "FF4500", "D2691E", "B8860B", "FF8C00", "FFA500", "DAA520", "808000", "FFD700", "FFFF00", "ADFF2F", "9ACD32", "7FFF00", "7CFC00", "00FF00", "32CD32", "008000", "006400",;
"66CDAA", "7FFFD4", "87CEFA", "87CEEB", "F0F8FF", "E0FFFF", "B0C4DE", "B0E0E6", "AFEEEE", "ADD8E6", "8FBC8F", "90EE90", "98FB98", "00FA9A", "00FF7F", "3CB371", "2E8B57", "228B22", "556B2F", "6B8E23",;
"5F9EA0", "40E0D0", "48D1CC", "00CED1", "20B2AA", "008B8B", "008080", "2F4F4F", "00BFFF", "00FFFF", "00FFFF", "0000FF", "0000CD", "00008B", "000080", "1E90FF", "4169E1", "4682B4", "6495ED", "7B68EE",;
"C71585", "FF1493", "FF00FF", "FF00FF", "9370DB", "DDADDD", "DB7093", "FF69B4", "DA70D6", "EE82EE", "BA55D3", "9932CC", "8A2BE2", "9400D3", "8B008B", "800080", "4B0082", "191970", "483D8B", "6A5ACD",;
"DC143C", "B22222", "A52A2A", "CD5C5C", "FA8072", "E9967A", "FFA07A", "F5DEB3", "FFDEAD", "EEE8AA", "FFDAB9", "FFE4C4", "FFEFD5", "FFE4E1", "FFE4B5", "D2B48C", "DEB887", "F0E68C", "BDB76B", "F4A460",;
"FDF5E6", "FFF8DC", "FAF0E6", "FAFAD2", "FFFACD", "FFEBCD", "FFFFE0", "FAEBD7", "FFF5EE", "FFF0F5", "D8BFD8", "FFC0CB", "FFB6C1", "BC8F8F", "F08080", "FF7F50", "FF6347", "8B4513", "A0522D", "CD853F",;
"FFFAFA", "FFFFF0", "E6E6FA", "FFFAF0", "F8F8FF", "F0FFF0", "F5F5DC", "F0FFFF", "F5FFFA", "708090", "778899", "F5F5F5", "DCDCDC", "D3D3D3", "C0C0C0", "A9A9A9", "808080", "696969", "000000", "FFFFFF"}
LOCAL aReport
LOCAL nWidth, nTab, nI, nJ, nK, nCol, nRow, aStyle, aFonts
LOCAL nTop, nLeft, nBottom, nRight, cTestFile
LOCAL aColor := { ;
"FF0000", "8B0000", "800000", "FF4500", "D2691E", "B8860B", "FF8C00", "FFA500", "DAA520", "808000", "FFD700", "FFFF00", "ADFF2F", "9ACD32", "7FFF00", "7CFC00", "00FF00", "32CD32", "008000", "006400", ;
"66CDAA", "7FFFD4", "87CEFA", "87CEEB", "F0F8FF", "E0FFFF", "B0C4DE", "B0E0E6", "AFEEEE", "ADD8E6", "8FBC8F", "90EE90", "98FB98", "00FA9A", "00FF7F", "3CB371", "2E8B57", "228B22", "556B2F", "6B8E23", ;
"5F9EA0", "40E0D0", "48D1CC", "00CED1", "20B2AA", "008B8B", "008080", "2F4F4F", "00BFFF", "00FFFF", "00FFFF", "0000FF", "0000CD", "00008B", "000080", "1E90FF", "4169E1", "4682B4", "6495ED", "7B68EE", ;
"C71585", "FF1493", "FF00FF", "FF00FF", "9370DB", "DDADDD", "DB7093", "FF69B4", "DA70D6", "EE82EE", "BA55D3", "9932CC", "8A2BE2", "9400D3", "8B008B", "800080", "4B0082", "191970", "483D8B", "6A5ACD", ;
"DC143C", "B22222", "A52A2A", "CD5C5C", "FA8072", "E9967A", "FFA07A", "F5DEB3", "FFDEAD", "EEE8AA", "FFDAB9", "FFE4C4", "FFEFD5", "FFE4E1", "FFE4B5", "D2B48C", "DEB887", "F0E68C", "BDB76B", "F4A460", ;
"FDF5E6", "FFF8DC", "FAF0E6", "FAFAD2", "FFFACD", "FFEBCD", "FFFFE0", "FAEBD7", "FFF5EE", "FFF0F5", "D8BFD8", "FFC0CB", "FFB6C1", "BC8F8F", "F08080", "FF7F50", "FF6347", "8B4513", "A0522D", "CD853F", ;
"FFFAFA", "FFFFF0", "E6E6FA", "FFFAF0", "F8F8FF", "F0FFF0", "F5F5DC", "F0FFFF", "F5FFFA", "708090", "778899", "F5F5F5", "DCDCDC", "D3D3D3", "C0C0C0", "A9A9A9", "808080", "696969", "000000", "FFFFFF" }
aReport := PdfInit()
set date format "YYYY/MM/DD" // important for save/load array function!!!
SET DATE FORMAT "YYYY/MM/DD" // important for save/load array function!!!
aStyle := { "Normal", "Bold", "Italic", "BoldItalic" }
aFonts := { { "Times", .t., .t., .t., .t. },;
{ "Helvetica", .t., .t., .t., .t. },;
{ "Courier", .t., .t., .t., .t. } }
aFonts := {;
{ "Times", .T. , .T. , .T. , .T. }, ;
{ "Helvetica", .T. , .T. , .T. , .T. }, ;
{ "Courier", .T. , .T. , .T. , .T. } }
pdfOpen("test.pdf", 200, .t.)
pdfOpen( "test.pdf", 200, .T. )
pdfEditOnHeader()
pdfImage( "files" + hb_ps() + "color.tif", 0, 0, "M" ) // file, row, col, units, height, width
pdfEditOffHeader()
pdfSaveHeader("test.hea")
pdfSaveHeader( "test.hea" )
pdfCloseHeader()
pdfBookOpen()
@@ -43,12 +44,12 @@ procedure main()
pdfBookAdd( "Grids & Borders", 1, aReport[ REPORTPAGE ], 0 )
pdfBookAdd( "Simple Grid", 2, aReport[ REPORTPAGE ], 0 )
for nI := 0 to 792 step 36
pdfBox( nI, 0, nI, 612, 0.01, , "D" )
next
for nI := 0 to 612 step 36
pdfBox( 0, nI, 792, nI, 0.01, , "D" )
next
FOR nI := 0 TO 792 STEP 36
pdfBox( nI, 0, nI, 612, 0.01, , "D" )
NEXT
FOR nI := 0 TO 612 STEP 36
pdfBox( 0, nI, 792, nI, 0.01, , "D" )
NEXT
pdfNewPage( "LETTER", "P", 6 )
pdfBookAdd( "10 dots border ", 2, aReport[ REPORTPAGE ], 0 )
@@ -71,111 +72,112 @@ procedure main()
pdfBox( nRow + 80, ( nCol * 2 ) + 80, ( nRow * 3 ) + 80, ( nCol * 4 ) + 80, 0.01, 95, "D" )
pdfBox( nRow + 90, ( nCol * 2 ) + 90, ( nRow * 3 ) + 90, ( nCol * 4 ) + 90, 0.01, 100, "D" )
for nI := 1 to 7
nRow := 150 + nI * 10
for nJ := 1 to 20
nCol := nJ * 10 - 3
pdfBox( nRow, nCol, nRow + 10, nCol + 10, 0.01, nI * 10,"M", chr(253) + chr( cton( substr( aColor[ ( nI - 1 ) * 20 + nJ ], 1, 2 ), 16) ) + chr( cton( substr( aColor[ ( nI - 1 ) * 20 + nJ ], 3, 2 ), 16) ) + chr( cton( substr( aColor[ ( nI - 1 ) * 20 + nJ ], 5, 2 ), 16) ) )
next
next
FOR nI := 1 TO 7
nRow := 150 + nI * 10
FOR nJ := 1 TO 20
nCol := nJ * 10 - 3
pdfBox( nRow, nCol, nRow + 10, nCol + 10, 0.01, nI * 10, "M", Chr( 253 ) + Chr( cton( SubStr( aColor[ ( nI - 1 ) * 20 + nJ ], 1, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ ( nI - 1 ) * 20 + nJ ], 3, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ ( nI - 1 ) * 20 + nJ ], 5, 2 ), 16 ) ) )
NEXT
NEXT
pdfNewPage( "LETTER", "P", 6 )
pdfBookAdd( "Color Boxes ", 2, aReport[ REPORTPAGE ], 0 )
for nI := 1 to 140
nTop := ( nI - 1 ) * 2.4
nLeft := ( nI - 1 ) * 2.1
nBottom := aReport[ PAGEY ] - ( nI - 1 ) * 2.47
nRight := aReport[ PAGEX ] - ( nI - 1 ) * 2.18
pdfBox1( nTop, nLeft, nBottom, nRight, 10, chr( cton( substr( aColor[ nI ], 1, 2 ), 16) ) + chr( cton( substr( aColor[ nI ], 3, 2 ), 16) ) + chr( cton( substr( aColor[ nI ], 5, 2 ), 16) ))
next
FOR nI := 1 TO 140
nTop := ( nI - 1 ) * 2.4
nLeft := ( nI - 1 ) * 2.1
nBottom := aReport[ PAGEY ] - ( nI - 1 ) * 2.47
nRight := aReport[ PAGEX ] - ( nI - 1 ) * 2.18
pdfBox1( nTop, nLeft, nBottom, nRight, 10, Chr( cton( SubStr( aColor[ nI ], 1, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ nI ], 3, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ nI ], 5, 2 ), 16 ) ) )
NEXT
pdfNewPage( "LETTER", "P", 6 )
pdfBox1( 0, 0, 100, 200, 10, chr(0) + chr(255) + chr(0), chr(255) + chr(255) + chr(0) )
pdfBox1( 0, 0, 100, 200, 10, Chr( 0 ) + Chr( 255 ) + Chr( 0 ), Chr( 255 ) + Chr( 255 ) + Chr( 0 ) )
pdfBookAdd( "Memos", 1, aReport[ REPORTPAGE ], 0 )
pdfBookAdd( "Different Styles & Colors", 2, aReport[ REPORTPAGE ], 0 )
nWidth := 90
nTab := 0
cTestFile := memoread("files" + hb_ps() + "test.txt")
cTestFile := MemoRead( "files" + hb_ps() + "test.txt" )
pdfText( cTestFile, 28, 107.95, nWidth, nTab, 3, "M", chr(253) + chr(0) + chr(0) + chr(255) )//, pdfTextCount( memoread("test.txt"), 28, 107.95, nWidth, nTab, 3, "M" )
pdfText( cTestFile, 58, 107.95, nWidth, nTab, 2, "M", chr(253) + chr(0) + chr(255) + chr(0) )//, pdfTextCount( memoread("test.txt"), 58, 107.95, nWidth, nTab, 2, "M" )
pdfText( cTestFile, 88, 107.95, nWidth, nTab, 1, "M", chr(253) + chr(255) + chr(0) + chr(0) )//, pdfTextCount( memoread("test.txt"), 88, 107.95, nWidth, nTab, 1, "M" )
pdfText( cTestFile, 118, 107.95 - nWidth / 2, nWidth, nTab, 4, "M", chr(253) + chr(255) + chr(255) + chr(0) )//, pdfTextCount( memoread("test.txt"), 118, 107.95 - nWidth / 2, nWidth, nTab, 4, "M" )
pdfText( cTestFile, 28, 107.95, nWidth, nTab, 3, "M", Chr( 253 ) + Chr( 0 ) + Chr( 0 ) + Chr( 255 ) )//, pdfTextCount( memoread("test.txt"), 28, 107.95, nWidth, nTab, 3, "M" )
pdfText( cTestFile, 58, 107.95, nWidth, nTab, 2, "M", Chr( 253 ) + Chr( 0 ) + Chr( 255 ) + Chr( 0 ) )//, pdfTextCount( memoread("test.txt"), 58, 107.95, nWidth, nTab, 2, "M" )
pdfText( cTestFile, 88, 107.95, nWidth, nTab, 1, "M", Chr( 253 ) + Chr( 255 ) + Chr( 0 ) + Chr( 0 ) )//, pdfTextCount( memoread("test.txt"), 88, 107.95, nWidth, nTab, 1, "M" )
pdfText( cTestFile, 118, 107.95 - nWidth / 2, nWidth, nTab, 4, "M", Chr( 253 ) + Chr( 255 ) + Chr( 255 ) + Chr( 0 ) )//, pdfTextCount( memoread("test.txt"), 118, 107.95 - nWidth / 2, nWidth, nTab, 4, "M" )
pdfText( cTestFile, 34, 100, nWidth, nTab, 3, "R", chr(253) + chr(0) + chr(128) + chr(128) )//, pdfTextCount( memoread("test.txt"), 33, 100, nWidth, nTab, 3, "R" )
pdfText( cTestFile, 41, 100, nWidth, nTab, 2, "R", chr(253) + chr(0) + chr(191) + chr(255) )//, pdfTextCount( memoread("test.txt"), 40, 100, nWidth, nTab, 2, "R" )
pdfText( cTestFile, 48, 100, nWidth, nTab, 1, "R", chr(253) + chr(244) + chr(164) + chr(96) )//, pdfTextCount( memoread("test.txt"), 47, 100, nWidth, nTab, 1, "R" )
pdfText( cTestFile, 55, 35, nWidth, nTab, 4, "R", chr(253) + chr(0) + chr(0) + chr(0) )//, pdfTextCount( memoread("test.txt"), 54, 35, nWidth, nTab, 4, "R" )
pdfText( cTestFile, 34, 100, nWidth, nTab, 3, "R", Chr( 253 ) + Chr( 0 ) + Chr( 128 ) + Chr( 128 ) )//, pdfTextCount( memoread("test.txt"), 33, 100, nWidth, nTab, 3, "R" )
pdfText( cTestFile, 41, 100, nWidth, nTab, 2, "R", Chr( 253 ) + Chr( 0 ) + Chr( 191 ) + Chr( 255 ) )//, pdfTextCount( memoread("test.txt"), 40, 100, nWidth, nTab, 2, "R" )
pdfText( cTestFile, 48, 100, nWidth, nTab, 1, "R", Chr( 253 ) + Chr( 244 ) + Chr( 164 ) + Chr( 96 ) )//, pdfTextCount( memoread("test.txt"), 47, 100, nWidth, nTab, 1, "R" )
pdfText( cTestFile, 55, 35, nWidth, nTab, 4, "R", Chr( 253 ) + Chr( 0 ) + Chr( 0 ) + Chr( 0 ) )//, pdfTextCount( memoread("test.txt"), 54, 35, nWidth, nTab, 4, "R" )
pdfNewPage( "LETTER", "P", 6 )
pdfBookAdd( "Fonts", 1, aReport[ REPORTPAGE ], 0 )
pdfBookAdd( "Different Styles", 2, aReport[ REPORTPAGE ], 0 )
nK := 6
for nI := 1 to len( aFonts )
FOR nI := 1 TO Len( aFonts )
++nK
for nJ := 1 to 4
if aFonts[ nI ][ nJ + 1 ]
FOR nJ := 1 TO 4
IF aFonts[ nI ][ nJ + 1 ]
pdfSetFont( aFonts[ nI ][ 1 ], nJ - 1, aReport[ FONTSIZE ] )
pdfRJust("0123456789 This is a test for " + aFonts[ nI ][ 1 ] + " " + ;
aStyle[ nJ ], nK++, aReport[ REPORTWIDTH ], "R")
endif
next
pdfRJust(pdfUnderline("Underline"), nK++, aReport[ REPORTWIDTH ], "R")
pdfRJust(pdfReverse("Test"), nK, aReport[ REPORTWIDTH ], "R")
next
pdfRJust( "0123456789 This is a test for " + aFonts[ nI ][ 1 ] + " " + ;
aStyle[ nJ ], nK++, aReport[ REPORTWIDTH ], "R" )
ENDIF
NEXT
pdfRJust( pdfUnderline( "Underline" ), nK++, aReport[ REPORTWIDTH ], "R" )
pdfRJust( pdfReverse( "Test" ), nK, aReport[ REPORTWIDTH ], "R" )
NEXT
pdfNewPage( "LETTER", "P", 6 )
pdfBookAdd( "Pictures", 1, aReport[ REPORTPAGE ], 0 )
pdfBookAdd( "TIFF", 2, aReport[ REPORTPAGE ], 0 )
pdfImage( "files" + hb_ps() + "color.tif", 0, 0, "M" ) // file, row, col, units, height, width
pdfRJust(pdfUnderline("TIFF"), nK++, aReport[ REPORTWIDTH ], "R")
pdfRJust( pdfUnderline( "TIFF" ), nK++, aReport[ REPORTWIDTH ], "R" )
pdfNewPage( "LETTER", "P", 6 )
pdfBookAdd( "JPEG", 2, aReport[ REPORTPAGE ], 0 )
pdfImage( "files" + hb_ps() + "color.jpg", 0, 0, "M" ) // file, row, col, units, height, width
pdfRJust(pdfUnderline("JPEG"), nK, aReport[ REPORTWIDTH ], "R")
pdfRJust( pdfUnderline( "JPEG" ), nK, aReport[ REPORTWIDTH ], "R" )
pdfOpenHeader("test.hea")
pdfOpenHeader( "test.hea" )
pdfNewPage( "LETTER", "P", 6 )
pdfBookAdd( "Headers", 1, aReport[ REPORTPAGE ], 0 )
pdfBookAdd( "Picture Header Page 8", 2, aReport[ REPORTPAGE ], 0 )
// version 0.01
pdfAtSay( chr(253) + chr(255) + chr(0) + chr(0) + "Red Sample of header repeating on pages 8-10", 1, 20, "R" )
pdfAtSay( Chr( 253 ) + Chr( 255 ) + Chr( 0 ) + Chr( 0 ) + "Red Sample of header repeating on pages 8-10", 1, 20, "R" )
pdfNewPage( "LETTER", "P", 6 )
pdfBookAdd( "Picture Header Page 9", 2, aReport[ REPORTPAGE ], 0 )
// version 0.01
pdfAtSay( chr(253) + chr(0) + chr(255) + chr(0) + "Green Sample of header repeating on pages 8-10", 1, 20, "R" )
pdfAtSay( Chr( 253 ) + Chr( 0 ) + Chr( 255 ) + Chr( 0 ) + "Green Sample of header repeating on pages 8-10", 1, 20, "R" )
pdfNewPage( "LETTER", "P", 6 )
pdfBookAdd( "Picture Header Page 10", 2, aReport[ REPORTPAGE ], 0 )
// version 0.01
pdfAtSay( chr(253) + chr(0) + chr(0) + chr(255) + "Blue Sample of header repeating on pages 8-10", 1, 20, "R" )
pdfAtSay( Chr( 253 ) + Chr( 0 ) + Chr( 0 ) + Chr( 255 ) + "Blue Sample of header repeating on pages 8-10", 1, 20, "R" )
pdfClose()
static function cton( cString, nBase ) // this function called only used in pdf_demo.prg
local cTemp, nI, cChar, n := 0, nLen
STATIC FUNCTION cton( cString, nBase ) // this function called only used in pdf_demo.prg
nLen := len( cString )
LOCAL cTemp, nI, cChar, n := 0, nLen
nLen := Len( cString )
cTemp := ""
for nI := nLen to 1 step -1
cTemp += substr( cString, nI, 1 )
next
cTemp := upper( cTemp )
FOR nI := nLen TO 1 step - 1
cTemp += SubStr( cString, nI, 1 )
NEXT
cTemp := Upper( cTemp )
for nI := 1 to nLen
cChar := substr( cTemp, nI, 1 )
if .not. IsDigit( cChar )
n := n + ((Asc( cChar ) - 65) + 10) * ( nBase ^ ( nI - 1 ) )
else
n := n + (( nBase ^ ( nI - 1 )) * val( cChar ))
endif
next
FOR nI := 1 TO nLen
cChar := SubStr( cTemp, nI, 1 )
IF .NOT. IsDigit( cChar )
n := n + ( ( Asc( cChar ) - 65 ) + 10 ) * ( nBase ^ ( nI - 1 ) )
ELSE
n := n + ( ( nBase ^ ( nI - 1 ) ) * Val( cChar ) )
ENDIF
NEXT
return n
RETURN n

View File

@@ -2,50 +2,47 @@
* $Id$
*/
//-------------------------\\
#include "hbvpdf.ch"
#include "hbvpdf.ch"
PROCEDURE Main()
//-------------------------\\
LOCAL nWidth, nTab, nI, nJ, nK, nCol, nRow, aStyle, aFonts
LOCAL nTop, nLeft, nBottom, nRight, cText, oPdf
LOCAL aColor := { ;
"FF0000", "8B0000", "800000", "FF4500", "D2691E", "B8860B", "FF8C00", "FFA500", "DAA520", "808000", "FFD700", "FFFF00", "ADFF2F", "9ACD32", "7FFF00", "7CFC00", "00FF00", "32CD32", "008000", "006400", ;
"66CDAA", "7FFFD4", "87CEFA", "87CEEB", "F0F8FF", "E0FFFF", "B0C4DE", "B0E0E6", "AFEEEE", "ADD8E6", "8FBC8F", "90EE90", "98FB98", "00FA9A", "00FF7F", "3CB371", "2E8B57", "228B22", "556B2F", "6B8E23", ;
"5F9EA0", "40E0D0", "48D1CC", "00CED1", "20B2AA", "008B8B", "008080", "2F4F4F", "00BFFF", "00FFFF", "00FFFF", "0000FF", "0000CD", "00008B", "000080", "1E90FF", "4169E1", "4682B4", "6495ED", "7B68EE", ;
"C71585", "FF1493", "FF00FF", "FF00FF", "9370DB", "DDADDD", "DB7093", "FF69B4", "DA70D6", "EE82EE", "BA55D3", "9932CC", "8A2BE2", "9400D3", "8B008B", "800080", "4B0082", "191970", "483D8B", "6A5ACD", ;
"DC143C", "B22222", "A52A2A", "CD5C5C", "FA8072", "E9967A", "FFA07A", "F5DEB3", "FFDEAD", "EEE8AA", "FFDAB9", "FFE4C4", "FFEFD5", "FFE4E1", "FFE4B5", "D2B48C", "DEB887", "F0E68C", "BDB76B", "F4A460", ;
"FDF5E6", "FFF8DC", "FAF0E6", "FAFAD2", "FFFACD", "FFEBCD", "FFFFE0", "FAEBD7", "FFF5EE", "FFF0F5", "D8BFD8", "FFC0CB", "FFB6C1", "BC8F8F", "F08080", "FF7F50", "FF6347", "8B4513", "A0522D", "CD853F", ;
"FFFAFA", "FFFFF0", "E6E6FA", "FFFAF0", "F8F8FF", "F0FFF0", "F5F5DC", "F0FFFF", "F5FFFA", "708090", "778899", "F5F5F5", "DCDCDC", "D3D3D3", "C0C0C0", "A9A9A9", "808080", "696969", "000000", "FFFFFF" }
function Main()
local nWidth, nTab, nI, nJ, nK, nCol, nRow, aStyle, aFonts
local nTop, nLeft, nBottom, nRight, cText, oPdf
local aColor := { ;
"FF0000", "8B0000", "800000", "FF4500", "D2691E", "B8860B", "FF8C00", "FFA500", "DAA520", "808000", "FFD700", "FFFF00", "ADFF2F", "9ACD32", "7FFF00", "7CFC00", "00FF00", "32CD32", "008000", "006400",;
"66CDAA", "7FFFD4", "87CEFA", "87CEEB", "F0F8FF", "E0FFFF", "B0C4DE", "B0E0E6", "AFEEEE", "ADD8E6", "8FBC8F", "90EE90", "98FB98", "00FA9A", "00FF7F", "3CB371", "2E8B57", "228B22", "556B2F", "6B8E23",;
"5F9EA0", "40E0D0", "48D1CC", "00CED1", "20B2AA", "008B8B", "008080", "2F4F4F", "00BFFF", "00FFFF", "00FFFF", "0000FF", "0000CD", "00008B", "000080", "1E90FF", "4169E1", "4682B4", "6495ED", "7B68EE",;
"C71585", "FF1493", "FF00FF", "FF00FF", "9370DB", "DDADDD", "DB7093", "FF69B4", "DA70D6", "EE82EE", "BA55D3", "9932CC", "8A2BE2", "9400D3", "8B008B", "800080", "4B0082", "191970", "483D8B", "6A5ACD",;
"DC143C", "B22222", "A52A2A", "CD5C5C", "FA8072", "E9967A", "FFA07A", "F5DEB3", "FFDEAD", "EEE8AA", "FFDAB9", "FFE4C4", "FFEFD5", "FFE4E1", "FFE4B5", "D2B48C", "DEB887", "F0E68C", "BDB76B", "F4A460",;
"FDF5E6", "FFF8DC", "FAF0E6", "FAFAD2", "FFFACD", "FFEBCD", "FFFFE0", "FAEBD7", "FFF5EE", "FFF0F5", "D8BFD8", "FFC0CB", "FFB6C1", "BC8F8F", "F08080", "FF7F50", "FF6347", "8B4513", "A0522D", "CD853F",;
"FFFAFA", "FFFFF0", "E6E6FA", "FFFAF0", "F8F8FF", "F0FFF0", "F5F5DC", "F0FFFF", "F5FFFA", "708090", "778899", "F5F5F5", "DCDCDC", "D3D3D3", "C0C0C0", "A9A9A9", "808080", "696969", "000000", "FFFFFF"}
set date format "YYYY/MM/DD"
SET DATE FORMAT "YYYY/MM/DD"
aStyle := { "Normal", "Bold", "Italic", "BoldItalic" }
aFonts := { { "Times", .t., .t., .t., .t. }, ;
{ "Helvetica", .t., .t., .t., .t. }, ;
{ "Courier", .t., .t., .t., .t. } }
aFonts := {;
{ "Times", .T. , .T. , .T. , .T. }, ;
{ "Helvetica", .T. , .T. , .T. , .T. }, ;
{ "Courier", .T. , .T. , .T. , .T. } }
oPdf := tPdf():New( 'test.pdf', 200, .t. )
oPdf := tPdf():New( "test.pdf", 200, .T. )
oPdf:EditOnHeader()
oPdf:Image( 'files\color.tif', 0, 0, "M" )
oPdf:Image( "files" + hb_ps() + "color.tif", 0, 0, "M" )
oPdf:EditOffHeader()
oPdf:SaveHeader( 'test.hea' )
oPdf:SaveHeader( "test.hea" )
oPdf:CloseHeader()
oPdf:BookOpen()
oPdf:NewPage( "LETTER", "P", 6 )
oPdf:BookAdd( "Grids & Borders", 1, oPdf:aReport[ REPORTPAGE ], 0 )
oPdf:BookAdd( "Simple Grid", 2, oPdf:aReport[ REPORTPAGE ], 0 )
for nI := 0 to 792 step 36
oPdf:Box( nI, 0, nI, 612, 0.01, , "D" )
next
for nI := 0 to 612 step 36
oPdf:Box( 0, nI, 792, nI, 0.01, , "D" )
next
FOR nI := 0 TO 792 STEP 36
oPdf:Box( nI, 0, nI, 612, 0.01, , "D" )
NEXT
FOR nI := 0 TO 612 STEP 36
oPdf:Box( 0, nI, 792, nI, 0.01, , "D" )
NEXT
oPdf:NewPage( "LETTER", "P", 6 )
@@ -69,121 +66,120 @@ function Main()
oPdf:Box( nRow + 80, ( nCol * 2 ) + 80, ( nRow * 3 ) + 80, ( nCol * 4 ) + 80, 0.01, 95, "D" )
oPdf:Box( nRow + 90, ( nCol * 2 ) + 90, ( nRow * 3 ) + 90, ( nCol * 4 ) + 90, 0.01, 100, "D" )
for nI := 1 to 7
FOR nI := 1 TO 7
nRow := 150 + nI * 10
for nJ := 1 to 20
nCol := nJ * 10 - 3
oPdf:Box( nRow, nCol, nRow + 10, nCol + 10, 0.01, nI * 10,"M", chr(253) + chr( cton( substr( aColor[ ( nI - 1 ) * 20 + nJ ], 1, 2 ), 16) ) + chr( cton( substr( aColor[ ( nI - 1 ) * 20 + nJ ], 3, 2 ), 16) ) + chr( cton( substr( aColor[ ( nI - 1 ) * 20 + nJ ], 5, 2 ), 16) ) )
next
next
FOR nJ := 1 TO 20
nCol := nJ * 10 - 3
oPdf:Box( nRow, nCol, nRow + 10, nCol + 10, 0.01, nI * 10, "M", Chr( 253 ) + Chr( cton( SubStr( aColor[ ( nI - 1 ) * 20 + nJ ], 1, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ ( nI - 1 ) * 20 + nJ ], 3, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ ( nI - 1 ) * 20 + nJ ], 5, 2 ), 16 ) ) )
NEXT
NEXT
oPdf:NewPage( "LETTER", "P", 6 )
oPdf:BookAdd( "Color Boxes ", 2, oPdf:aReport[ REPORTPAGE ], 0 )
for nI := 1 to 140
nTop := ( nI - 1 ) * 2.4
nLeft := ( nI - 1 ) * 2.1
nBottom := oPdf:aReport[ PAGEY ] - ( nI - 1 ) * 2.47
nRight := oPdf:aReport[ PAGEX ] - ( nI - 1 ) * 2.18
oPdf:Box1( nTop, nLeft, nBottom, nRight, 10, chr( cton( substr( aColor[ nI ], 1, 2 ), 16) ) + chr( cton( substr( aColor[ nI ], 3, 2 ), 16) ) + chr( cton( substr( aColor[ nI ], 5, 2 ), 16) ))
next
FOR nI := 1 TO 140
nTop := ( nI - 1 ) * 2.4
nLeft := ( nI - 1 ) * 2.1
nBottom := oPdf:aReport[ PAGEY ] - ( nI - 1 ) * 2.47
nRight := oPdf:aReport[ PAGEX ] - ( nI - 1 ) * 2.18
oPdf:Box1( nTop, nLeft, nBottom, nRight, 10, Chr( cton( SubStr( aColor[ nI ], 1, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ nI ], 3, 2 ), 16 ) ) + Chr( cton( SubStr( aColor[ nI ], 5, 2 ), 16 ) ) )
NEXT
oPdf:NewPage( "LETTER", "P", 6 )
oPdf:BookAdd( "Memos", 1, oPdf:aReport[ REPORTPAGE ], 0 )
oPdf:BookAdd( "Different Styles & Colors", 2, oPdf:aReport[ REPORTPAGE ], 0 )
nWidth := 90
nTab := 0
cText := memoread('files\test.txt')
cText := MemoRead( "files" + hb_ps() + "test.txt" )
oPdf:Text( cText, 28, 107.95, nWidth, nTab, 3, 'M', chr(253) + chr(0) + chr(0) + chr(255) )
oPdf:Text( cText, 58, 107.95, nWidth, nTab, 2, 'M', chr(253) + chr(0) + chr(255) + chr(0) )
oPdf:Text( cText, 88, 107.95, nWidth, nTab, 1, 'M', chr(253) + chr(255) + chr(0) + chr(0) )
oPdf:Text( cText, 118, 107.95 - nWidth / 2, nWidth, nTab, 4, 'M', chr(253) + chr(255) + chr(255) + chr(0) )
oPdf:Text( cText, 28, 107.95, nWidth, nTab, 3, "M", Chr( 253 ) + Chr( 0 ) + Chr( 0 ) + Chr( 255 ) )
oPdf:Text( cText, 58, 107.95, nWidth, nTab, 2, "M", Chr( 253 ) + Chr( 0 ) + Chr( 255 ) + Chr( 0 ) )
oPdf:Text( cText, 88, 107.95, nWidth, nTab, 1, "M", Chr( 253 ) + Chr( 255 ) + Chr( 0 ) + Chr( 0 ) )
oPdf:Text( cText, 118, 107.95 - nWidth / 2, nWidth, nTab, 4, "M", Chr( 253 ) + Chr( 255 ) + Chr( 255 ) + Chr( 0 ) )
oPdf:Text( cText, 34, 100, nWidth, nTab, 3, 'R', chr(253) + chr(0) + chr(128) + chr(128) )//, pdfTextCount( memoread('files\test.txt'), 33, 100, nWidth, nTab, 3, 'R' )
oPdf:Text( cText, 41, 100, nWidth, nTab, 2, 'R', chr(253) + chr(0) + chr(191) + chr(255) )//, pdfTextCount( memoread('files\test.txt'), 40, 100, nWidth, nTab, 2, 'R' )
oPdf:Text( cText, 48, 100, nWidth, nTab, 1, 'R', chr(253) + chr(244) + chr(164) + chr(96) )//, pdfTextCount( memoread('files\test.txt'), 47, 100, nWidth, nTab, 1, 'R' )
oPdf:Text( cText, 55, 35, nWidth, nTab, 4, 'R', chr(253) + chr(0) + chr(0) + chr(0) )//, pdfTextCount( memoread('files\test.txt'), 54, 35, nWidth, nTab, 4, 'R' )
oPdf:Text( cText, 34, 100, nWidth, nTab, 3, "R", Chr( 253 ) + Chr( 0 ) + Chr( 128 ) + Chr( 128 ) ) //, pdfTextCount( memoread( "files" + hb_ps() + "test.txt" ), 33, 100, nWidth, nTab, 3, "R" )
oPdf:Text( cText, 41, 100, nWidth, nTab, 2, "R", Chr( 253 ) + Chr( 0 ) + Chr( 191 ) + Chr( 255 ) ) //, pdfTextCount( memoread( "files" + hb_ps() + "test.txt" ), 40, 100, nWidth, nTab, 2, "R" )
oPdf:Text( cText, 48, 100, nWidth, nTab, 1, "R", Chr( 253 ) + Chr( 244 ) + Chr( 164 ) + Chr( 96 ) ) //, pdfTextCount( memoread( "files" + hb_ps() + "test.txt" ), 47, 100, nWidth, nTab, 1, "R" )
oPdf:Text( cText, 55, 35, nWidth, nTab, 4, "R", Chr( 253 ) + Chr( 0 ) + Chr( 0 ) + Chr( 0 ) ) //, pdfTextCount( memoread( "files" + hb_ps() + "test.txt" ), 54, 35, nWidth, nTab, 4, "R" )
oPdf:NewPage( "LETTER", "P", 6 )
oPdf:BookAdd( "Fonts", 1, oPdf:aReport[ REPORTPAGE ], 0 )
oPdf:BookAdd( "Different Styles", 2, oPdf:aReport[ REPORTPAGE ], 0 )
nK := 6
for nI := 1 to len( aFonts ) // Fonts
FOR nI := 1 TO Len( aFonts ) // Fonts
++nk
for nJ := 1 to 4 // Styles
if aFonts[ nI ][ nJ + 1 ]
FOR nJ := 1 TO 4 // Styles
IF aFonts[ nI ][ nJ + 1 ]
oPdf:SetFont( aFonts[ nI ][ 1 ], nJ - 1, oPdf:aReport[ FONTSIZE ] )
oPdf:RJust("This is a test for " + aFonts[ nI ][ 1 ] + " " + ;
aStyle[ nJ ], nK++, oPdf:aReport[ REPORTWIDTH ], "R")
endif
next
oPdf:RJust(oPdf:Underline("Underline"), nK++, oPdf:aReport[ REPORTWIDTH ], "R")
oPdf:RJust(oPdf:Reverse("Test"), nK, oPdf:aReport[ REPORTWIDTH ], "R")
next
oPdf:RJust( "This is a test for " + aFonts[ nI ][ 1 ] + " " + ;
aStyle[ nJ ], nK++, oPdf:aReport[ REPORTWIDTH ], "R" )
ENDIF
NEXT
oPdf:RJust( oPdf:Underline( "Underline" ), nK++, oPdf:aReport[ REPORTWIDTH ], "R" )
oPdf:RJust( oPdf:Reverse( "Test" ), nK, oPdf:aReport[ REPORTWIDTH ], "R" )
NEXT
oPdf:NewPage( "LETTER", "P", 6 )
oPdf:BookAdd( "Pictures", 1, oPdf:aReport[ REPORTPAGE ], 0 )
oPdf:BookAdd( "TIFF", 2, oPdf:aReport[ REPORTPAGE ], 0 )
// file, row, col, units, height, width
oPdf:Image( 'files\color.tif', 0, 0, "M" )
oPdf:RJust( oPdf:Underline("TIFF"), nK++, oPdf:aReport[ REPORTWIDTH ], "R")
// file, row, col, units, height, width
oPdf:Image( "files" + hb_ps() + "color.tif", 0, 0, "M" )
oPdf:RJust( oPdf:Underline( "TIFF" ), nK++, oPdf:aReport[ REPORTWIDTH ], "R" )
oPdf:NewPage( "LETTER", "P", 6 )
oPdf:BookAdd( "JPEG", 2, oPdf:aReport[ REPORTPAGE ], 0 )
oPdf:Image( 'files\color.jpg', 0, 0, "M" ) // file, row, col, units, height, width
oPdf:RJust(oPdf:Underline("JPEG"), nK, oPdf:aReport[ REPORTWIDTH ], "R")
oPdf:Image( "files" + hb_ps() + "color.jpg", 0, 0, "M" ) // file, row, col, units, height, width
oPdf:RJust( oPdf:Underline( "JPEG" ), nK, oPdf:aReport[ REPORTWIDTH ], "R" )
oPdf:OpenHeader('test.hea')
oPdf:OpenHeader( "test.hea" )
oPdf:NewPage( "LETTER", "P", 6 )
oPdf:BookAdd( "Headers", 1, oPdf:aReport[ REPORTPAGE ], 0 )
oPdf:BookAdd( "Picture Header Page 8", 2, oPdf:aReport[ REPORTPAGE ], 0 )
oPdf:AtSay( chr(253) + chr(255) + chr(0) + chr(0) + 'Red Sample of header repeating on pages 8-10', 1, 20, "R" )
oPdf:AtSay( Chr( 253 ) + Chr( 255 ) + Chr( 0 ) + Chr( 0 ) + "Red Sample of header repeating on pages 8-10", 1, 20, "R" )
oPdf:NewPage( "LETTER", "P", 6 )
oPdf:BookAdd( "Picture Header Page 9", 2, oPdf:aReport[ REPORTPAGE ], 0 )
oPdf:AtSay( chr(253) + chr(0) + chr(255) + chr(0) + 'Green Sample of header repeating on pages 8-10', 1, 20, "R" )
oPdf:AtSay( Chr( 253 ) + Chr( 0 ) + Chr( 255 ) + Chr( 0 ) + "Green Sample of header repeating on pages 8-10", 1, 20, "R" )
oPdf:NewPage( "LETTER", "P", 6 )
oPdf:BookAdd( "Picture Header Page 10", 2, oPdf:aReport[ REPORTPAGE ], 0 )
oPdf:AtSay( chr(253) + chr(0) + chr(0) + chr(255) + 'Blue Sample of header repeating on pages 8-10', 1, 20, "R" )
oPdf:AtSay( Chr( 253 ) + Chr( 0 ) + Chr( 0 ) + Chr( 255 ) + "Blue Sample of header repeating on pages 8-10", 1, 20, "R" )
oPdf:Close()
#ifndef __XPP__
oPdf:Execute( 'test.pdf' )
oPdf:Execute( "test.pdf" )
#endif
// oPdf:FilePrint()
// oPdf:FilePrint()
return nil
RETURN
//-------------------------\\
//
// This function called only used in tstPdf.prg
//
static function cton( cString, nBase )
local cTemp, nI, cChar, n := 0, nLen
nLen := len( cString )
STATIC FUNCTION cton( cString, nBase )
LOCAL cTemp, nI, cChar, n := 0, nLen
nLen := Len( cString )
cTemp := ""
for nI := nLen to 1 step -1
cTemp += substr( cString, nI, 1 )
next
cTemp := upper( cTemp )
FOR nI := nLen TO 1 step - 1
cTemp += SubStr( cString, nI, 1 )
NEXT
cTemp := Upper( cTemp )
for nI := 1 to nLen
cChar := substr( cTemp, nI, 1 )
if .not. IsDigit( cChar )
n := n + ((Asc( cChar ) - 65) + 10) * ( nBase ^ ( nI - 1 ) )
else
n := n + (( nBase ^ ( nI - 1 )) * val( cChar ))
endif
next
FOR nI := 1 TO nLen
cChar := SubStr( cTemp, nI, 1 )
IF .NOT. IsDigit( cChar )
n := n + ( ( Asc( cChar ) - 65 ) + 10 ) * ( nBase ^ ( nI - 1 ) )
ELSE
n := n + ( ( nBase ^ ( nI - 1 ) ) * Val( cChar ) )
ENDIF
NEXT
return n
//-------------------------\\
RETURN n

View File

@@ -970,9 +970,9 @@ static HB_BOOL hb_compIsUncondJump( HB_BYTE bPCode )
return bPCode == HB_P_JUMPNEAR ||
bPCode == HB_P_JUMP ||
bPCode == HB_P_JUMPFAR;
/* || bPCode == HB_P_SEQEND;
/* || bPCode == HB_P_SEQEND;
BEGIN SEQUENCE/END SEQUENCE logic could not be processed using conditional/unconditional
jumps. I set HB_P_SEQEND as conditional jump though this PCode instruction is processed
jumps. I set HB_P_SEQEND as conditional jump though this PCode instruction is processed
as unconditional jump by Harbour VM. This hack solves 'Variable is assigned but not used'
warning in code:
BEGIN SEQUENCE
@@ -1604,7 +1604,7 @@ void hb_compPCodeTraceOptimizer( HB_COMP_DECL )
* code like:
* proc main()
* local x
* if .f.
* if .F.
* x := 1
* endif
* return

View File

@@ -771,7 +771,7 @@ static void hb_gt_sln_SetBlink( PHB_GT pGT, HB_BOOL fBlink )
* outstd( <cBlinkSequence> )
* The only one thing I can make in portable way which will always
* work is disabling sending BLINK attribute to remote terminal. So
* in GTSLN like in GTCRS the function SetBlink( .f. ) does it, [Druzus]
* in GTSLN like in GTCRS the function SetBlink( .F. ) does it, [Druzus]
*/
SLtt_Blink_Mode = fBlink ? 1 : 0;

View File

@@ -319,7 +319,7 @@ METHOD SampleLabels() CLASS HBLabelForm
// Add the spaces between the label lines
FOR nField := 1 TO ::aLabelData[ LBL_LINES ]
PrintIt()
NEXT nField
NEXT
ENDIF
// Prompt for more
@@ -382,7 +382,7 @@ METHOD LoadLabel( cLblFile ) CLASS HBLabelForm
ENDIF
NEXT nPathIndex
NEXT
ENDIF

View File

@@ -274,7 +274,7 @@ METHOD New( cFrmName AS STRING,;
::nLinesLeft := ::aReportData[ RPT_LINES ]
QOUT() // output additional line on first page (S87 compatibility)
QOut() // output additional line on first page (S87 compatibility)
::nLinesLeft--
// Check to see if a "before report" eject, or TO FILE has been specified
@@ -305,7 +305,7 @@ METHOD New( cFrmName AS STRING,;
::aGroupTotals := Array( Len( ::aReportData[ RPT_GROUPS ] ) )
// Execute the actual report based on matching records
DBEval( {|| ::ExecuteReport() }, bFor, bWhile, nNext, nRecord, lRest )
dbEval( {|| ::ExecuteReport() }, bFor, bWhile, nNext, nRecord, lRest )
// Generate any totals that may have been identified
// Make a pass through all the groups
@@ -367,7 +367,7 @@ METHOD New( cFrmName AS STRING,;
lAnyTotals := .T.
EXIT
ENDIF
NEXT nCol
NEXT
IF lAnyTotals
@@ -397,7 +397,7 @@ METHOD New( cFrmName AS STRING,;
ELSE
QQOut( Space( ::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ] ) )
ENDIF
NEXT nCol
NEXT
// Send a cr/lf for the last line
QOut()
@@ -489,8 +489,8 @@ METHOD ReportHeader() CLASS HBReportForm
PadC( RTrim( XMEMOLINE( LTrim( aTempPgHeader[ nLine ] ),;
nHeadingLength, nHeadLine ) ), nHeadingLength ) )
NEXT nHeadLine
NEXT nLine
NEXT
NEXT
aPageHeader[ 1 ] := Stuff(aPageHeader[ 1 ], 1, 14, ;
__NatMsg( _RFRM_PAGENO ) + Str( ::nPageNumber, 6 ) )
@@ -509,9 +509,9 @@ METHOD ReportHeader() CLASS HBReportForm
AAdd( aPageHeader, Space( ( nRPageSize - ::aReportData[ RPT_LMARGIN ] -;
Len( cHeader ) ) / 2 ) + cHeader )
NEXT nHeadLine
NEXT
NEXT nLine
NEXT
AADD( aPageHeader, "" ) // S87 compat.
@@ -939,7 +939,7 @@ METHOD LoadReportFile( cFrmFile AS STRING ) CLASS HBReportForm
EXIT
ENDIF
NEXT nPathIndex
NEXT
ENDIF
@@ -1126,7 +1126,7 @@ METHOD LoadReportFile( cFrmFile AS STRING ) CLASS HBReportForm
AAdd( aReport[ RPT_COLUMNS ], ::GetColumn( cFieldsBuff, @nFieldOffset ) )
NEXT nCount
NEXT
ENDIF

View File

@@ -11,13 +11,13 @@ PROCEDURE Main()
IF .F. .AND. DispAndReturnNIL() // and it should not break!
ENDIF
? "Testing .t. .t."
? "Testing .T. .T."
AndOr( .T. , .T. )
? "Testing .t. .f."
? "Testing .T. .F."
AndOr( .T. , .F. )
? "Testing .f. .f."
? "Testing .F. .F."
AndOr( .F. , .F. )
? "Testing errors..."

View File

@@ -92,7 +92,7 @@ PROCEDURE Main( filename )
LOCAL vybkey := 1
IF filename == Nil
IF filename == NIL
? "Dbf browse demo"
? "Syntax:"
? "", "db_brows filename"
@@ -142,11 +142,11 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
MEMVAR str_barbox
MEMVAR str_bar
IF mslist == Nil
IF mslist == NIL
mslist := InitList()
ENDIF
IF !( Type( "str_barbox" ) == "C" )
PRIVATE str_barbox := hb_UTF8ToStrBox( "" )
PRIVATE str_barbox := hb_UTF8ToStrBox( "" )
ENDIF
IF !( Type( "str_bar" ) == "C" )
PRIVATE str_bar := /* LOW-ASCII "▼▲" */ Chr( 31 ) + Chr( 30 ) + hb_UTF8ToStr( "■" )
@@ -155,7 +155,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
LI_X1 := x1
LI_Y2 := y2
LI_X2 := x2
IF LI_MSF == Nil
IF LI_MSF == NIL
LI_COLCOUNT := FCount()
LI_MSTYP := Array( LI_COLCOUNT )
LI_MSLEN := Array( LI_COLCOUNT )
@@ -163,7 +163,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
AFields( , LI_MSTYP, LI_MSLEN, LI_MSDEC )
ELSE
LI_COLCOUNT := Len( LI_MSF )
IF LI_MSTYP == Nil
IF LI_MSTYP == NIL
LI_MSTYP := Array( LI_COLCOUNT )
LI_MSLEN := Array( LI_COLCOUNT )
LI_MSDEC := Array( LI_COLCOUNT )
@@ -201,10 +201,10 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
oldcolors := SetColor()
SetColor( LI_CLR )
@ LI_Y1, LI_X1, LI_Y2, LI_X2 BOX hb_UTF8ToStrBox( "┌─┐│┘─└│ " )
IF title != Nil
IF title != NIL
@ LI_Y1, ( LI_X2 - LI_X1 - 1 - Len( title ) ) / 2 + LI_X1 SAY " " + title + " "
ENDIF
IF title != Nil .AND. LI_NAMES != Nil
IF title != NIL .AND. LI_NAMES != NIL
LI_Y1 ++
ENDIF
razmer := LI_Y2 - LI_Y1 - 1
@@ -282,7 +282,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
KEYBOARD Chr( iif( ym == LI_Y1, 5, 24 ) )
M_HIDE()
LOOP
ELSEIF ctrl_ar != Nil
ELSEIF ctrl_ar != NIL
FOR i := 1 TO Len( ctrl_ar )
IF ValType( ctrl_ar[ i ] ) == "C"
SetColor( ctrl_ar[ i ] )
@@ -423,7 +423,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
CASE ( xkey == 13 .OR. ( xkey > 47 .AND. xkey < 58 ) .OR. ( xkey > 64 .AND. xkey < 91 ) ;
.OR. ( xkey > 96 .AND. xkey < 123 ) .OR. ( xkey > 127 .AND. xkey < 176 ) .OR. ( xkey > 223 .AND. xkey < 240 ) ) .AND. predit > 1 // Enter
fipos := LI_COLPOS + LI_NLEFT - 1 - LI_FREEZE
IF LI_WHEN == Nil .OR. Len( LI_WHEN ) < fipos .OR. LI_WHEN[ fipos ] == Nil .OR. Eval( LI_WHEN[ fipos ] )
IF LI_WHEN == NIL .OR. Len( LI_WHEN ) < fipos .OR. LI_WHEN[ fipos ] == NIL .OR. Eval( LI_WHEN[ fipos ] )
IF ValType( LI_MSED ) != "N"
vartmp := iif( Len( LI_MSED ) < fipos, 1, LI_MSED[ fipos ] )
IF ValType( vartmp ) == "N"
@@ -442,7 +442,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
vartmp := ReadExit( .T. )
varbuf := FieldGet( fipos )
@ LI_NSTR + LI_Y1, LI_XPOS GET varbuf PICTURE Defpict( mslist, fipos, LI_X2 - LI_X1 - 3 )
IF LI_VALID != Nil .AND. Len( LI_VALID ) >= fipos .AND. LI_VALID[ fipos ] != Nil
IF LI_VALID != NIL .AND. Len( LI_VALID ) >= fipos .AND. LI_VALID[ fipos ] != NIL
Getlist[ 1 ] :postBlock := LI_VALID[ fipos ]
ENDIF
READ
@@ -458,7 +458,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
ENDIF
ENDIF
ENDIF
IF LI_BDESHOUT != Nil .AND. ValType( varbuf ) == "C"
IF LI_BDESHOUT != NIL .AND. ValType( varbuf ) == "C"
varbuf := Eval( LI_BDESHOUT, mslist, varbuf )
ENDIF
FieldPut( fipos, varbuf )
@@ -482,14 +482,14 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
CASE xkey == 27 // Esc
rez := .F.
rezproc := 0
CASE xkey == - 1 .AND. ( maskey == Nil .OR. AScan( maskey, xkey ) == 0 ) // F2
CASE xkey == - 1 .AND. ( maskey == NIL .OR. AScan( maskey, xkey ) == 0 ) // F2
IF predit == 1
predit := predxx
ELSEIF predit > 1
predit := 1
ENDIF
OTHERWISE
IF maskey != Nil
IF maskey != NIL
IF AScan( maskey, xkey ) != 0
rez := .F.
rezproc := xkey
@@ -532,7 +532,7 @@ FUNCTION DBFLIST( mslist, x1, y1, x2, y2, title, maskey )
ENDDO
IF LI_LSOHR
RestScreen( iif( title != Nil .AND. LI_NAMES != Nil, LI_Y1 - 1, LI_Y1 ), LI_X1, LI_Y2, LI_X2, wndbuf )
RestScreen( iif( title != NIL .AND. LI_NAMES != NIL, LI_Y1 - 1, LI_Y1 ), LI_X1, LI_Y2, LI_X2, wndbuf )
ELSE
SetColor( LI_CLRV )
VIVSTR( mslist, LI_NSTR + LI_Y1, iif( predit > 1, LI_COLPOS, 0 ) )
@@ -556,7 +556,7 @@ FUNCTION FLDCOUNT( mslist, xstrt, xend, fld1 )
LOCAL klf := 0, i := iif( LI_FREEZE > 0, 1, fld1 )
DO WHILE .T.
xstrt += Max( Len( FLDSTR( mslist, i ) ), iif( LI_NAMES != Nil .AND. Len( LI_NAMES ) >= i, Len( LI_NAMES[ i ] ), 0 ) ) - 1
xstrt += Max( Len( FLDSTR( mslist, i ) ), iif( LI_NAMES != NIL .AND. Len( LI_NAMES ) >= i, Len( LI_NAMES[ i ] ), 0 ) ) - 1
IF xstrt > xend
EXIT
ENDIF
@@ -583,16 +583,16 @@ FUNCTION VIVNAMES( mslist )
LOCAL i := 1, x, oldc, fif
IF LI_NAMES != Nil
IF LI_NAMES != NIL
x := LI_X1 + 2
IF LI_NMCLR != Nil
IF LI_NMCLR != NIL
oldc := SetColor( LI_NMCLR )
ENDIF
@ LI_Y1, x - 1 CLEAR TO LI_Y1, LI_X2 - 1
fif := iif( LI_FREEZE > 0, 1, LI_NLEFT )
// DO MSFNEXT WITH mslist,fif
DO WHILE i <= LI_NCOLUMNS .AND. fif <= Len( LI_NAMES )
IF LI_NAMES[ fif ] != Nil
IF LI_NAMES[ fif ] != NIL
@ LI_Y1, x SAY LI_NAMES[ fif ]
ENDIF
x := x + Max( Len( FLDSTR( mslist, fif ) ), Len( LI_NAMES[ fif ] ) ) + 1
@@ -600,12 +600,12 @@ FUNCTION VIVNAMES( mslist )
// DO MSFNEXT WITH mslist,fif
i ++
ENDDO
IF LI_NMCLR != Nil
IF LI_NMCLR != NIL
SetColor( oldc )
ENDIF
ENDIF
RETURN Nil
RETURN NIL
//+--------------------------------------------------------------------
//+
@@ -677,7 +677,7 @@ STATIC PROCEDURE VIVSTR( mslist, nstroka, vybfld )
sviv := FLDSTR( mslist, fif )
sviv := iif( Len( sviv ) < LI_X2 - 1 - x, sviv, SubStr( sviv, 1, LI_X2 - 1 - x ) )
ENDIF
x := x + Max( Len( sviv ), iif( LI_NAMES != Nil .AND. Len( LI_NAMES ) >= fif, Len( LI_NAMES[ fif ] ), 0 ) ) + 1
x := x + Max( Len( sviv ), iif( LI_NAMES != NIL .AND. Len( LI_NAMES ) >= fif, Len( LI_NAMES[ fif ] ), 0 ) ) + 1
fif := iif( fif == LI_FREEZE, LI_NLEFT, fif + 1 )
NEXT
// DO MSFNEXT WITH mslist,fif
@@ -708,7 +708,7 @@ FUNCTION FLDSTR( mslist, numf )
LOCAL fldtype, rez, vartmp
IF LI_MSF != Nil
IF LI_MSF != NIL
IF numf <= Len( LI_MSF )
vartmp := LI_MSF[ numf ]
IF ( fldtype := ValType( vartmp ) ) == "B"
@@ -742,7 +742,7 @@ FUNCTION FLDSTR( mslist, numf )
CASE fldtype == "M"
rez := " <Memo> "
ENDCASE
IF LI_BDESHIN != Nil
IF LI_BDESHIN != NIL
rez := Eval( LI_BDESHIN, mslist, rez )
ENDIF
@@ -796,7 +796,7 @@ FUNCTION InitList
LI_BGOTO := {| a, n | HB_SYMBOL_UNUSED( a ), dbGoto( n ) }
LI_PRFLT := LI_LVIEW := .F.
LI_LSOHR := .T.
LI_BDESHIN := LI_BDESHOUT := LI_MSF := LI_MSTYP := LI_NAMES := Nil
LI_BDESHIN := LI_BDESHOUT := LI_MSF := LI_MSTYP := LI_NAMES := NIL
LI_TEKZP := 1
RETURN mslist
@@ -816,7 +816,7 @@ FUNCTION Defpict( mslist, i, maxlen )
LOCAL spict, fldd, fldtype := LI_MSTYP[ i ], fldlen := LI_MSLEN[ i ]
DO CASE
CASE fldtype == "C"
spict := iif( maxlen == Nil, Replicate( "X", fldlen ), "@S" + NUM_STR( maxlen, 2 ) )
spict := iif( maxlen == NIL, Replicate( "X", fldlen ), "@S" + NUM_STR( maxlen, 2 ) )
CASE fldtype == "N"
fldd := LI_MSDEC[ i ]
spict := iif( fldd == 0, Replicate( "9", fldlen ), Replicate( "9", fldlen - 1 - fldd ) + "." + Replicate( "9", fldd ) )

View File

@@ -55,7 +55,7 @@ PROCEDURE Main( cTermCP, cHostCP, lBoxChar )
? "Host codpage: " + cHostCP + ", terminal codepage: " + cTermCP
?
//HB_GTINFO(HB_GTI_COMPATBUFFER,.f.)
// hb_gtInfo( HB_GTI_COMPATBUFFER, .F. )
?
FOR i := 0 TO 15
FOR j := 0 TO 15

View File

@@ -35,7 +35,7 @@ proc main()
aFill( s_aCounters, 0 )
aThreads := {}
s_hMutex := hb_mutexCreate()
lEnd := .f.
lEnd := .F.
? "Starting threads: "
for i := 1 to N_THREADS
aadd( aThreads, hb_threadStart( @thFunc(), i, @lEnd ) )
@@ -43,7 +43,7 @@ proc main()
next
? "Wait 5 seconds or hit any key..."
inkey( 5 )
lEnd := .t.
lEnd := .T.
? "Waiting for threads..."
aEval( aThreads, {| x | hb_threadJoin( x ) } )
? "Threads joined"

View File

@@ -39,7 +39,7 @@ proc main()
? "Waiting for threads"
while inkey() != K_ESC
if hb_threadWait( aThreads, 0.1, .t. ) == len( aThreads )
if hb_threadWait( aThreads, 0.1, .T. ) == len( aThreads )
wait
exit
endif

View File

@@ -47,7 +47,7 @@ PROCEDURE Main()
// Now mix with statements and functions
? ( 1, 2, 3 )
IF ( y := .t. )
IF ( y := .T. )
? "Working"
ELSE
? "Borken"

View File

@@ -187,7 +187,7 @@ elseif valtype( itm ) == "C"
elseif valtype( itm ) == "N"
cStr += ltrim( str( itm ) )
elseif valtype( itm ) == "L"
cStr += iif( itm, ".t.", ".f." )
cStr += iif( itm, ".T.", ".F." )
elseif valtype( itm ) == "D"
cStr += "CTOD(" + DTOC( itm ) + ")"
elseif valtype( itm ) == "B"
@@ -223,7 +223,7 @@ return cStr
#else
//rddtst_tst( #<x>, <s>, <x>, <r> )
static function rddtst_tst( cAction, aExState, xRet, xExRet )
local aState, lOK := ( .t. ), s1, s2, i
local aState, lOK := ( .T. ), s1, s2, i
aState := rdd_state()
if pcount() >= 4
@@ -232,7 +232,7 @@ return cStr
endif
if ! valtype( xRet ) == valtype( xExRet ) .or.;
! iif( valtype( xRet ) == "B", eval( xRet ) == eval( xExRet ), xRet == xExRet )
lOK:= ( .f. )
lOK := ( .F. )
endif
s1 := itm2str( xRet )
s2 := itm2str( xExRet )
@@ -244,7 +244,7 @@ return cStr
if !empty( aExState ) .and. lOK
for i := 1 to len( aExState )
if ! valtype( aState[ i ] ) == valtype( aExState[ i ] ) .or. ! aState[ i ] == aExState[ i ]
lOK := ( .f. )
lOK := ( .F. )
exit
endif
next

View File

@@ -1,4 +1,3 @@
//NOTEST
/*
* $Id$
*/
@@ -8,7 +7,7 @@
PROCEDURE Main()
QOut( ["'/* bumbulda */45]="k" )
? ["'/* bumbulda */45]="k"
TEXT
any text is allowed here

View File

@@ -84,7 +84,7 @@ PROCEDURE Main_MISC()
TEST_LINE( Len( oError ) , 12 )
#endif
/* SET()s */
/* Set()s */
TEST_LINE( Set( _SET_MARGIN ) , 0 )
TEST_LINE( Set( _SET_MARGIN , -1 ) , "E 1 BASE 2020 Argument error (SET) OS:0 #:0 A:2:N:25;N:-1 " )

View File

@@ -254,7 +254,7 @@ PROCEDURE Main_STRA()
RETURN
PROCEDURE Comp_Str()
LOCAL old_exact := SET( _SET_EXACT, .F. )
LOCAL old_exact := Set( _SET_EXACT, .F. )
TEST_LINE( "ABC" == "", .F. )
TEST_LINE( "ABC" = "", .T. )
@@ -362,11 +362,11 @@ PROCEDURE Comp_Str()
TEST_LINE( "DEF" > "ABCD", .T. )
TEST_LINE( "DEF" >= "ABCD", .T. )
SET( _SET_EXACT, old_exact )
Set( _SET_EXACT, old_exact )
RETURN
PROCEDURE Exact_Str()
LOCAL old_exact := SET( _SET_EXACT, .T. )
LOCAL old_exact := Set( _SET_EXACT, .T. )
TEST_LINE( "ABC" == "", .F. )
TEST_LINE( "ABC" = "", .F. )
@@ -474,7 +474,7 @@ PROCEDURE Exact_Str()
TEST_LINE( "DEF" > "ABCD", .T. )
TEST_LINE( "DEF" >= "ABCD", .T. )
SET( _SET_EXACT, old_exact )
Set( _SET_EXACT, old_exact )
RETURN

View File

@@ -454,7 +454,7 @@ PROCEDURE Main_TRANS()
TEST_LINE( Transform(sdDate, "") , "84.03.25" )
TEST_LINE( Transform(sdDate, "@Z") , " " )
SET(_SET_DATEFORMAT, "DD/MMM/YYYY")
Set( _SET_DATEFORMAT, "DD/MMM/YYYY" )
TEST_LINE( Transform( .T., "#") , "T" )
TEST_LINE( Transform( .F., "#") , "F" )
@@ -675,20 +675,20 @@ PROCEDURE Main_TRANS()
TEST_LINE( Transform( 1234567890123456789, "99999999999999999999" ) , " 1234567890123457000" )
TEST_LINE( Transform( -1234567890123456789, "99999999999999999999" ) , "-1234567890123457000" )
#endif
SET( _SET_DATEFORMAT, "YYYY/MM/DD" )
Set( _SET_DATEFORMAT, "YYYY/MM/DD" )
TEST_LINE( Transform( 12345678, "@D" ), "1234/56/78" )
SET( _SET_DATEFORMAT, "YYYY.MM.DD" )
Set( _SET_DATEFORMAT, "YYYY.MM.DD" )
TEST_LINE( Transform( 1234.56789, "@D" ), "1234.56.9 " )
SET( _SET_DATEFORMAT, "YYYY.MM:DD" )
Set( _SET_DATEFORMAT, "YYYY.MM:DD" )
TEST_LINE( Transform( 1234.56789, "@D" ), "1234.56:79" )
TEST_LINE( Transform( 123.345678912, "@D" ), " 123.34:57" )
SET( _SET_DATEFORMAT, "MM-DD-YYYY" )
TEST_LINE( Transform( .t., "@RE <|,yY#lL,|>" ) , "99-99-9999T" )
TEST_LINE( Transform( .f., "@RE <|,yY#lL,|>" ) , "99-99-9999F" )
TEST_LINE( Transform( .t., "@RD <|,yY#lL,|>" ) , "99-99-9999T" )
TEST_LINE( Transform( .f., "@RD <|,yY#lL,|>" ) , "99-99-9999F" )
TEST_LINE( Transform( .f., "@DE <|,yY#lL,|>" ) , "9" )
Set( _SET_DATEFORMAT, "MM-DD-YYYY" )
TEST_LINE( Transform( .T., "@RE <|,yY#lL,|>" ) , "99-99-9999T" )
TEST_LINE( Transform( .F., "@RE <|,yY#lL,|>" ) , "99-99-9999F" )
TEST_LINE( Transform( .T., "@RD <|,yY#lL,|>" ) , "99-99-9999T" )
TEST_LINE( Transform( .F., "@RD <|,yY#lL,|>" ) , "99-99-9999F" )
TEST_LINE( Transform( .F., "@DE <|,yY#lL,|>" ) , "9" )
TEST_LINE( Transform( "abcdefghij", "@S15! <XXXXXXXX>" ) , "<BCDEFGHI>" )
TEST_LINE( Transform( "abcdefghij", "@S0! <XXXXXXXX>" ) , "<BCDEFGHI>" )
@@ -775,9 +775,9 @@ PROCEDURE Main_TRANS()
TEST_LINE( Transform( 123456789.12, "@,39 999,999,999.99" ) , "123,456,789.12" )
TEST_LINE( Transform( 123.456, "@R 9 9 9.9" ) , "1 2 3.5" )
SET( _SET_FIXED, cOldFixed )
SET( _SET_DECIMALS, cOldDecim )
SET( _SET_DATEFORMAT, cOldDate )
Set( _SET_FIXED, cOldFixed )
Set( _SET_DECIMALS, cOldDecim )
Set( _SET_DATEFORMAT, cOldDate )
RETURN