--- a/SelectionInTreeView.st Sat Feb 14 17:15:32 1998 +0100
+++ b/SelectionInTreeView.st Sat Feb 14 17:17:48 1998 +0100
@@ -436,19 +436,25 @@
update:something with:aParameter from:aModel
"one of my models changed its value
- "
+ "
aModel == rootHolder ifTrue:[
^ self rootFromModel
].
aModel == selectionHolder ifTrue:[
- ^ self selectionFromModel
+ ^ self selectionFromModel
].
- aModel == aModel ifTrue:[
- something == #list ifTrue:[
+ aModel == model ifTrue:[
+ something == #list ifTrue:[
^ self getListFromModel
]
].
+
+ aModel == self selectedNode ifTrue:[
+ something == #value ifTrue:[
+ ^ self redrawLine: (self indexOfNode: aModel)
+ ]
+ ].
^ super update:something with:aParameter from:aModel.
@@ -566,13 +572,7 @@
].
"/ draw text label
-"/ (selectConditionBlock isNil or:[selectConditionBlock value:index]) ifTrue:[
- self drawLabelIndex:index atX:xStr y:yCtr.
-"/ ] ifFalse:[
-"/ self paint:halfIntensityFgColor.
-"/ self drawLabelIndex:index atX:xStr y:yCtr.
-"/ self paint:fg on:bg.
-"/ ].
+ self drawLabelIndex:index atX:xStr y:yCtr .
"/ draw directory indicator
@@ -795,7 +795,7 @@
images again and again later; returns maximum extent of the images used.
Could be redefined by subclass
"
- |extent|
+ |icon extent|
imageOpened isNil ifTrue:[
imageOpened := (self class imageOpened) onDevice:device
@@ -809,7 +809,11 @@
imageItem isNil ifTrue:[
imageItem := self imageOnDevice:(self class imageItem)
].
+
+ (listOfNodes size > 0 and: [icon := listOfNodes first icon]) notNil ifTrue: [^icon extent].
+
^ extent max:(imageItem extent)
+
!
getFontParameters
@@ -1158,6 +1162,20 @@
figureFor:aNode
"access figure for a node
"
+ |icon|
+ (icon := aNode icon) notNil
+ ifTrue:
+ [
+ icon device ~= device
+ ifTrue:
+ [
+ icon := icon onDevice: device.
+ aNode icon: icon.
+ icon clearMaskedPixels
+ ].
+ ^icon
+ ].
+
aNode hasChildren ifTrue:[
aNode isExpandable ifTrue:[ ^ imageClosed ]
ifFalse:[ ^ imageOpened ]
@@ -1431,5 +1449,5 @@
!SelectionInTreeView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInTreeView.st,v 1.37 1998-02-14 10:49:34 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInTreeView.st,v 1.38 1998-02-14 16:17:48 tz Exp $'
! !