2000-06-25 14:53 UTC+0100 Victor Szakats <info@szelvesz.hu>
This commit is contained in:
@@ -1,3 +1,17 @@
|
||||
2000-06-25 14:53 UTC+0100 Victor Szakats <info@szelvesz.hu>
|
||||
|
||||
* source/rtl/tget.prg
|
||||
! Fixed to not depend on SET EXACT.
|
||||
|
||||
* source/rtl/treport.prg
|
||||
* source/rtl/tbrowse.prg
|
||||
* source/debug/dbgtwin.prg
|
||||
* source/debug/debugger.prg
|
||||
* if() -> iif()
|
||||
|
||||
* source/rtl/tclass.prg
|
||||
% Optimized, formatted.
|
||||
|
||||
2000-06-25 14:25 UTC+0100 Victor Szakats <info@szelvesz.hu>
|
||||
|
||||
* tests/onidle.prg
|
||||
|
||||
@@ -82,8 +82,8 @@ return Self
|
||||
|
||||
METHOD Hide() CLASS TDbWindow
|
||||
|
||||
RestScreen( ::nTop, ::nLeft, ::nBottom + If( ::lShadow, 1, 0 ),;
|
||||
::nRight + If( ::lShadow, 2, 0 ), ::cBackImage )
|
||||
RestScreen( ::nTop, ::nLeft, ::nBottom + iif( ::lShadow, 1, 0 ),;
|
||||
::nRight + iif( ::lShadow, 2, 0 ), ::cBackImage )
|
||||
::cBackImage := nil
|
||||
|
||||
return nil
|
||||
@@ -104,7 +104,7 @@ return nil
|
||||
|
||||
METHOD SetCaption( cCaption ) CLASS TDbWindow
|
||||
|
||||
local nOldLen := If( ::cCaption != nil, Len( ::cCaption ), 0 )
|
||||
local nOldLen := iif( ::cCaption != nil, Len( ::cCaption ), 0 )
|
||||
|
||||
::cCaption := cCaption
|
||||
|
||||
@@ -126,7 +126,7 @@ METHOD SetFocus( lOnOff ) CLASS TDbWindow
|
||||
|
||||
::lFocused := lOnOff
|
||||
|
||||
@ ::nTop, ::nLeft, ::nBottom, ::nRight BOX If( lOnOff, B_DOUBLE, B_SINGLE ) ;
|
||||
@ ::nTop, ::nLeft, ::nBottom, ::nRight BOX iif( lOnOff, B_DOUBLE, B_SINGLE ) ;
|
||||
COLOR ::cColor
|
||||
|
||||
DispOutAt( ::nTop, ::nLeft + 1, "[" + Chr( 254 ) + "]", ::cColor )
|
||||
@@ -151,8 +151,8 @@ METHOD Show( lFocused ) CLASS TDbWindow
|
||||
|
||||
DEFAULT lFocused TO .f.
|
||||
|
||||
::cBackImage := SaveScreen( ::nTop, ::nLeft, ::nBottom + If( ::lShadow, 1, 0 ),;
|
||||
::nRight + If( ::lShadow, 2, 0 ) )
|
||||
::cBackImage := SaveScreen( ::nTop, ::nLeft, ::nBottom + iif( ::lShadow, 1, 0 ),;
|
||||
::nRight + iif( ::lShadow, 2, 0 ) )
|
||||
SetColor( ::cColor )
|
||||
Scroll( ::nTop, ::nLeft, ::nBottom, ::nRight )
|
||||
::SetFocus( lFocused )
|
||||
|
||||
@@ -211,7 +211,7 @@ METHOD BuildCommandWindow() CLASS TDebugger
|
||||
cCommand := Space( ::oWndCommand:nRight - ::oWndCommand:nLeft - 3 )
|
||||
// We don't use the GET command here to avoid the painting of the GET
|
||||
AAdd( GetList, TGet():New( ::oWndCommand:nBottom - 1, ::oWndCommand:nLeft + 3,;
|
||||
{ | u | If( PCount() > 0, cCommand := u, cCommand ) }, "cCommand" ) )
|
||||
{ | u | iif( PCount() > 0, cCommand := u, cCommand ) }, "cCommand" ) )
|
||||
ATail( GetList ):ColorSpec := Replicate( ::oWndCommand:cColor + ",", 5 )
|
||||
::oGetListCommand := TGetList():New( GetList )
|
||||
|
||||
@@ -530,7 +530,7 @@ METHOD ShowCallStack() CLASS TDebugger
|
||||
::oBrwStack:GoTopBlock := { || n := 1 }
|
||||
::oBrwStack:GoBottomBlock := { || n := Len( ::aCallStack ) }
|
||||
::oBrwStack:SkipBlock := { | nSkip, nPos | nPos := n,;
|
||||
n := If( nSkip > 0, Min( Len( ::aCallStack ), n + nSkip ),;
|
||||
n := iif( nSkip > 0, Min( Len( ::aCallStack ), n + nSkip ),;
|
||||
Max( 1, n + nSkip ) ), n - nPos }
|
||||
|
||||
::oBrwStack:AddColumn( TBColumnNew( "", { || PadC( ::aCallStack[ n ], 14 ) } ) )
|
||||
@@ -572,22 +572,22 @@ METHOD ShowVars() CLASS TDebugger
|
||||
::oBrwText:RefreshAll()
|
||||
::oWndCode:SetFocus( .t. )
|
||||
::oWndVars := TDbWindow():New( 1, 0, 5,;
|
||||
MaxCol() - If( ::oWndStack != nil, ::oWndStack:nWidth(), 0 ),;
|
||||
MaxCol() - iif( ::oWndStack != nil, ::oWndStack:nWidth(), 0 ),;
|
||||
"Monitor", "BG+/B" )
|
||||
::oWndVars:Show( .f. )
|
||||
AAdd( ::aWindows, ::oWndVars )
|
||||
::oWndVars:bKeyPressed := { | nKey | If( nKey == K_DOWN, ( ::oBrwVars:Down(),;
|
||||
::oBrwVars:ForceStable() ), nil ), If( nKey == K_UP, ( ::oBrwVars:Up(),;
|
||||
::oBrwVars:ForceStable() ), nil ), If( nKey == K_ENTER, ::EditVar( n ), nil ) }
|
||||
::oWndVars:bKeyPressed := { | nKey | iif( nKey == K_DOWN, ( ::oBrwVars:Down(),;
|
||||
::oBrwVars:ForceStable() ), nil ), iif( nKey == K_UP, ( ::oBrwVars:Up(),;
|
||||
::oBrwVars:ForceStable() ), nil ), iif( nKey == K_ENTER, ::EditVar( n ), nil ) }
|
||||
|
||||
::oBrwVars := TBrowseNew( 2, 1, 4, MaxCol() - If( ::oWndStack != nil,;
|
||||
::oBrwVars := TBrowseNew( 2, 1, 4, MaxCol() - iif( ::oWndStack != nil,;
|
||||
::oWndStack:nWidth(), 0 ) - 1 )
|
||||
::oBrwVars:ColorSpec := "BG+/B, N/BG"
|
||||
::LoadVars()
|
||||
::oBrwVars:GoTopBlock := { || n := 1 }
|
||||
::oBrwVars:GoBottomBlock := { || n := Len( ::aVars ) }
|
||||
::oBrwVars:SkipBlock := { | nSkip, nPos | nPos := n,;
|
||||
n := If( nSkip > 0, Min( Len( ::aVars ), n + nSkip ),;
|
||||
n := iif( nSkip > 0, Min( Len( ::aVars ), n + nSkip ),;
|
||||
Max( 1, n + nSkip ) ), n - nPos }
|
||||
|
||||
nWidth := ::oWndVars:nWidth() - 1
|
||||
@@ -639,7 +639,7 @@ METHOD ShowCode( cModuleName ) CLASS TDebugger
|
||||
::oBrwText := TBrwText():New( ::oWndCode:nTop + 1, ::oWndCode:nLeft + 1,;
|
||||
::oWndCode:nBottom - 1, ::oWndCode:nRight - 1, ::cPrgName, "BG+/B, N/BG, W+/R, W+/BG" )
|
||||
|
||||
::oBrwText:aColumns[ 1 ]:ColorBlock := { || If( AScan( ::aBreakPoints,;
|
||||
::oBrwText:aColumns[ 1 ]:ColorBlock := { || iif( AScan( ::aBreakPoints,;
|
||||
CompareLine( Self ) ) != 0, { 3, 4 }, { 1, 2 } ) }
|
||||
|
||||
::oBrwText:ForceStable()
|
||||
@@ -682,7 +682,7 @@ METHOD InputBox( cMsg, uValue, bValid ) CLASS TDebugger
|
||||
oWndInput:Hide()
|
||||
Set( _SET_SCOREBOARD, lScoreBoard )
|
||||
|
||||
return If( LastKey() != K_ESC, AllTrim( uTemp ), uValue )
|
||||
return iif( LastKey() != K_ESC, AllTrim( uTemp ), uValue )
|
||||
|
||||
METHOD IsBreakPoint( nLine ) CLASS TDebugger
|
||||
|
||||
@@ -769,13 +769,13 @@ METHOD ViewSets() CLASS TDebugger
|
||||
oBrwSets:GoTopBlock := { || n := 1 }
|
||||
oBrwSets:GoBottomBlock := { || n := Len( aSets ) }
|
||||
oBrwSets:SkipBlock := { | nSkip, nPos | nPos := n,;
|
||||
n := If( nSkip > 0, Min( Len( aSets ), n + nSkip ),;
|
||||
n := iif( nSkip > 0, Min( Len( aSets ), n + nSkip ),;
|
||||
Max( 1, n + nSkip ) ), n - nPos }
|
||||
oBrwSets:AddColumn( TBColumnNew( "", { || PadR( aSets[ n ], 12 ) } ) )
|
||||
oBrwSets:AddColumn( oCol := TBColumnNew( "",;
|
||||
{ || PadR( ValToStr( Set( n ) ), nWidth - 13 ) } ) )
|
||||
oBrwSets:Cargo := 1 // Actual highligthed row
|
||||
oCol:ColorBlock := { || { If( n == oBrwSets:Cargo, 3, 1 ), 3 } }
|
||||
oCol:ColorBlock := { || { iif( n == oBrwSets:Cargo, 3, 1 ), 3 } }
|
||||
|
||||
oWndSets:bPainted := { || oBrwSets:ForceStable() }
|
||||
oWndSets:bKeyPressed := { | nKey | SetsKeyPressed( nKey, oBrwSets, Len( aSets ),;
|
||||
@@ -887,7 +887,7 @@ static function ValToStr( uVal )
|
||||
cResult := '"' + uVal + '"'
|
||||
|
||||
case cType == "L"
|
||||
cResult := If( uVal, ".T.", ".F." )
|
||||
cResult := iif( uVal, ".T.", ".F." )
|
||||
|
||||
case cType == "D"
|
||||
cResult := DToC( uVal )
|
||||
|
||||
@@ -119,7 +119,7 @@ CLASS TBrowse
|
||||
METHOD ColCount() INLINE Len( ::aColumns )
|
||||
METHOD ColorRect() // Alters the color of a rectangular group of cells
|
||||
// Returns the display width of a particular column
|
||||
METHOD ColWidth( nColumn ) INLINE If( 0 < nColumn .and. nColumn <= Len( ::aColumns ),;
|
||||
METHOD ColWidth( nColumn ) INLINE iif( 0 < nColumn .and. nColumn <= Len( ::aColumns ),;
|
||||
::aColumns[ nColumn ]:Width, NIL )
|
||||
METHOD Configure( nMode ) VIRTUAL // Reconfigures the internal settings of the TBrowse object
|
||||
// nMode is an undocumented parameter in CA-Cl*pper
|
||||
@@ -130,7 +130,7 @@ CLASS TBrowse
|
||||
|
||||
METHOD ForceStable() // Performs a full stabilization
|
||||
|
||||
METHOD GetColumn( nColumn ) INLINE If( 0 < nColumn .and. nColumn <= Len( ::aColumns ),;
|
||||
METHOD GetColumn( nColumn ) INLINE iif( 0 < nColumn .and. nColumn <= Len( ::aColumns ),;
|
||||
::aColumns[ nColumn ], NIL ) // Gets a specific TBColumn object
|
||||
|
||||
METHOD Hilite() // Highlights the current cell
|
||||
@@ -144,7 +144,7 @@ CLASS TBrowse
|
||||
METHOD RefreshAll() INLINE ::Invalidate() // Causes all data to be recalculated during the next stabilize
|
||||
METHOD RefreshCurrent() INLINE ::aRedraw[ ::RowPos ] := .f., ::Stable := .f., Self // Causes the current row to be refilled and repainted on next stabilize
|
||||
|
||||
METHOD SetColumn( nColumn, oCol ) INLINE If( 0 < nColumn .and. nColumn <= Len( ::aColumns ),;
|
||||
METHOD SetColumn( nColumn, oCol ) INLINE iif( 0 < nColumn .and. nColumn <= Len( ::aColumns ),;
|
||||
::aColumns[ nColumn ] := oCol, NIL ), oCol // Replaces one TBColumn object with another
|
||||
|
||||
METHOD Stabilize() // Performs incremental stabilization
|
||||
@@ -203,7 +203,7 @@ METHOD Down() CLASS TBrowse
|
||||
::Hilite()
|
||||
::RelativePos++
|
||||
else
|
||||
n := ::nTop + If( ::lHeaders, 1, 0 ) + If( Empty( ::HeadSep ), 0, 1 )
|
||||
n := ::nTop + iif( ::lHeaders, 1, 0 ) + iif( Empty( ::HeadSep ), 0, 1 )
|
||||
Scroll( n, ::nLeft, n + ::RowCount - 1, ::nRight, 1 )
|
||||
::RefreshCurrent()
|
||||
endif
|
||||
@@ -269,9 +269,9 @@ METHOD Invalidate() CLASS TBrowse
|
||||
endif
|
||||
next
|
||||
|
||||
::RowCount := ::nBottom - ::nTop + 1 - If( ::lHeaders, 1, 0 ) - ;
|
||||
If( lFooters, 1, 0 ) - If( Empty( ::HeadSep ), 0, 1 ) - ;
|
||||
If( Empty( ::FootSep ), 0, 1 )
|
||||
::RowCount := ::nBottom - ::nTop + 1 - iif( ::lHeaders, 1, 0 ) - ;
|
||||
iif( lFooters, 1, 0 ) - iif( Empty( ::HeadSep ), 0, 1 ) - ;
|
||||
iif( Empty( ::FootSep ), 0, 1 )
|
||||
|
||||
AFill( ::aRedraw, .f. )
|
||||
|
||||
@@ -313,7 +313,7 @@ METHOD LeftDetermine() CLASS TBrowse
|
||||
for nCol := 1 TO ::Freeze
|
||||
nWidth += ::aColumns[ nCol ]:Width
|
||||
if nCol < Len( ::aColumns )
|
||||
nWidth += If( ::aColumns[ nCol + 1 ]:ColSep != NIL,;
|
||||
nWidth += iif( ::aColumns[ nCol + 1 ]:ColSep != NIL,;
|
||||
Len( ::aColumns[ nCol + 1 ]:ColSep ),;
|
||||
Len( ::ColSep ) )
|
||||
endif
|
||||
@@ -323,7 +323,7 @@ METHOD LeftDetermine() CLASS TBrowse
|
||||
for nCol := ::rightVisible to ::Freeze + 1 step -1
|
||||
|
||||
nWidth += ::aColumns[ nCol ]:Width +;
|
||||
If( ::aColumns[ nCol ]:ColSep != NIL,;
|
||||
iif( ::aColumns[ nCol ]:ColSep != NIL,;
|
||||
Len( ::aColumns[ nCol ]:ColSep ),;
|
||||
Len( ::ColSep ) )
|
||||
|
||||
@@ -453,11 +453,11 @@ return Self
|
||||
|
||||
METHOD DeHilite() CLASS TBrowse
|
||||
|
||||
local nColor := If( ::aColumns[ ::ColPos ]:ColorBlock != NIL,;
|
||||
local nColor := iif( ::aColumns[ ::ColPos ]:ColorBlock != NIL,;
|
||||
Eval( ::aColumns[ ::ColPos ]:ColorBlock,;
|
||||
Eval( ::aColumns[ ::ColPos ]:Block ) )[ 1 ], 1 )
|
||||
local cColor := hb_ColorIndex( ::ColorSpec, nColor - 1 )
|
||||
local nRow := ::nTop + ::RowPos - If( ::lHeaders, 0, 1 ) + If( Empty( ::HeadSep ), 0, 1 )
|
||||
local nRow := ::nTop + ::RowPos - iif( ::lHeaders, 0, 1 ) + iif( Empty( ::HeadSep ), 0, 1 )
|
||||
local nCol := ::aColumns[ ::ColPos ]:ColPos
|
||||
|
||||
SetPos( nRow, nCol )
|
||||
@@ -482,11 +482,11 @@ METHOD Hilite() CLASS TBrowse
|
||||
|
||||
if ::AutoLite
|
||||
|
||||
nColor := If( ::aColumns[ ::ColPos ]:ColorBlock != NIL,;
|
||||
nColor := iif( ::aColumns[ ::ColPos ]:ColorBlock != NIL,;
|
||||
Eval( ::aColumns[ ::ColPos ]:ColorBlock,;
|
||||
Eval( ::aColumns[ ::ColPos ]:Block ) )[ 2 ], 2 )
|
||||
cColor := hb_ColorIndex( ::ColorSpec, nColor - 1 )
|
||||
nRow := ::nTop + ::RowPos - If( ::lHeaders, 0, 1 ) + If( Empty( ::HeadSep ), 0, 1 )
|
||||
nRow := ::nTop + ::RowPos - iif( ::lHeaders, 0, 1 ) + iif( Empty( ::HeadSep ), 0, 1 )
|
||||
nCol := ::aColumns[ ::ColPos ]:ColPos
|
||||
|
||||
SetPos( nRow, nCol )
|
||||
@@ -534,7 +534,7 @@ METHOD Stabilize() CLASS TBrowse
|
||||
nToAdd := ::aColumns[ nColsVisible + 1 ]:Width
|
||||
|
||||
if nColsVisible >= 1 .and. nColsVisible < Len( ::aColumns )
|
||||
nToAdd += If( ::aColumns[ nColsVisible + 1 ]:ColSep != NIL,;
|
||||
nToAdd += iif( ::aColumns[ nColsVisible + 1 ]:ColSep != NIL,;
|
||||
Len( ::aColumns[ nColsVisible + 1 ]:ColSep ),;
|
||||
Len( ::ColSep ) )
|
||||
endif
|
||||
@@ -560,7 +560,7 @@ METHOD Stabilize() CLASS TBrowse
|
||||
nToAdd := ::aColumns[ nColsVisible + 1 ]:Width
|
||||
|
||||
if nColsVisible >= ::leftVisible .or. ::Freeze > 0
|
||||
nToAdd += If( ::aColumns[ nColsVisible + 1 ]:ColSep != NIL,;
|
||||
nToAdd += iif( ::aColumns[ nColsVisible + 1 ]:ColSep != NIL,;
|
||||
Len( ::aColumns[ nColsVisible + 1 ]:ColSep ),;
|
||||
Len( ::ColSep ) )
|
||||
endif
|
||||
@@ -576,47 +576,47 @@ METHOD Stabilize() CLASS TBrowse
|
||||
::rightVisible := nColsVisible
|
||||
|
||||
if Empty(::aRedraw)
|
||||
::RowCount := ::nBottom - ::nTop + 1 - If( ::lHeaders, 1, 0 ) - ;
|
||||
If( lFooters, 1, 0 ) - If( Empty( ::HeadSep ), 0, 1 ) - If( Empty( ::FootSep ), 0, 1 )
|
||||
::RowCount := ::nBottom - ::nTop + 1 - iif( ::lHeaders, 1, 0 ) - ;
|
||||
iif( lFooters, 1, 0 ) - iif( Empty( ::HeadSep ), 0, 1 ) - iif( Empty( ::FootSep ), 0, 1 )
|
||||
::aRedraw := Array( ::RowCount )
|
||||
AFill( ::aRedraw, .F. )
|
||||
endif
|
||||
else
|
||||
oCol := ::aColumns[ If( ::rightVisible != 0, ::rightVisible, 1 ) ]
|
||||
oCol2 := ::aColumns[ If( ::Freeze > 0, 1, ::leftVisible ) ]
|
||||
nColsWidth := If( oCol != NIL, oCol:ColPos, 0 ) + ;
|
||||
If( oCol != NIL, oCol:Width, 0 ) - oCol2:ColPos
|
||||
lFooters := ( ::RowCount != ::nBottom - ::nTop + 1 - If( ::lHeaders, 1, 0 ) - ;
|
||||
- If( Empty( ::HeadSep ), 0, 1 ) - If( Empty( ::FootSep ), 0, 1 ) )
|
||||
oCol := ::aColumns[ iif( ::rightVisible != 0, ::rightVisible, 1 ) ]
|
||||
oCol2 := ::aColumns[ iif( ::Freeze > 0, 1, ::leftVisible ) ]
|
||||
nColsWidth := iif( oCol != NIL, oCol:ColPos, 0 ) + ;
|
||||
iif( oCol != NIL, oCol:Width, 0 ) - oCol2:ColPos
|
||||
lFooters := ( ::RowCount != ::nBottom - ::nTop + 1 - iif( ::lHeaders, 1, 0 ) - ;
|
||||
- iif( Empty( ::HeadSep ), 0, 1 ) - iif( Empty( ::FootSep ), 0, 1 ) )
|
||||
endif
|
||||
|
||||
if !::aRedraw[ 1 ]
|
||||
if ::lHeaders // Drawing headers
|
||||
DispOutAt( ::nTop, ::nLeft, Space( ( nWidth - nColsWidth ) / 2 ), ::ColorSpec )
|
||||
for n := If( ::Freeze>0, 1, ::leftVisible ) to ::rightVisible
|
||||
for n := iif( ::Freeze>0, 1, ::leftVisible ) to ::rightVisible
|
||||
if ::Freeze > 0 .and. n == ::Freeze + 1
|
||||
n := ::leftVisible
|
||||
endif
|
||||
DispOut( PadR( ::aColumns[ n ]:Heading, ::aColumns[ n ]:Width ), ::ColorSpec )
|
||||
if n < ::rightVisible
|
||||
DispOut( Space( If( ::aColumns[ n + 1 ]:ColSep != NIL, ;
|
||||
DispOut( Space( iif( ::aColumns[ n + 1 ]:ColSep != NIL, ;
|
||||
Len( ::aColumns[ n + 1 ]:ColSep ), Len( ::ColSep ) ) ), ::ColorSpec )
|
||||
endif
|
||||
next
|
||||
DispOut( Space( ( nWidth - nColsWidth ) / 2 ), ::ColorSpec )
|
||||
endif
|
||||
if ! Empty( ::HeadSep ) //Drawing heading separator
|
||||
DispOutAt( ::nTop + If( ::lHeaders, 1, 0 ), ::nLeft, Replicate( Right( ::HeadSep, 1 ), ( nWidth - nColsWidth ) / 2 ), ::ColorSpec )
|
||||
DispOutAt( ::nTop + iif( ::lHeaders, 1, 0 ), ::nLeft, Replicate( Right( ::HeadSep, 1 ), ( nWidth - nColsWidth ) / 2 ), ::ColorSpec )
|
||||
if Len( ::HeadSep ) > 1
|
||||
iW := 0
|
||||
for n := If( ::Freeze > 0, 1, ::leftVisible ) to ::rightVisible
|
||||
for n := iif( ::Freeze > 0, 1, ::leftVisible ) to ::rightVisible
|
||||
if ::Freeze > 0 .and. n == ::Freeze + 1
|
||||
n := ::leftVisible
|
||||
endif
|
||||
DispOut( Replicate( Right( ::HeadSep, 1 ), ::aColumns[ n ]:Width - iW ), ::ColorSpec )
|
||||
if n < ::rightVisible
|
||||
DispOut( Left( ::HeadSep, Len( ::HeadSep ) - 1 ), ::ColorSpec )
|
||||
iW := Len( ::HeadSep ) - 1 - If( ::aColumns[ n + 1 ]:ColSep != NIL, ;
|
||||
iW := Len( ::HeadSep ) - 1 - iif( ::aColumns[ n + 1 ]:ColSep != NIL, ;
|
||||
Len( ::aColumns[ n + 1 ]:ColSep ), Len( ::ColSep ) )
|
||||
endif
|
||||
next
|
||||
@@ -626,17 +626,17 @@ METHOD Stabilize() CLASS TBrowse
|
||||
DispOut( Replicate( Right( ::HeadSep, 1 ), ( nWidth - nColsWidth ) / 2 ), ::ColorSpec )
|
||||
endif
|
||||
if ! Empty( ::FootSep ) // Drawing footing separator
|
||||
DispOutAt( ::nBottom - If( lFooters, 1, 0 ), ::nLeft, Replicate( Right( ::FootSep, 1 ), ( nWidth - nColsWidth ) / 2 ), ::ColorSpec )
|
||||
DispOutAt( ::nBottom - iif( lFooters, 1, 0 ), ::nLeft, Replicate( Right( ::FootSep, 1 ), ( nWidth - nColsWidth ) / 2 ), ::ColorSpec )
|
||||
if Len( ::FootSep ) > 1
|
||||
iW := 0
|
||||
for n := If( ::Freeze > 0, 1, ::leftVisible ) to ::rightVisible
|
||||
for n := iif( ::Freeze > 0, 1, ::leftVisible ) to ::rightVisible
|
||||
if ::Freeze > 0 .and. n == ::Freeze + 1
|
||||
n := ::leftVisible
|
||||
endif
|
||||
DispOut( Replicate( Right( ::FootSep, 1 ), ::aColumns[ n ]:Width - iW ), ::ColorSpec )
|
||||
if n < ::rightVisible
|
||||
DispOut( Left( ::FootSep, Len( ::FootSep ) - 1 ), ::ColorSpec )
|
||||
iW := Len( ::FootSep ) - 1 - If( ::aColumns[ n + 1 ]:ColSep != NIL, ;
|
||||
iW := Len( ::FootSep ) - 1 - iif( ::aColumns[ n + 1 ]:ColSep != NIL, ;
|
||||
Len( ::aColumns[ n + 1 ]:ColSep ), Len( ::ColSep ) )
|
||||
endif
|
||||
next
|
||||
@@ -647,13 +647,13 @@ METHOD Stabilize() CLASS TBrowse
|
||||
endif
|
||||
if lFooters // Drawing footers
|
||||
DispOutAt( ::nBottom, ::nLeft, Space( ( nWidth - nColsWidth ) / 2 ), ::ColorSpec )
|
||||
for n := If( ::Freeze > 0, 1, ::leftVisible ) to ::rightVisible
|
||||
for n := iif( ::Freeze > 0, 1, ::leftVisible ) to ::rightVisible
|
||||
if ::Freeze > 0 .and. n == ::Freeze + 1
|
||||
n := ::leftVisible
|
||||
endif
|
||||
DispOut( PadR( ::aColumns[ n ]:Footing, ::aColumns[ n ]:Width ), ::ColorSpec )
|
||||
if n < ::rightVisible
|
||||
DispOut( Space( If( ::aColumns[ n + 1 ]:ColSep != NIL, ;
|
||||
DispOut( Space( iif( ::aColumns[ n + 1 ]:ColSep != NIL, ;
|
||||
Len( ::aColumns[ n + 1 ]:ColSep ), Len( ::ColSep ) ) ), ::ColorSpec )
|
||||
endif
|
||||
next
|
||||
@@ -690,10 +690,10 @@ METHOD Stabilize() CLASS TBrowse
|
||||
lDisplay := .F.
|
||||
endif
|
||||
|
||||
DispOutAt( ::nTop + nRow + If( ::lHeaders, 0, -1 ) + If( Empty( ::HeadSep ), 0, 1 ), ::nLeft,;
|
||||
DispOutAt( ::nTop + nRow + iif( ::lHeaders, 0, -1 ) + iif( Empty( ::HeadSep ), 0, 1 ), ::nLeft,;
|
||||
Space( ( nWidth - nColsWidth ) / 2 ), ::ColorSpec )
|
||||
|
||||
for n := If( ::Freeze > 0, 1, ::leftVisible ) to ::rightVisible
|
||||
for n := iif( ::Freeze > 0, 1, ::leftVisible ) to ::rightVisible
|
||||
|
||||
if ::Freeze > 0 .and. n == ::Freeze + 1
|
||||
n := ::leftVisible
|
||||
@@ -706,7 +706,7 @@ METHOD Stabilize() CLASS TBrowse
|
||||
|
||||
if lDisplay
|
||||
|
||||
cColColor := If( ::aColumns[ n ]:ColorBlock != NIL,;
|
||||
cColColor := iif( ::aColumns[ n ]:ColorBlock != NIL,;
|
||||
hb_ColorIndex( ::ColorSpec,;
|
||||
Eval( ::aColumns[ n ]:ColorBlock,;
|
||||
Eval( ::aColumns[ n ]:Block ) )[ 1 ] - 1 ),;
|
||||
@@ -746,7 +746,7 @@ METHOD Up() CLASS TBrowse
|
||||
::Hilite()
|
||||
::RelativePos--
|
||||
else
|
||||
n := ::nTop + If( ::lHeaders, 1, 0 ) + If( Empty( ::HeadSep ), 0, 1 )
|
||||
n := ::nTop + iif( ::lHeaders, 1, 0 ) + iif( Empty( ::HeadSep ), 0, 1 )
|
||||
Scroll( n, ::nLeft, n + ::RowCount - 1, ::nRight, -1 )
|
||||
::RefreshCurrent()
|
||||
endif
|
||||
@@ -779,7 +779,7 @@ METHOD DispCell( nColumn, cColor ) CLASS TBrowse
|
||||
DispOut( Right( DToC( ftmp ), ::aColumns[ nColumn ]:Width ), cColor )
|
||||
case valtype( ftmp ) == "L"
|
||||
DispOut( Space( ::aColumns[ nColumn ]:Width / 2 ), ::ColorSpec )
|
||||
DispOut( If( ftmp, "T","F" ), cColor )
|
||||
DispOut( iif( ftmp, "T","F" ), cColor )
|
||||
endcase
|
||||
|
||||
DispOut( Space( nCol + ::aColumns[ nColumn ]:Width - Col() ), ::ColorSpec )
|
||||
|
||||
@@ -162,7 +162,7 @@ STATIC PROCEDURE Create()
|
||||
hClass := __clsNew( ::cName, nLenDatas )
|
||||
ELSE // Multi inheritance
|
||||
FOR n := 1 TO nLen
|
||||
ahSuper[ n ] := __clsInstSuper( Upper( ::acSuper[ n ] ) ) // Super handle available
|
||||
ahSuper[ n ] := __clsInstSuper( Upper( ::acSuper[ n ] ) ) // Super handle available
|
||||
NEXT
|
||||
|
||||
hClass := __clsNew( ::cName, nLenDatas + nlen, ahSuper )
|
||||
@@ -171,8 +171,8 @@ STATIC PROCEDURE Create()
|
||||
nClassBegin += __cls_CntClsData( ahSuper[ 1 ] ) // Get offset for new ClassData
|
||||
|
||||
FOR n := 2 TO nLen
|
||||
nDataBegin += __cls_CntData( ahSuper[ n ] ) // Get offset for new DATAs
|
||||
nClassBegin += __cls_CntClsData( ahSuper[ n ] ) // Get offset for new ClassData
|
||||
nDataBegin += __cls_CntData( ahSuper[ n ] ) // Get offset for new DATAs
|
||||
nClassBegin += __cls_CntClsData( ahSuper[ n ] ) // Get offset for new ClassData
|
||||
NEXT
|
||||
|
||||
__clsAddMsg( hClass, Upper( ::acSuper[ 1 ] ), ++nDataBegin, HB_OO_MSG_SUPER, ahSuper[ 1 ], HB_OO_CLSTP_CLASS + 1 )
|
||||
@@ -181,7 +181,7 @@ STATIC PROCEDURE Create()
|
||||
__clsAddMsg( hClass, "__SUPER" , nDataBegin, HB_OO_MSG_SUPER, ahSuper[ 1 ], 1 )
|
||||
|
||||
FOR n := 2 TO nLen
|
||||
__clsAddMsg( hClass, Upper( ::acSuper[ n ] ), ++nDataBegin, HB_OO_MSG_SUPER, ahSuper[ n ], HB_OO_CLSTP_CLASS + 1 )
|
||||
__clsAddMsg( hClass, Upper( ::acSuper[ n ] ), ++nDataBegin, HB_OO_MSG_SUPER, ahSuper[ n ], HB_OO_CLSTP_CLASS + 1 )
|
||||
NEXT
|
||||
|
||||
ENDIF
|
||||
@@ -242,13 +242,13 @@ STATIC PROCEDURE AddData( cData, xInit, cType, nScope ) /* xInit is initializer
|
||||
LOCAL Self := QSelf()
|
||||
|
||||
// Default Init for Logical and numeric
|
||||
if (cType!=NIL .AND. xInit==NIL)
|
||||
if ( Upper(substr(cType,1,1)) == "L" )
|
||||
xInit := .F.
|
||||
elseif Upper(substr(cType,1,1)) == "N"
|
||||
xInit := 0
|
||||
endif
|
||||
endif
|
||||
IF cType != NIL .AND. xInit == NIL
|
||||
IF Upper( Left( cType, 1 ) ) == "L"
|
||||
xInit := .F.
|
||||
ELSEIF Upper( Left( cType, 1 ) ) == "N"
|
||||
xInit := 0
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
AAdd( ::aDatas, { cData, xInit, cType, nScope } )
|
||||
|
||||
@@ -285,14 +285,13 @@ STATIC PROCEDURE AddClassData( cData, xInit, cType, nScope )
|
||||
LOCAL Self := QSelf()
|
||||
|
||||
// Default Init for Logical and numeric
|
||||
if (cType!=NIL .AND. xInit==NIL)
|
||||
if ( Upper(Substr(cType,1,1)) == "L" )
|
||||
xInit := .F.
|
||||
elseif Upper(Substr(cType,1,1)) == "N"
|
||||
xInit := 0
|
||||
endif
|
||||
|
||||
endif
|
||||
IF cType != NIL .AND. xInit == NIL
|
||||
IF Upper( Left( cType, 1 ) ) == "L"
|
||||
xInit := .F.
|
||||
ELSEIF Upper( Left( cType, 1 ) ) == "N"
|
||||
xInit := 0
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
AAdd( ::aClsDatas, { cData, xInit, cType, nScope } )
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@ METHOD SetFocus() CLASS TGet
|
||||
endif
|
||||
|
||||
if ::type == "D"
|
||||
::BadDate := ( Dtoc( Ctod( ::buffer ) ) != ::buffer )
|
||||
::BadDate := !( Dtoc( Ctod( ::buffer ) ) == ::buffer )
|
||||
else
|
||||
::BadDate := .f.
|
||||
endif
|
||||
@@ -501,12 +501,12 @@ METHOD overstrike( cChar ) CLASS TGet
|
||||
endif
|
||||
|
||||
::buffer := SubStr( ::buffer, 1, ::Pos - 1 ) + cChar + SubStr( ::buffer, ::Pos + 1 )
|
||||
::Changed := ( ::unTransform() != ::Original )
|
||||
::Changed := !( ::unTransform() == ::Original )
|
||||
::Assign()
|
||||
::Right(.f.)
|
||||
|
||||
if ::type == "D"
|
||||
::BadDate := ( Dtoc( Ctod( ::buffer ) ) != ::buffer )
|
||||
::BadDate := !( Dtoc( Ctod( ::buffer ) ) == ::buffer )
|
||||
else
|
||||
::BadDate := .f.
|
||||
endif
|
||||
@@ -568,12 +568,12 @@ METHOD Insert( cChar ) CLASS TGet
|
||||
nPos++
|
||||
enddo
|
||||
|
||||
::Changed := ( ::unTransform() != ::Original )
|
||||
::Changed := !( ::unTransform() == ::Original )
|
||||
::Assign()
|
||||
::Right(.f.)
|
||||
|
||||
if ::type == "D"
|
||||
::BadDate := ( Dtoc( Ctod( ::buffer ) ) != ::buffer )
|
||||
::BadDate := !( Dtoc( Ctod( ::buffer ) ) == ::buffer )
|
||||
else
|
||||
::BadDate := .f.
|
||||
endif
|
||||
@@ -684,7 +684,7 @@ METHOD WordLeft() CLASS TGet
|
||||
do while nPos > 0 .and. SubStr( ::buffer, nPos, 1 ) == " "
|
||||
nPos--
|
||||
Enddo
|
||||
do while nPos > 0 .and. SubStr( ::buffer, nPos, 1 ) != " "
|
||||
do while nPos > 0 .and. !( SubStr( ::buffer, nPos, 1 ) == " " )
|
||||
nPos--
|
||||
Enddo
|
||||
if nPos > 0
|
||||
@@ -856,7 +856,7 @@ METHOD Input( cChar ) CLASS TGet
|
||||
cChar := ""
|
||||
endif
|
||||
case cPic == "#"
|
||||
if !IsDigit( cChar ) .and. cChar != " " .and. !( cChar$"+-" )
|
||||
if !IsDigit( cChar ) .and. !( cChar == " " ) .and. !( cChar$"+-" )
|
||||
cChar := ""
|
||||
endif
|
||||
end case
|
||||
@@ -888,7 +888,7 @@ METHOD PutMask( xValue, lEdit ) CLASS TGet
|
||||
nLen := Len( cBuffer )
|
||||
for nFor := 1 to nLen
|
||||
cChar := SubStr( ::cPicMask, nFor, 1 )
|
||||
if cChar $ ",." .and. SubStr( cBuffer, nFor, 1 ) != cChar
|
||||
if cChar $ ",." .and. !( SubStr( cBuffer, nFor, 1 ) == cChar )
|
||||
cBuffer := SubStr( cBuffer, 1, nFor - 1 ) + cChar + SubStr( cBuffer, nFor + 1 )
|
||||
endif
|
||||
next
|
||||
@@ -1031,8 +1031,8 @@ METHOD DelWordLeft() CLASS TGet
|
||||
return Self
|
||||
endif
|
||||
|
||||
if SubStr( ::buffer, ::Pos, 1 ) != " "
|
||||
if SubStr( ::buffer, ::Pos - 1 , 1 ) == " "
|
||||
if !( SubStr( ::buffer, ::Pos, 1 ) == " " )
|
||||
if SubStr( ::buffer, ::Pos - 1 , 1 ) == " "
|
||||
::BackSpace(.f.)
|
||||
else
|
||||
::WordRight()
|
||||
@@ -1044,7 +1044,7 @@ METHOD DelWordLeft() CLASS TGet
|
||||
::Delete(.f.)
|
||||
endif
|
||||
|
||||
do while ::Pos > 1 .and. SubStr( ::buffer, ::Pos - 1, 1 ) != " "
|
||||
do while ::Pos > 1 .and. !( SubStr( ::buffer, ::Pos - 1, 1 ) == " " )
|
||||
::BackSpace(.f.)
|
||||
Enddo
|
||||
|
||||
@@ -1068,7 +1068,7 @@ METHOD DelWordRight() CLASS TGet
|
||||
return Self
|
||||
endif
|
||||
|
||||
do while ::Pos <= ::nMaxLen .and. SubStr( ::buffer, ::Pos, 1 ) != " "
|
||||
do while ::Pos <= ::nMaxLen .and. !( SubStr( ::buffer, ::Pos, 1 ) == " " )
|
||||
::Delete(.f.)
|
||||
Enddo
|
||||
|
||||
|
||||
@@ -194,10 +194,10 @@ METHOD NEW(cFrmName,lPrinter,cAltFile,lNoConsole,bFor,bWhile,nNext,nRecord,;
|
||||
|
||||
// Set output devices
|
||||
|
||||
lPrintOn := IF( lPrinter, SET( _SET_PRINTER, lPrinter ), ;
|
||||
lPrintOn := iif( lPrinter, SET( _SET_PRINTER, lPrinter ), ;
|
||||
SET( _SET_PRINTER ) )
|
||||
|
||||
lConsoleOn := IF( lNoConsole, SET( _SET_CONSOLE, .F.), ;
|
||||
lConsoleOn := iif( lNoConsole, SET( _SET_CONSOLE, .F.), ;
|
||||
SET( _SET_CONSOLE) )
|
||||
|
||||
IF lPrinter // To the printer
|
||||
@@ -304,7 +304,7 @@ METHOD NEW(cFrmName,lPrinter,cAltFile,lNoConsole,bFor,bWhile,nNext,nRecord,;
|
||||
|
||||
// Print the first line
|
||||
::PrintIt( SPACE(::aReportData[RPT_LMARGIN]) + ;
|
||||
IF(nGroup==1,NationMsg(_RFRM_SUBTOTAL),;
|
||||
iif(nGroup==1,NationMsg(_RFRM_SUBTOTAL),;
|
||||
NationMsg(_RFRM_SUBSUBTOTAL) ) )
|
||||
|
||||
// Print the second line
|
||||
@@ -592,7 +592,7 @@ METHOD ExecuteReport() CLASS TReportForm
|
||||
IF lGroupChanged .OR. MakeAStr(EVAL(::aReportData[RPT_GROUPS,nGroup,RGT_EXP]),;
|
||||
::aReportData[RPT_GROUPS,nGroup,RGT_TYPE]) != ::aGroupTotals[nGroup]
|
||||
|
||||
AADD( aRecordHeader, IF(nGroup==1,NationMsg(_RFRM_SUBTOTAL),;
|
||||
AADD( aRecordHeader, iif(nGroup==1,NationMsg(_RFRM_SUBTOTAL),;
|
||||
NationMsg(_RFRM_SUBSUBTOTAL)) )
|
||||
AADD( aRecordHeader, "" )
|
||||
|
||||
@@ -673,7 +673,7 @@ METHOD ExecuteReport() CLASS TReportForm
|
||||
ENDIF
|
||||
|
||||
|
||||
AADD( aRecordHeader, IF(nGroup==1,"** ","* ") +;
|
||||
AADD( aRecordHeader, iif(nGroup==1,"** ","* ") +;
|
||||
::aReportData[RPT_GROUPS,nGroup,RGT_HEADER] + " " +;
|
||||
MakeAStr(EVAL(::aReportData[RPT_GROUPS,nGroup,RGT_EXP]), ;
|
||||
::aReportData[RPT_GROUPS,nGroup,RGT_TYPE]) )
|
||||
@@ -996,11 +996,11 @@ METHOD LoadReportFile(cFrmFile) CLASS TReportForm
|
||||
|
||||
// Line spacing
|
||||
// Spacing is 1, 2, or 3
|
||||
aReport[ RPT_SPACING ] := IF(SUBSTR(cParamsBuff, ;
|
||||
aReport[ RPT_SPACING ] := iif(SUBSTR(cParamsBuff, ;
|
||||
DBL_SPACE_OFFSET, 1) $ "YyTt", 2, 1)
|
||||
|
||||
// Summary report flag
|
||||
aReport[ RPT_SUMMARY ] := IF(SUBSTR(cParamsBuff, ;
|
||||
aReport[ RPT_SUMMARY ] := iif(SUBSTR(cParamsBuff, ;
|
||||
SUMMARY_RPT_OFFSET, 1) $ "YyTt", .T., .F.)
|
||||
|
||||
// Process report eject and plain attributes option byte
|
||||
@@ -1037,7 +1037,7 @@ METHOD LoadReportFile(cFrmFile) CLASS TReportForm
|
||||
nHeaderIndex--
|
||||
ENDDO
|
||||
|
||||
aReport[ RPT_HEADER ] := IIF( EMPTY( nHeaderIndex ) , {}, ;
|
||||
aReport[ RPT_HEADER ] := iif( EMPTY( nHeaderIndex ) , {}, ;
|
||||
ASIZE( aHeader, nHeaderIndex ) )
|
||||
|
||||
// Process Groups
|
||||
@@ -1062,7 +1062,7 @@ METHOD LoadReportFile(cFrmFile) CLASS TReportForm
|
||||
aReport[ RPT_GROUPS ][1][ RGT_HEADER ] := ::GetExpr( nPointer )
|
||||
|
||||
// Page eject after group
|
||||
aReport[ RPT_GROUPS ][1][ RGT_AEJECT ] := IF(SUBSTR(cParamsBuff, ;
|
||||
aReport[ RPT_GROUPS ][1][ RGT_AEJECT ] := iif(SUBSTR(cParamsBuff, ;
|
||||
PE_OFFSET, 1) $ "YyTt", .T., .F.)
|
||||
|
||||
ENDIF
|
||||
@@ -1174,9 +1174,9 @@ STATIC FUNCTION Occurs( cSearch, cTarget )
|
||||
|
||||
STATIC FUNCTION XMLCOUNT( cString, nLineLength, nTabSize, lWrap )
|
||||
// Set defaults if none specified
|
||||
nLineLength := IF( nLineLength == NIL, 79, nLineLength )
|
||||
nTabSize := IF( nTabSize == NIL, 4, nTabSize )
|
||||
lWrap := IF( lWrap == NIL, .T., .F. )
|
||||
nLineLength := iif( nLineLength == NIL, 79, nLineLength )
|
||||
nTabSize := iif( nTabSize == NIL, 4, nTabSize )
|
||||
lWrap := iif( lWrap == NIL, .T., .F. )
|
||||
|
||||
IF nTabSize >= nLineLength
|
||||
nTabSize := nLineLength - 1
|
||||
@@ -1192,10 +1192,10 @@ STATIC FUNCTION XMLCOUNT( cString, nLineLength, nTabSize, lWrap )
|
||||
STATIC FUNCTION XMEMOLINE( cString, nLineLength, nLineNumber, nTabSize, lWrap )
|
||||
|
||||
// Set defaults if none specified
|
||||
nLineLength := IF( nLineLength == NIL, 79, nLineLength )
|
||||
nLineNumber := IF( nLineNumber == NIL, 1, nLineNumber )
|
||||
nTabSize := IF( nTabSize == NIL, 4, nTabSize )
|
||||
lWrap := IF( lWrap == NIL, .T., lWrap )
|
||||
nLineLength := iif( nLineLength == NIL, 79, nLineLength )
|
||||
nLineNumber := iif( nLineNumber == NIL, 1, nLineNumber )
|
||||
nTabSize := iif( nTabSize == NIL, 4, nTabSize )
|
||||
lWrap := iif( lWrap == NIL, .T., lWrap )
|
||||
|
||||
IF nTabSize >= nLineLength
|
||||
nTabSize := nLineLength - 1
|
||||
@@ -1259,7 +1259,7 @@ METHOD GetColumn( cFieldsBuffer, nOffset ) CLASS TReportForm
|
||||
FIELD_WIDTH_OFFSET, 2))
|
||||
|
||||
// Total column?
|
||||
aColumn[ RCT_TOTAL ] := IF(SUBSTR(cFieldsBuffer, nOffset + ;
|
||||
aColumn[ RCT_TOTAL ] := iif(SUBSTR(cFieldsBuffer, nOffset + ;
|
||||
FIELD_TOTALS_OFFSET, 1) $ "YyTt", .T., .F.)
|
||||
|
||||
// Decimals width
|
||||
@@ -1358,7 +1358,7 @@ STATIC FUNCTION MakeAStr( uVar, cType )
|
||||
cString := DTOC( uVar )
|
||||
|
||||
CASE UPPER(cType) == "L"
|
||||
cString := IF( uVar, "T", "F" )
|
||||
cString := iif( uVar, "T", "F" )
|
||||
|
||||
CASE UPPER(cType) == "N"
|
||||
cString := STR( uVar )
|
||||
|
||||
Reference in New Issue
Block a user