Text.st
changeset 1019 38ec486889d9
parent 1000 927894af9a9f
child 1020 a6304ef6b18a
--- a/Text.st	Mon Feb 18 12:03:21 2002 +0100
+++ b/Text.st	Fri Feb 22 10:58:09 2002 +0100
@@ -863,17 +863,43 @@
     "Modified: 10.7.1996 / 12:07:51 / cg"
 !
 
+backgroundColorizeAllWith:aColor
+    "change the bc-color of all characters"
+
+    self emphasisAllAdd:(#backgroundColor -> aColor).
+
+    "
+     Transcript showCR:
+        ((Text string:'hello') backgroundColorizeAllWith:(Color red)) 
+
+     Transcript showCR:
+        ('hello' allBold backgroundColorizeAllWith:(Color red)) 
+
+     Transcript showCR:
+        ('hello' asText backgroundColorizeAllWith:(Color red)) 
+
+     Transcript showCR:
+        ('hello ' , ('red' allBold backgroundColorizeAllWith:(Color red)) , ' world')
+    "
+!
+
 colorizeAllWith:aColor
     "change the color of all characters"
 
-    self emphasizeAllWith:(#color -> aColor).
+    self emphasisAllAdd:(#color -> aColor).
 
     "
      Transcript showCR:
-        (Text string:'hello') colorizeAllWith:(Color red) 
+        ((Text string:'hello') colorizeAllWith:(Color red)) 
 
      Transcript showCR:
-        'hello' asText colorizeAllWith:(Color red) 
+        ('hello' allBold colorizeAllWith:(Color red)) 
+
+     Transcript showCR:
+        ('hello' asText colorizeAllWith:(Color red)) 
+
+     Transcript showCR:
+        ('hello ' , ('red' allBold colorizeAllWith:(Color red)) , ' world')
     "
 !
 
@@ -1381,6 +1407,6 @@
 !Text class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Text.st,v 1.75 2001-12-10 14:45:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Text.st,v 1.76 2002-02-22 09:58:09 cg Exp $'
 ! !
 Text initialize!