--- a/SelectionInTreeView.st Wed Apr 23 16:53:26 2003 +0200
+++ b/SelectionInTreeView.st Fri Apr 25 02:09:43 2003 +0200
@@ -451,21 +451,30 @@
"Created: 3.7.1997 / 12:34:34 / cg"
!
-imageOnDevice:anImage
+imageOnMyDevice:anImage
"associate image to device and clear pixel mask (in case of realized);
returns the new image.
"
- |img|
-
- img := anImage.
- img notNil ifTrue:[
- img device ~~ device ifTrue:[
- img := img copy.
- ].
- img := img onDevice:device.
- img := img clearMaskedPixels.
+ |deviceImage|
+
+ anImage isNil ifTrue:[^ anImage].
+
+ deviceImage := anImage onDevice:device.
+ deviceImage isImage ifTrue:[
+ deviceImage clearMaskedPixels.
].
- ^ img
+ ^ deviceImage
+"/ |img|
+"/
+"/ img := anImage.
+"/ img notNil ifTrue:[
+"/ img device ~~ device ifTrue:[
+"/ img := img copy.
+"/ ].
+"/ img := img onDevice:device.
+"/ img := img clearMaskedPixels.
+"/ ].
+"/ ^ img
"Modified: / 12.8.1998 / 12:46:38 / cg"
!
@@ -1507,7 +1516,7 @@
x := y := 0.
imageOpened isNil ifTrue:[
- imageOpened := self imageOnDevice:(self class imageOpened)
+ imageOpened := self imageOnMyDevice:(self class imageOpened)
].
imageOpened notNil ifTrue:[
x := x max:(imageOpened width).
@@ -1515,7 +1524,7 @@
].
imageClosed isNil ifTrue:[
- imageClosed := self imageOnDevice:(self class imageClosed)
+ imageClosed := self imageOnMyDevice:(self class imageClosed)
].
imageClosed notNil ifTrue:[
x := x max:(imageClosed width).
@@ -1523,7 +1532,7 @@
].
imageItem isNil ifTrue:[
- imageItem := self imageOnDevice:(self class imageItem)
+ imageItem := self imageOnMyDevice:(self class imageItem)
].
imageItem notNil ifTrue:[
x := x max:(imageItem width).
@@ -1533,7 +1542,7 @@
(keysAndIcons := self fetchDefaultImages) notNil ifTrue:[
keysAndIcons keysAndValuesDo:[:aKey :anIcon|
(anIcon isImage and:[aKey notNil]) ifTrue:[
- registeredImages at:aKey put:(self imageOnDevice:anIcon)
+ registeredImages at:aKey put:(self imageOnMyDevice:anIcon)
]
]
].
@@ -1623,14 +1632,14 @@
x := 0.
openIndicator isNil ifTrue:[
- openIndicator := self imageOnDevice:(self class openIndicator)
+ openIndicator := self imageOnMyDevice:(self class openIndicator)
].
openIndicator notNil ifTrue:[
x := openIndicator width
].
closeIndicator isNil ifTrue:[
- closeIndicator := self imageOnDevice:(self class closeIndicator)
+ closeIndicator := self imageOnMyDevice:(self class closeIndicator)
].
closeIndicator notNil ifTrue:[
x := x max:(closeIndicator width)
@@ -2093,7 +2102,7 @@
^ img
].
icon isImage ifTrue:[
- img := self imageOnDevice:icon.
+ img := self imageOnMyDevice:icon.
registeredImages at:icon put:img.
^ img
]
@@ -2107,7 +2116,6 @@
].
"/ folder
^ aNode hidden ifTrue:[imageClosed] ifFalse:[imageOpened]
-
!
indexOfNode:aNode
@@ -2469,5 +2477,5 @@
!SelectionInTreeView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInTreeView.st,v 1.100 2003-04-15 11:59:15 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInTreeView.st,v 1.101 2003-04-25 00:09:28 cg Exp $'
! !