LabelAndIcon.st
changeset 2657 20d7ed550989
parent 2454 aca5d29e6298
child 2674 e877ecb7d8b7
--- a/LabelAndIcon.st	Wed Feb 25 17:09:56 2004 +0100
+++ b/LabelAndIcon.st	Wed Feb 25 17:12:57 2004 +0100
@@ -298,6 +298,20 @@
 
 !LabelAndIcon methodsFor:'comparing'!
 
+= aStringOrLabelAndIcon
+    self hasIcon == aStringOrLabelAndIcon hasIcon ifFalse:[^ false].
+    aStringOrLabelAndIcon hasIcon ifTrue:[
+        self hasIcon ifFalse:[^ false].
+        icon = aStringOrLabelAndIcon icon ifFalse:[^ false].
+    ].
+    self hasImage == aStringOrLabelAndIcon hasImage ifFalse:[^ false].
+    aStringOrLabelAndIcon hasImage ifTrue:[
+        self hasImage ifFalse:[^ false].
+        image = aStringOrLabelAndIcon image ifFalse:[^ false].
+    ].
+    ^ super = aStringOrLabelAndIcon
+!
+
 sameStringAndEmphasisAs:someStringOrLabelAndIcon
     someStringOrLabelAndIcon class == self class ifTrue:[
         icon = someStringOrLabelAndIcon icon ifFalse:[^ false].
@@ -395,6 +409,14 @@
 
 !LabelAndIcon methodsFor:'queries'!
 
+hasIcon
+    ^ icon notNil
+!
+
+hasImage
+    ^ image notNil
+!
+
 heightOn:aGC
     "return the height of the receiver, if it is to be displayed on aGC"
 
@@ -444,5 +466,5 @@
 !LabelAndIcon class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/LabelAndIcon.st,v 1.33 2003-03-01 02:23:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/LabelAndIcon.st,v 1.34 2004-02-25 16:12:57 cg Exp $'
 ! !