layout stuff & comment
authorClaus Gittinger <cg@exept.de>
Wed, 05 Jun 1996 17:24:33 +0200
changeset 1454 17ff61f7f34e
parent 1453 eb73ecdb25ab
child 1455 970b79688f56
layout stuff & comment
Rectangle.st
--- a/Rectangle.st	Tue Jun 04 16:09:49 1996 +0200
+++ b/Rectangle.st	Wed Jun 05 17:24:33 1996 +0200
@@ -541,28 +541,28 @@
      If all values are between 0.0 .. 1.0, a fractionalLayout is created,
      otherwise, an offsetLayout"
 
-    |newLayout left right top bot|
+    |newLayout l r t b|
 
     newLayout := LayoutFrame new.
-    left := (self left).
-    right := (self right).
-    top := (self top).
-    bot := (self bottom).
-    ((left between:0.0 and:1.0)
-    and:[(right between:0.0 and:1.0)
-    and:[(top between:0.0 and:1.0)
-    and:[(bot between:0.0 and:1.0)]]]) ifTrue:[
-	newLayout
-	    leftFraction:left;
-	    rightFraction:right;
-	    topFraction:top;
-	    bottomFraction:bot.
+    l := left.
+    r := (self right).
+    t := top.
+    b := (self bottom).
+    ((l between:0.0 and:1.0)
+    and:[(r between:0.0 and:1.0)
+    and:[(t between:0.0 and:1.0)
+    and:[(b between:0.0 and:1.0)]]]) ifTrue:[
+        newLayout
+            leftFraction:l;
+            rightFraction:r;
+            topFraction:t;
+            bottomFraction:b.
     ] ifFalse:[
-	newLayout
-	    leftOffset:left;
-	    rightFraction:0 offset:right;
-	    topOffset:top;
-	    bottomFraction:0 offset:bot.
+        newLayout
+            leftOffset:l;
+            rightFraction:0 offset:r;
+            topOffset:t;
+            bottomFraction:0 offset:b.
     ].
     ^ newLayout
 
@@ -574,6 +574,8 @@
      (0@0 corner:1@1) asFractionalLayout             
      (0@0 corner:1@1) asOffsetLayout                 
     "
+
+    "Modified: 5.6.1996 / 00:45:46 / cg"
 !
 
 asOffsetLayout
@@ -672,8 +674,8 @@
 
 rectangleRelativeTo:aRectangle preferred:prefRect
     "compute a displayRectangle, treating the receiver like a
-     layoutorigin. This allows point to be used interchangable with
-     LayoutOrigins."
+     layoutFrame. 
+     This allows rectangles to be used interchangable with Layouts."
 
     ^ (self asLayout) rectangleRelativeTo:aRectangle preferred:prefRect
 
@@ -682,6 +684,8 @@
 
      (0.5@0.5) rectangleRelativeTo:(0@0 corner:100@100) preferred:(0@0 corner:50@50) 
     "
+
+    "Modified: 5.6.1996 / 17:24:11 / cg"
 ! !
 
 !Rectangle methodsFor:'destructive rectangle operations'!
@@ -1400,5 +1404,5 @@
 !Rectangle class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.45 1996-06-04 14:09:49 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Rectangle.st,v 1.46 1996-06-05 15:24:33 cg Exp $'
 ! !