# HG changeset patch # User Claus Gittinger # Date 886346163 -3600 # Node ID 11be1353d34cfa544e1e3f1c195be8e5e2b574ea # Parent 5dc124df04e2bc6dbbf0a2e5a5330c753fbe05a5 author in doc method diff -r 5dc124df04e2 -r 11be1353d34c UIPainter.st --- a/UIPainter.st Sun Feb 01 16:03:17 1998 +0100 +++ b/UIPainter.st Sun Feb 01 16:16:03 1998 +0100 @@ -58,8 +58,8 @@ UIPainter open [author:] - Claus Gittinger - Claus Atzkern + Claus Gittinger, eXept Software AG + Claus Atzkern, eXept Software AG [see also:] UIBuilder @@ -246,7 +246,8 @@ start "{ Class:SmallInteger }" stop "{ Class:SmallInteger }" cpySz "{ Class:SmallInteger }" - lnSz "{ Class:SmallInteger }"| + lnSz "{ Class:SmallInteger }" + atBeginOfLine| maxCharactersPerLine < 20 ifFalse:[max := maxCharactersPerLine - 1] ifTrue:[max := 20]. @@ -258,6 +259,8 @@ lnSz := 0. stream := (String new:size) writeStream. + atBeginOfLine := true. + [start <= size] whileTrue:[ (start := aString indexOfNonSeparatorStartingAt:start) == 0 ifTrue:[ ^ stream contents @@ -272,7 +275,7 @@ lnSz := 0. ] ifFalse:[ (stop := aString indexOfSeparatorStartingAt:start) == 0 ifTrue:[ - stop := size + 1 + stop := size + 1 ]. (aString at:(stop - 1)) == $\ ifTrue:[ stop := stop - 1 @@ -280,7 +283,7 @@ cpySz := stop - start. lnSz == 0 ifFalse:[ - (lnSz := lnSz + cpySz) >= max ifTrue:[stream cr. lnSz := cpySz ] + (lnSz := lnSz + cpySz) >= max ifTrue:[stream cr. lnSz := cpySz. atBeginOfLine := true. ] ifFalse:[stream space. lnSz := lnSz + 1] ] ifTrue:[ lnSz := cpySz @@ -290,6 +293,8 @@ ] ]. ^ stream contents + + "Modified: / 1.2.1998 / 14:42:56 / cg" ! ! !UIPainter class methodsFor:'interface specs'!