--- a/ListView.st Sun Dec 17 17:49:09 1995 +0100
+++ b/ListView.st Tue Dec 19 10:56:59 1995 +0100
@@ -10,6 +10,8 @@
hereby transferred.
"
+'From Smalltalk/X, Version:2.10.8 on 18-dec-1995 at 23:29:27' !
+
View subclass:#ListView
instanceVariableNames:'list firstLineShown leftOffset nFullLinesShown nLinesShown
fgColor bgColor partialLines leftMargin topMargin textStartLeft
@@ -487,14 +489,13 @@
oldSize := self size.
l := something.
l notNil ifTrue:[
- l isString ifTrue:[
- l := l asStringCollection
- ]
+ l isString ifTrue:[
+ l := l asStringCollection
+ ]
].
self setList:l.
- self size ~~ oldSize ifTrue:[
- self contentsChanged
- ]
+
+ "Modified: 18.12.1995 / 22:20:43 / stefan"
!
setList:aCollection
@@ -515,35 +516,42 @@
|oldFirst|
(aCollection isNil and:[list isNil]) ifTrue:[
- "no change"
- ^ self
+ "no change"
+ ^ self
].
list := aCollection.
list notNil ifTrue:[
- expandTabs ifTrue:[
- self expandTabs
- ] ifFalse:[
- includesNonStrings := true. "/ actually: do not know
- ]
+ expandTabs ifTrue:[
+ self expandTabs
+ ] ifFalse:[
+ includesNonStrings := true. "/ actually: do not know
+ ]
+ ].
+
+"/ new - reposition horizontally if too big
+ widthOfWidestLine := nil. "/ i.e. unknown
+ innerWidth >= self widthOfContents ifTrue:[
+ leftOffset := 0.
].
self contentsChanged.
-"/ new - reposition if too big
+"/ new - reposition vertically if too big
(firstLineShown + nFullLinesShown) > self size ifTrue:[
- oldFirst := firstLineShown.
- firstLineShown := self size - nFullLinesShown + 1.
- firstLineShown < 1 ifTrue:[firstLineShown := 1].
- self originChanged:(oldFirst - 1) negated.
- shown ifTrue:[
- self clear.
- ]
+ oldFirst := firstLineShown.
+ firstLineShown := self size - nFullLinesShown + 1.
+ firstLineShown < 1 ifTrue:[firstLineShown := 1].
+ self originChanged:(oldFirst - 1) negated.
+ shown ifTrue:[
+ self clear.
+ ]
].
"/ end new
shown ifTrue:[
- self redrawFromVisibleLine:1 to:nLinesShown
+ self redrawFromVisibleLine:1 to:nLinesShown
]
+ "Modified: 18.12.1995 / 23:27:54 / stefan"
!
size
@@ -2745,5 +2753,5 @@
!ListView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.53 1995-12-11 16:52:55 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.54 1995-12-19 09:56:59 stefan Exp $'
! !