obsoleted by Text
authorClaus Gittinger <cg@exept.de>
Sun, 12 May 1996 20:46:29 +0200
changeset 171 a5b9435e3bee
parent 170 f8609c3cff24
child 172 c30e1ff9f9dd
obsoleted by Text
ClrListEntry.st
ColoredListEntry.st
--- a/ClrListEntry.st	Sun May 12 17:07:05 1996 +0200
+++ b/ClrListEntry.st	Sun May 12 20:46:29 1996 +0200
@@ -39,8 +39,8 @@
     as entries of the list in a ListView or SelectionInListView.
 
     Notice: this is a historic leftOver from times when the Text class
-            was not available. Please do no longer use it (use Text right away).
-            However: Text does not (currently) handle background color settings.
+            was not available. 
+            Please do no longer use it (use Text right away).
 
     [author:]
         Claus Gittinger
@@ -109,7 +109,16 @@
 !
 
 string:aString foregroundColor:fgColor backgroundColor:bgColor
-    ^ self new string:aString foregroundColor:fgColor backgroundColor:bgColor
+    self obsoleteMethodWarning:'use Text>>emphasis:'.
+
+    ^ Text 
+        string:aString 
+        emphasis:(Array with:(#color->fgColor)
+                        with:(#backgroundColor->bgColor))
+
+"/    ^ self new string:aString foregroundColor:fgColor backgroundColor:bgColor
+
+    "Modified: 12.5.1996 / 19:48:27 / cg"
 ! !
 
 !ColoredListEntry methodsFor:'accessing'!
@@ -163,16 +172,8 @@
     "Modified: 16.11.1995 / 16:54:40 / cg"
 ! !
 
-!ColoredListEntry methodsFor:'queries'!
-
-widthIn:aGC
-    "return the width of the receiver when displayed in aGC"
-
-    ^ aGC font widthOf:(string withTabsExpanded)
-! !
-
 !ColoredListEntry class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/Attic/ClrListEntry.st,v 1.12 1996-05-12 15:07:05 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/Attic/ClrListEntry.st,v 1.13 1996-05-12 18:46:29 cg Exp $'
 ! !
--- a/ColoredListEntry.st	Sun May 12 17:07:05 1996 +0200
+++ b/ColoredListEntry.st	Sun May 12 20:46:29 1996 +0200
@@ -39,8 +39,8 @@
     as entries of the list in a ListView or SelectionInListView.
 
     Notice: this is a historic leftOver from times when the Text class
-            was not available. Please do no longer use it (use Text right away).
-            However: Text does not (currently) handle background color settings.
+            was not available. 
+            Please do no longer use it (use Text right away).
 
     [author:]
         Claus Gittinger
@@ -109,7 +109,16 @@
 !
 
 string:aString foregroundColor:fgColor backgroundColor:bgColor
-    ^ self new string:aString foregroundColor:fgColor backgroundColor:bgColor
+    self obsoleteMethodWarning:'use Text>>emphasis:'.
+
+    ^ Text 
+        string:aString 
+        emphasis:(Array with:(#color->fgColor)
+                        with:(#backgroundColor->bgColor))
+
+"/    ^ self new string:aString foregroundColor:fgColor backgroundColor:bgColor
+
+    "Modified: 12.5.1996 / 19:48:27 / cg"
 ! !
 
 !ColoredListEntry methodsFor:'accessing'!
@@ -163,16 +172,8 @@
     "Modified: 16.11.1995 / 16:54:40 / cg"
 ! !
 
-!ColoredListEntry methodsFor:'queries'!
-
-widthIn:aGC
-    "return the width of the receiver when displayed in aGC"
-
-    ^ aGC font widthOf:(string withTabsExpanded)
-! !
-
 !ColoredListEntry class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ColoredListEntry.st,v 1.12 1996-05-12 15:07:05 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ColoredListEntry.st,v 1.13 1996-05-12 18:46:29 cg Exp $'
 ! !