class: LayoutFrame
authorClaus Gittinger <cg@exept.de>
Sat, 17 May 2014 16:50:37 +0200
changeset 3337 d0becaeb96b9
parent 3336 8ad040c5ebc2
child 3338 3205b8371f79
class: LayoutFrame added: #bottomFrame: #topFrame: #topInset:
LayoutFrame.st
--- a/LayoutFrame.st	Fri May 16 17:58:08 2014 +0200
+++ b/LayoutFrame.st	Sat May 17 16:50:37 2014 +0200
@@ -130,6 +130,16 @@
 
 !LayoutFrame class methodsFor:'instance creation'!
 
+bottomFrame:pixels
+    "create a new layoutFrame which makes the child take a fixed frame at the bottom"
+
+    ^ self
+        leftFraction:0 offset:0
+        rightFraction:1 offset:0
+        topFraction:1 offset:pixels negated 
+        bottomFraction:1 offset:0
+!
+
 bottomInset:pixels
     "create a new layoutFrame which insets the child at the bottom by some pixels"
 
@@ -244,6 +254,26 @@
         rightFraction:rightFraction offset:rightOffset
         topFraction:topFraction offset:rightOffset 
         bottomFraction:bottomFraction offset:bottomOffset 
+!
+
+topFrame:pixels
+    "create a new layoutFrame which makes the child take a fixed frame at the top"
+
+    ^ self
+        leftFraction:0 offset:0
+        rightFraction:1 offset:0
+        topFraction:0 offset:0 
+        bottomFraction:0 offset:pixels
+!
+
+topInset:pixels
+    "create a new layoutFrame which insets the child at the top by some pixels"
+
+    ^ self
+        leftFraction:0 offset:0
+        rightFraction:1 offset:0
+        topFraction:0 offset:pixels 
+        bottomFraction:1 offset:0
 ! !
 
 !LayoutFrame methodsFor:'accessing'!
@@ -575,10 +605,10 @@
 !LayoutFrame class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/LayoutFrame.st,v 1.39 2014-05-07 22:07:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/LayoutFrame.st,v 1.40 2014-05-17 14:50:37 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview2/LayoutFrame.st,v 1.39 2014-05-07 22:07:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/LayoutFrame.st,v 1.40 2014-05-17 14:50:37 cg Exp $'
 ! !