clear -> clearView
authorClaus Gittinger <cg@exept.de>
Fri, 05 Mar 2004 13:44:33 +0100
changeset 4069 70286020166c
parent 4068 d5b2636b048b
child 4070 efd0ffb52d43
clear -> clearView To allow subclasses of GraphicsContext to redefine #clear with more clearing (i.e. a TextCollector, to clear its contents)
SimpleView.st
--- a/SimpleView.st	Fri Mar 05 13:41:45 2004 +0100
+++ b/SimpleView.st	Fri Mar 05 13:44:33 2004 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -1712,36 +1714,36 @@
     "/ backward compatibility
     "/ superView will be renamed to container soon.
     (superView notNil and:[superView isBorderedWrapper]) ifTrue:[
-	^ superView level:aNumber
+        ^ superView level:aNumber
     ].
 
     (aNumber ~~ level and:[aNumber notNil]) ifTrue:[
-	self is3D ifTrue:[
-	    level := aNumber.
-	    oldMargin := margin.
-	    margin := level abs.
-
-	    realized ifTrue:[
-		margin ~~ oldMargin ifTrue:[
-		    (margin > oldMargin) ifTrue:[
-			how := #smaller
-		    ] ifFalse:[
-			how := #larger
-		    ].
-		    self sizeChanged:how.
-		    self setInnerClip.
-		].
-		shown ifTrue:[
-		    margin ~~ oldMargin ifTrue:[
-			self clear.
-			self redrawX:margin y:margin
-			       width:width-(margin*2) 
-			      height:height-(margin*2)
-		    ].
-		    self redrawEdges.
-	       ]
-	    ]
-	]
+        self is3D ifTrue:[
+            level := aNumber.
+            oldMargin := margin.
+            margin := level abs.
+
+            realized ifTrue:[
+                margin ~~ oldMargin ifTrue:[
+                    (margin > oldMargin) ifTrue:[
+                        how := #smaller
+                    ] ifFalse:[
+                        how := #larger
+                    ].
+                    self sizeChanged:how.
+                    self setInnerClip.
+                ].
+                shown ifTrue:[
+                    margin ~~ oldMargin ifTrue:[
+                        self clearView.
+                        self redrawX:margin y:margin
+                               width:width-(margin*2) 
+                              height:height-(margin*2)
+                    ].
+                    self redrawEdges.
+               ]
+            ]
+        ]
     ]
 
     "Modified: 5.6.1996 / 14:12:17 / cg"
@@ -6150,7 +6152,7 @@
         "force a change"
         t := borderWidth. borderWidth := nil. self borderWidth:t.
         t := viewBackground. viewBackground := nil. self viewBackground:t.
-        self clear. 
+        self clearView. 
         self invalidate.
     ].
 
@@ -9470,7 +9472,7 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.490 2004-03-01 11:20:38 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.491 2004-03-05 12:44:33 cg Exp $'
 ! !
 
 SimpleView initialize!