--- a/AlignOrg.st Thu Nov 23 11:43:41 1995 +0100
+++ b/AlignOrg.st Thu Nov 23 18:42:34 1995 +0100
@@ -106,36 +106,74 @@
top open
"
-!
-
-version
- ^ '$Header: /cvs/stx/stx/libview2/Attic/AlignOrg.st,v 1.7 1995-11-11 16:04:11 cg Exp $'
! !
!AlignmentOrigin methodsFor:'accessing'!
+leftAlignmentFraction
+ "return leftAlignmentFraction"
+
+ ^ leftAlignmentFraction
+!
+
leftAlignmentFraction:something
"set leftAlignmentFraction"
leftAlignmentFraction := something.
!
-leftAlignmentFraction
- "return leftAlignmentFraction"
+topAlignmentFraction
+ "return topAlignmentFraction"
- ^ leftAlignmentFraction
+ ^ topFraction
!
topAlignmentFraction:something
"set topAlignmentFraction"
topAlignmentFraction := something.
+! !
+
+!AlignmentOrigin methodsFor:'converting'!
+
+fromLiteralArrayEncoding:encoding
+ "read my values from an encoding.
+ The encoding is supposed to be of the form:
+ (AlignmentOrigin orgOffsX relOrgX orgOffsY relOrgY leftAlignFract topAlignFract)"
+
+ leftOffset := encoding at:2.
+ leftFraction := encoding at:3.
+ topOffset := encoding at:4.
+ topFraction := encoding at:5.
+ leftAlignmentFraction := encoding at:6.
+ topAlignmentFraction := encoding at:7.
+
+
+ "
+ AlignmentOrigin new fromLiteralArrayEncoding:#(#AlignmentOrigin 70 0 2 0 0.5 0.25)
+ "
+
+ "Modified: 1.9.1995 / 02:23:53 / claus"
!
-topAlignmentFraction
- "return topAlignmentFraction"
+literalArrayEncoding
+ "encode myself as an array.
+ The encoding is:
+ (#AlignmentOrigin orgOffsX relOrgX orgOffsY relOrgY leftAlignFract topAlignFract)"
- ^ topFraction
+ ^ super literalArrayEncoding
+ , (Array
+ with:leftAlignmentFraction
+ with:topAlignmentFraction)
+
+ "Modified: 1.9.1995 / 02:43:35 / claus"
+! !
+
+!AlignmentOrigin methodsFor:'initialization'!
+
+initialize
+ super initialize.
+ leftAlignmentFraction := topAlignmentFraction := 0.
! !
!AlignmentOrigin methodsFor:'printing & storing'!
@@ -151,7 +189,6 @@
, ')'
! !
-
!AlignmentOrigin methodsFor:'queries'!
rectangleRelativeTo:superRectangle preferred:prefRect
@@ -194,44 +231,8 @@
"
! !
-!AlignmentOrigin methodsFor:'initialization'!
-
-initialize
- super initialize.
- leftAlignmentFraction := topAlignmentFraction := 0.
-! !
-
-!AlignmentOrigin methodsFor:'converting'!
-
-literalArrayEncoding
- "encode myself as an array.
- The encoding is:
- (#AlignmentOrigin orgOffsX relOrgX orgOffsY relOrgY leftAlignFract topAlignFract)"
-
- ^ super literalArrayEncoding
- , (Array
- with:leftAlignmentFraction
- with:topAlignmentFraction)
+!AlignmentOrigin class methodsFor:'documentation'!
- "Modified: 1.9.1995 / 02:43:35 / claus"
-!
-
-fromLiteralArrayEncoding:encoding
- "read my values from an encoding.
- The encoding is supposed to be of the form:
- (AlignmentOrigin orgOffsX relOrgX orgOffsY relOrgY leftAlignFract topAlignFract)"
-
- leftOffset := encoding at:2.
- leftFraction := encoding at:3.
- topOffset := encoding at:4.
- topFraction := encoding at:5.
- leftAlignmentFraction := encoding at:6.
- topAlignmentFraction := encoding at:7.
-
-
- "
- AlignmentOrigin new fromLiteralArrayEncoding:#(#AlignmentOrigin 70 0 2 0 0.5 0.25)
- "
-
- "Modified: 1.9.1995 / 02:23:53 / claus"
+version
+ ^ '$Header: /cvs/stx/stx/libview2/Attic/AlignOrg.st,v 1.8 1995-11-23 17:42:13 cg Exp $'
! !
--- a/AlignmentOrigin.st Thu Nov 23 11:43:41 1995 +0100
+++ b/AlignmentOrigin.st Thu Nov 23 18:42:34 1995 +0100
@@ -106,36 +106,74 @@
top open
"
-!
-
-version
- ^ '$Header: /cvs/stx/stx/libview2/AlignmentOrigin.st,v 1.7 1995-11-11 16:04:11 cg Exp $'
! !
!AlignmentOrigin methodsFor:'accessing'!
+leftAlignmentFraction
+ "return leftAlignmentFraction"
+
+ ^ leftAlignmentFraction
+!
+
leftAlignmentFraction:something
"set leftAlignmentFraction"
leftAlignmentFraction := something.
!
-leftAlignmentFraction
- "return leftAlignmentFraction"
+topAlignmentFraction
+ "return topAlignmentFraction"
- ^ leftAlignmentFraction
+ ^ topFraction
!
topAlignmentFraction:something
"set topAlignmentFraction"
topAlignmentFraction := something.
+! !
+
+!AlignmentOrigin methodsFor:'converting'!
+
+fromLiteralArrayEncoding:encoding
+ "read my values from an encoding.
+ The encoding is supposed to be of the form:
+ (AlignmentOrigin orgOffsX relOrgX orgOffsY relOrgY leftAlignFract topAlignFract)"
+
+ leftOffset := encoding at:2.
+ leftFraction := encoding at:3.
+ topOffset := encoding at:4.
+ topFraction := encoding at:5.
+ leftAlignmentFraction := encoding at:6.
+ topAlignmentFraction := encoding at:7.
+
+
+ "
+ AlignmentOrigin new fromLiteralArrayEncoding:#(#AlignmentOrigin 70 0 2 0 0.5 0.25)
+ "
+
+ "Modified: 1.9.1995 / 02:23:53 / claus"
!
-topAlignmentFraction
- "return topAlignmentFraction"
+literalArrayEncoding
+ "encode myself as an array.
+ The encoding is:
+ (#AlignmentOrigin orgOffsX relOrgX orgOffsY relOrgY leftAlignFract topAlignFract)"
- ^ topFraction
+ ^ super literalArrayEncoding
+ , (Array
+ with:leftAlignmentFraction
+ with:topAlignmentFraction)
+
+ "Modified: 1.9.1995 / 02:43:35 / claus"
+! !
+
+!AlignmentOrigin methodsFor:'initialization'!
+
+initialize
+ super initialize.
+ leftAlignmentFraction := topAlignmentFraction := 0.
! !
!AlignmentOrigin methodsFor:'printing & storing'!
@@ -151,7 +189,6 @@
, ')'
! !
-
!AlignmentOrigin methodsFor:'queries'!
rectangleRelativeTo:superRectangle preferred:prefRect
@@ -194,44 +231,8 @@
"
! !
-!AlignmentOrigin methodsFor:'initialization'!
-
-initialize
- super initialize.
- leftAlignmentFraction := topAlignmentFraction := 0.
-! !
-
-!AlignmentOrigin methodsFor:'converting'!
-
-literalArrayEncoding
- "encode myself as an array.
- The encoding is:
- (#AlignmentOrigin orgOffsX relOrgX orgOffsY relOrgY leftAlignFract topAlignFract)"
-
- ^ super literalArrayEncoding
- , (Array
- with:leftAlignmentFraction
- with:topAlignmentFraction)
+!AlignmentOrigin class methodsFor:'documentation'!
- "Modified: 1.9.1995 / 02:43:35 / claus"
-!
-
-fromLiteralArrayEncoding:encoding
- "read my values from an encoding.
- The encoding is supposed to be of the form:
- (AlignmentOrigin orgOffsX relOrgX orgOffsY relOrgY leftAlignFract topAlignFract)"
-
- leftOffset := encoding at:2.
- leftFraction := encoding at:3.
- topOffset := encoding at:4.
- topFraction := encoding at:5.
- leftAlignmentFraction := encoding at:6.
- topAlignmentFraction := encoding at:7.
-
-
- "
- AlignmentOrigin new fromLiteralArrayEncoding:#(#AlignmentOrigin 70 0 2 0 0.5 0.25)
- "
-
- "Modified: 1.9.1995 / 02:23:53 / claus"
+version
+ ^ '$Header: /cvs/stx/stx/libview2/AlignmentOrigin.st,v 1.8 1995-11-23 17:42:13 cg Exp $'
! !
--- a/Layout.st Thu Nov 23 11:43:41 1995 +0100
+++ b/Layout.st Thu Nov 23 18:42:34 1995 +0100
@@ -52,10 +52,6 @@
the corresponding ST-80 class. If you encounter any incompatibilities,
please forward a note to the ST/X team.
"
-!
-
-version
- ^ '$Header: /cvs/stx/stx/libview2/Layout.st,v 1.7 1995-11-11 16:04:37 cg Exp $'
! !
!Layout class methodsFor:'instance creation'!
@@ -64,18 +60,24 @@
^ self basicNew initialize
! !
-!Layout methodsFor:'queries'!
-
-rectangleRelativeTo:superRectangle preferred:prefRect
- ^ self subclassResponsibility
-!
-
-isLayout
- ^ true
-! !
-
!Layout methodsFor:'initialization'!
initialize
^ self subclassResponsibility
! !
+
+!Layout methodsFor:'queries'!
+
+isLayout
+ ^ true
+!
+
+rectangleRelativeTo:superRectangle preferred:prefRect
+ ^ self subclassResponsibility
+! !
+
+!Layout class methodsFor:'documentation'!
+
+version
+ ^ '$Header: /cvs/stx/stx/libview2/Layout.st,v 1.8 1995-11-23 17:42:29 cg Exp $'
+! !
--- a/LayoutFrame.st Thu Nov 23 11:43:41 1995 +0100
+++ b/LayoutFrame.st Thu Nov 23 18:42:34 1995 +0100
@@ -10,11 +10,8 @@
hereby transferred.
"
-'From Smalltalk/X, Version:2.10.5 on 15-apr-1995 at 12:14:46 pm'!
-
LayoutOrigin subclass:#LayoutFrame
- instanceVariableNames:'rightFraction bottomFraction
- rightOffset bottomOffset'
+ instanceVariableNames:'rightFraction bottomFraction rightOffset bottomOffset'
classVariableNames:''
poolDictionaries:''
category:'Graphics-Geometry'
@@ -106,18 +103,39 @@
top open
"
-!
-
-version
- ^ '$Header: /cvs/stx/stx/libview2/LayoutFrame.st,v 1.9 1995-11-11 16:04:39 cg Exp $'
! !
!LayoutFrame methodsFor:'accessing'!
-rightFraction:something
- "set rightFraction"
+bottomFraction
+ "return bottomFraction"
+
+ ^ bottomFraction
+!
+
+bottomFraction:something
+ "set bottomFraction"
+
+ bottomFraction := something.
+!
+
+bottomFraction:something offset:o
+ "set bottomFraction and offset"
- rightFraction := something.
+ bottomFraction := something.
+ bottomOffset := o
+!
+
+bottomOffset
+ "return bottomOffset"
+
+ ^ bottomOffset
+!
+
+bottomOffset:something
+ "set bottomOffset"
+
+ bottomOffset := something.
!
rightFraction
@@ -126,16 +144,10 @@
^ rightFraction
!
-rightOffset:something
- "set rightOffset"
+rightFraction:something
+ "set rightFraction"
- rightOffset := something.
-!
-
-rightOffset
- "return rightOffset"
-
- ^ rightOffset
+ rightFraction := something.
!
rightFraction:something offset:o
@@ -145,37 +157,63 @@
rightOffset := o
!
-bottomFraction:something
- "set bottomFraction"
+rightOffset
+ "return rightOffset"
- bottomFraction := something.
-!
-
-bottomFraction
- "return bottomFraction"
-
- ^ bottomFraction
+ ^ rightOffset
!
-bottomOffset:something
- "set bottomOffset"
+rightOffset:something
+ "set rightOffset"
+
+ rightOffset := something.
+! !
+
+!LayoutFrame methodsFor:'converting'!
+
+fromLiteralArrayEncoding:encoding
+ "read my values from an encoding.
+ The encoding is supposed to be of the form:
+ (LayoutFrame orgOffsX relOrgX orgOffsY relOrgY cornOffsX relCornX cornOffsY relCornY)
+ This is the reverse to literalArrayEncoding."
- bottomOffset := something.
+ leftOffset := encoding at:2.
+ leftFraction := encoding at:3.
+ topOffset := encoding at:4.
+ topFraction := encoding at:5.
+ rightOffset := encoding at:6.
+ rightFraction := encoding at:7.
+ bottomOffset := encoding at:8.
+ bottomFraction := encoding at:9.
+
+ "
+ LayoutFrame new fromLiteralArrayEncoding:#(#LayoutFrame 70 0 2 0 0 1 25 0 )
+ #(#LayoutFrame 70 0 2 0 0 1 25 0 ) decodeAsLiteralArray
+ "
!
-bottomOffset
- "return bottomOffset"
-
- ^ bottomOffset
-!
+literalArrayEncoding
+ "encode myself as an array.
+ The encoding is:
+ (#LayoutOrigin orgOffsX relOrgX orgOffsY relOrgY cornOffsX relCornX cornOffsY relCornY)"
-bottomFraction:something offset:o
- "set bottomFraction and offset"
+ ^ super literalArrayEncoding
+ , (Array
+ with:rightOffset
+ with:rightFraction
+ with:bottomOffset
+ with:bottomFraction)
- bottomFraction := something.
- bottomOffset := o
+ "Modified: 1.9.1995 / 02:43:35 / claus"
! !
+!LayoutFrame methodsFor:'initialization'!
+
+initialize
+ leftOffset := rightOffset := bottomOffset := topOffset := 0.
+ leftFraction := topFraction := 0.
+ bottomFraction := rightFraction := 1.
+! !
!LayoutFrame methodsFor:'printing & storing'!
@@ -194,6 +232,10 @@
!LayoutFrame methodsFor:'queries'!
+corner
+ ^ rightFraction asFloat @ bottomFraction asFloat
+!
+
rectangleRelativeTo:superRectangle preferred:prefRect
|x1 y1 x2 y2|
@@ -242,54 +284,10 @@
bottomFraction:0.75.
lF rectangleRelativeTo:superRect preferred:(0@0 corner:30@30)
"
-!
-
-corner
- ^ rightFraction asFloat @ bottomFraction asFloat
-! !
-
-!LayoutFrame methodsFor:'initialization'!
-
-initialize
- leftOffset := rightOffset := bottomOffset := topOffset := 0.
- leftFraction := topFraction := 0.
- bottomFraction := rightFraction := 1.
! !
-!LayoutFrame methodsFor:'converting'!
-
-literalArrayEncoding
- "encode myself as an array.
- The encoding is:
- (#LayoutOrigin orgOffsX relOrgX orgOffsY relOrgY cornOffsX relCornX cornOffsY relCornY)"
-
- ^ super literalArrayEncoding
- , (Array
- with:rightOffset
- with:rightFraction
- with:bottomOffset
- with:bottomFraction)
-
- "Modified: 1.9.1995 / 02:43:35 / claus"
-!
+!LayoutFrame class methodsFor:'documentation'!
-fromLiteralArrayEncoding:encoding
- "read my values from an encoding.
- The encoding is supposed to be of the form:
- (LayoutFrame orgOffsX relOrgX orgOffsY relOrgY cornOffsX relCornX cornOffsY relCornY)
- This is the reverse to literalArrayEncoding."
-
- leftOffset := encoding at:2.
- leftFraction := encoding at:3.
- topOffset := encoding at:4.
- topFraction := encoding at:5.
- rightOffset := encoding at:6.
- rightFraction := encoding at:7.
- bottomOffset := encoding at:8.
- bottomFraction := encoding at:9.
-
- "
- LayoutFrame new fromLiteralArrayEncoding:#(#LayoutFrame 70 0 2 0 0 1 25 0 )
- #(#LayoutFrame 70 0 2 0 0 1 25 0 ) decodeAsLiteralArray
- "
+version
+ ^ '$Header: /cvs/stx/stx/libview2/LayoutFrame.st,v 1.10 1995-11-23 17:42:08 cg Exp $'
! !
--- a/LayoutFrm.st Thu Nov 23 11:43:41 1995 +0100
+++ b/LayoutFrm.st Thu Nov 23 18:42:34 1995 +0100
@@ -10,11 +10,8 @@
hereby transferred.
"
-'From Smalltalk/X, Version:2.10.5 on 15-apr-1995 at 12:14:46 pm'!
-
LayoutOrigin subclass:#LayoutFrame
- instanceVariableNames:'rightFraction bottomFraction
- rightOffset bottomOffset'
+ instanceVariableNames:'rightFraction bottomFraction rightOffset bottomOffset'
classVariableNames:''
poolDictionaries:''
category:'Graphics-Geometry'
@@ -106,18 +103,39 @@
top open
"
-!
-
-version
- ^ '$Header: /cvs/stx/stx/libview2/Attic/LayoutFrm.st,v 1.9 1995-11-11 16:04:39 cg Exp $'
! !
!LayoutFrame methodsFor:'accessing'!
-rightFraction:something
- "set rightFraction"
+bottomFraction
+ "return bottomFraction"
+
+ ^ bottomFraction
+!
+
+bottomFraction:something
+ "set bottomFraction"
+
+ bottomFraction := something.
+!
+
+bottomFraction:something offset:o
+ "set bottomFraction and offset"
- rightFraction := something.
+ bottomFraction := something.
+ bottomOffset := o
+!
+
+bottomOffset
+ "return bottomOffset"
+
+ ^ bottomOffset
+!
+
+bottomOffset:something
+ "set bottomOffset"
+
+ bottomOffset := something.
!
rightFraction
@@ -126,16 +144,10 @@
^ rightFraction
!
-rightOffset:something
- "set rightOffset"
+rightFraction:something
+ "set rightFraction"
- rightOffset := something.
-!
-
-rightOffset
- "return rightOffset"
-
- ^ rightOffset
+ rightFraction := something.
!
rightFraction:something offset:o
@@ -145,37 +157,63 @@
rightOffset := o
!
-bottomFraction:something
- "set bottomFraction"
+rightOffset
+ "return rightOffset"
- bottomFraction := something.
-!
-
-bottomFraction
- "return bottomFraction"
-
- ^ bottomFraction
+ ^ rightOffset
!
-bottomOffset:something
- "set bottomOffset"
+rightOffset:something
+ "set rightOffset"
+
+ rightOffset := something.
+! !
+
+!LayoutFrame methodsFor:'converting'!
+
+fromLiteralArrayEncoding:encoding
+ "read my values from an encoding.
+ The encoding is supposed to be of the form:
+ (LayoutFrame orgOffsX relOrgX orgOffsY relOrgY cornOffsX relCornX cornOffsY relCornY)
+ This is the reverse to literalArrayEncoding."
- bottomOffset := something.
+ leftOffset := encoding at:2.
+ leftFraction := encoding at:3.
+ topOffset := encoding at:4.
+ topFraction := encoding at:5.
+ rightOffset := encoding at:6.
+ rightFraction := encoding at:7.
+ bottomOffset := encoding at:8.
+ bottomFraction := encoding at:9.
+
+ "
+ LayoutFrame new fromLiteralArrayEncoding:#(#LayoutFrame 70 0 2 0 0 1 25 0 )
+ #(#LayoutFrame 70 0 2 0 0 1 25 0 ) decodeAsLiteralArray
+ "
!
-bottomOffset
- "return bottomOffset"
-
- ^ bottomOffset
-!
+literalArrayEncoding
+ "encode myself as an array.
+ The encoding is:
+ (#LayoutOrigin orgOffsX relOrgX orgOffsY relOrgY cornOffsX relCornX cornOffsY relCornY)"
-bottomFraction:something offset:o
- "set bottomFraction and offset"
+ ^ super literalArrayEncoding
+ , (Array
+ with:rightOffset
+ with:rightFraction
+ with:bottomOffset
+ with:bottomFraction)
- bottomFraction := something.
- bottomOffset := o
+ "Modified: 1.9.1995 / 02:43:35 / claus"
! !
+!LayoutFrame methodsFor:'initialization'!
+
+initialize
+ leftOffset := rightOffset := bottomOffset := topOffset := 0.
+ leftFraction := topFraction := 0.
+ bottomFraction := rightFraction := 1.
+! !
!LayoutFrame methodsFor:'printing & storing'!
@@ -194,6 +232,10 @@
!LayoutFrame methodsFor:'queries'!
+corner
+ ^ rightFraction asFloat @ bottomFraction asFloat
+!
+
rectangleRelativeTo:superRectangle preferred:prefRect
|x1 y1 x2 y2|
@@ -242,54 +284,10 @@
bottomFraction:0.75.
lF rectangleRelativeTo:superRect preferred:(0@0 corner:30@30)
"
-!
-
-corner
- ^ rightFraction asFloat @ bottomFraction asFloat
-! !
-
-!LayoutFrame methodsFor:'initialization'!
-
-initialize
- leftOffset := rightOffset := bottomOffset := topOffset := 0.
- leftFraction := topFraction := 0.
- bottomFraction := rightFraction := 1.
! !
-!LayoutFrame methodsFor:'converting'!
-
-literalArrayEncoding
- "encode myself as an array.
- The encoding is:
- (#LayoutOrigin orgOffsX relOrgX orgOffsY relOrgY cornOffsX relCornX cornOffsY relCornY)"
-
- ^ super literalArrayEncoding
- , (Array
- with:rightOffset
- with:rightFraction
- with:bottomOffset
- with:bottomFraction)
-
- "Modified: 1.9.1995 / 02:43:35 / claus"
-!
+!LayoutFrame class methodsFor:'documentation'!
-fromLiteralArrayEncoding:encoding
- "read my values from an encoding.
- The encoding is supposed to be of the form:
- (LayoutFrame orgOffsX relOrgX orgOffsY relOrgY cornOffsX relCornX cornOffsY relCornY)
- This is the reverse to literalArrayEncoding."
-
- leftOffset := encoding at:2.
- leftFraction := encoding at:3.
- topOffset := encoding at:4.
- topFraction := encoding at:5.
- rightOffset := encoding at:6.
- rightFraction := encoding at:7.
- bottomOffset := encoding at:8.
- bottomFraction := encoding at:9.
-
- "
- LayoutFrame new fromLiteralArrayEncoding:#(#LayoutFrame 70 0 2 0 0 1 25 0 )
- #(#LayoutFrame 70 0 2 0 0 1 25 0 ) decodeAsLiteralArray
- "
+version
+ ^ '$Header: /cvs/stx/stx/libview2/Attic/LayoutFrm.st,v 1.10 1995-11-23 17:42:08 cg Exp $'
! !
--- a/LayoutOrg.st Thu Nov 23 11:43:41 1995 +0100
+++ b/LayoutOrg.st Thu Nov 23 18:42:34 1995 +0100
@@ -10,11 +10,8 @@
hereby transferred.
"
-'From Smalltalk/X, Version:2.10.5 on 15-apr-1995 at 12:14:46 pm'!
-
Layout subclass:#LayoutOrigin
- instanceVariableNames:'leftFraction topFraction leftOffset
- topOffset'
+ instanceVariableNames:'leftFraction topFraction leftOffset topOffset'
classVariableNames:''
poolDictionaries:''
category:'Graphics-Geometry'
@@ -90,10 +87,6 @@
top open
"
-!
-
-version
- ^ '$Header: /cvs/stx/stx/libview2/Attic/LayoutOrg.st,v 1.8 1995-11-11 16:04:40 cg Exp $'
! !
!LayoutOrigin class methodsFor:'instance creation'!
@@ -109,17 +102,6 @@
"
!
-offsetFromPoint:aPoint
- "given a point, create a layoutOrigin representing the same
- absolute (pixel) origin."
-
- ^ self new leftOffset:aPoint x topOffset:aPoint y
-
- "
- LayoutOrigin offsetFromPoint:100@100
- "
-!
-
fromPoint:aPoint
"return a new LayoutOrigin from aPoint.
If the coordinates are between 0 and 1, take
@@ -144,6 +126,143 @@
LayoutOrigin fromPoint:0.5@0.5
LayoutOrigin fromPoint:0.5@100
"
+!
+
+offsetFromPoint:aPoint
+ "given a point, create a layoutOrigin representing the same
+ absolute (pixel) origin."
+
+ ^ self new leftOffset:aPoint x topOffset:aPoint y
+
+ "
+ LayoutOrigin offsetFromPoint:100@100
+ "
+! !
+
+!LayoutOrigin methodsFor:'accessing'!
+
+leftFraction
+ "return leftFraction"
+
+ ^ leftFraction
+!
+
+leftFraction:something
+ "set leftFraction"
+
+ leftFraction := something.
+!
+
+leftFraction:something offset:o
+ "set leftFraction and offset"
+
+ leftFraction := something.
+ leftOffset := o
+!
+
+leftFraction:newLeft topFraction:newTop
+ "set leftFraction and topFraction"
+
+ leftFraction := newLeft.
+ topFraction := newTop.
+!
+
+leftOffset
+ "return leftOffset"
+
+ ^ leftOffset
+!
+
+leftOffset:something
+ "set leftOffset"
+
+ leftOffset := something.
+!
+
+leftOffset:newLeft topOffset:newTop
+ "set leftOffset and topOffset"
+
+ leftOffset := newLeft.
+ topOffset := newTop.
+!
+
+topFraction
+ "return topFraction"
+
+ ^ topFraction
+!
+
+topFraction:something
+ "set topFraction"
+
+ topFraction := something.
+!
+
+topFraction:something offset:o
+ "set topFraction and offset"
+
+ topFraction := something.
+ topOffset := o
+!
+
+topOffset
+ "return topOffset"
+
+ ^ topOffset
+!
+
+topOffset:something
+ "set topOffset"
+
+ topOffset := something.
+! !
+
+!LayoutOrigin methodsFor:'converting'!
+
+fromLiteralArrayEncoding:encoding
+ "read my values from an encoding.
+ The encoding is supposed to be of the form:
+ (#LayoutOrigin orgOffsX relOrgX orgOffsY relOrgY)
+ This is the reverse operation to #literalArrayEncoding."
+
+ leftOffset := encoding at:2.
+ leftFraction := encoding at:3.
+ topOffset := encoding at:4.
+ topFraction := encoding at:5.
+
+
+ "
+ LayoutOrigin new fromLiteralArrayEncoding:#(#LayoutOrigin 70 0 2 0)
+ "
+!
+
+literalArrayEncoding
+ "encode myself as an array.
+ The encoding is:
+ (#LayoutOrigin orgOffsX relOrgX orgOffsY relOrgY)
+ "
+
+ ^ Array
+ with:self class name asSymbol
+ with:leftOffset
+ with:leftFraction
+ with:topOffset
+ with:topFraction
+
+ "
+ LayoutOrigin new fromLiteralArrayEncoding:#(#LayoutOrigin 70 0 2 0)
+ (LayoutOrigin new leftOffset:10; leftFraction:0.2;
+ topOffset:20; topFraction:0.4) literalArrayEncoding
+ "
+
+ "Modified: 1.9.1995 / 02:43:48 / claus"
+! !
+
+!LayoutOrigin methodsFor:'initialization'!
+
+initialize
+ leftOffset := topOffset := 0.
+ leftFraction := topFraction := 0.
! !
!LayoutOrigin methodsFor:'printing & storing'!
@@ -157,86 +276,12 @@
, ')'
! !
-!LayoutOrigin methodsFor:'accessing'!
-
-leftFraction:something
- "set leftFraction"
-
- leftFraction := something.
-!
-
-leftFraction
- "return leftFraction"
-
- ^ leftFraction
-!
-
-leftOffset:something
- "set leftOffset"
-
- leftOffset := something.
-!
-
-leftOffset
- "return leftOffset"
-
- ^ leftOffset
-!
-
-leftFraction:something offset:o
- "set leftFraction and offset"
-
- leftFraction := something.
- leftOffset := o
-!
-
-topFraction:something
- "set topFraction"
-
- topFraction := something.
-!
+!LayoutOrigin methodsFor:'queries'!
-topFraction
- "return topFraction"
-
- ^ topFraction
-!
-
-topOffset:something
- "set topOffset"
-
- topOffset := something.
-!
-
-topOffset
- "return topOffset"
-
- ^ topOffset
+origin
+ ^ leftFraction asFloat @ topFraction asFloat
!
-topFraction:something offset:o
- "set topFraction and offset"
-
- topFraction := something.
- topOffset := o
-!
-
-leftFraction:newLeft topFraction:newTop
- "set leftFraction and topFraction"
-
- leftFraction := newLeft.
- topFraction := newTop.
-!
-
-leftOffset:newLeft topOffset:newTop
- "set leftOffset and topOffset"
-
- leftOffset := newLeft.
- topOffset := newTop.
-! !
-
-!LayoutOrigin methodsFor:'queries'!
-
rectangleRelativeTo:superRectangle preferred:prefRect
|x y|
@@ -267,57 +312,10 @@
topFraction:0.5.
lO rectangleRelativeTo:superRect preferred:(0@0 corner:30@30)
"
-!
-
-origin
- ^ leftFraction asFloat @ topFraction asFloat
-! !
-
-!LayoutOrigin methodsFor:'initialization'!
-
-initialize
- leftOffset := topOffset := 0.
- leftFraction := topFraction := 0.
! !
-!LayoutOrigin methodsFor:'converting'!
-
-literalArrayEncoding
- "encode myself as an array.
- The encoding is:
- (#LayoutOrigin orgOffsX relOrgX orgOffsY relOrgY)
- "
-
- ^ Array
- with:self class name asSymbol
- with:leftOffset
- with:leftFraction
- with:topOffset
- with:topFraction
-
- "
- LayoutOrigin new fromLiteralArrayEncoding:#(#LayoutOrigin 70 0 2 0)
- (LayoutOrigin new leftOffset:10; leftFraction:0.2;
- topOffset:20; topFraction:0.4) literalArrayEncoding
- "
+!LayoutOrigin class methodsFor:'documentation'!
- "Modified: 1.9.1995 / 02:43:48 / claus"
-!
-
-fromLiteralArrayEncoding:encoding
- "read my values from an encoding.
- The encoding is supposed to be of the form:
- (#LayoutOrigin orgOffsX relOrgX orgOffsY relOrgY)
- This is the reverse operation to #literalArrayEncoding."
-
- leftOffset := encoding at:2.
- leftFraction := encoding at:3.
- topOffset := encoding at:4.
- topFraction := encoding at:5.
-
-
- "
- LayoutOrigin new fromLiteralArrayEncoding:#(#LayoutOrigin 70 0 2 0)
- "
+version
+ ^ '$Header: /cvs/stx/stx/libview2/Attic/LayoutOrg.st,v 1.9 1995-11-23 17:42:34 cg Exp $'
! !
-
--- a/LayoutOrigin.st Thu Nov 23 11:43:41 1995 +0100
+++ b/LayoutOrigin.st Thu Nov 23 18:42:34 1995 +0100
@@ -10,11 +10,8 @@
hereby transferred.
"
-'From Smalltalk/X, Version:2.10.5 on 15-apr-1995 at 12:14:46 pm'!
-
Layout subclass:#LayoutOrigin
- instanceVariableNames:'leftFraction topFraction leftOffset
- topOffset'
+ instanceVariableNames:'leftFraction topFraction leftOffset topOffset'
classVariableNames:''
poolDictionaries:''
category:'Graphics-Geometry'
@@ -90,10 +87,6 @@
top open
"
-!
-
-version
- ^ '$Header: /cvs/stx/stx/libview2/LayoutOrigin.st,v 1.8 1995-11-11 16:04:40 cg Exp $'
! !
!LayoutOrigin class methodsFor:'instance creation'!
@@ -109,17 +102,6 @@
"
!
-offsetFromPoint:aPoint
- "given a point, create a layoutOrigin representing the same
- absolute (pixel) origin."
-
- ^ self new leftOffset:aPoint x topOffset:aPoint y
-
- "
- LayoutOrigin offsetFromPoint:100@100
- "
-!
-
fromPoint:aPoint
"return a new LayoutOrigin from aPoint.
If the coordinates are between 0 and 1, take
@@ -144,6 +126,143 @@
LayoutOrigin fromPoint:0.5@0.5
LayoutOrigin fromPoint:0.5@100
"
+!
+
+offsetFromPoint:aPoint
+ "given a point, create a layoutOrigin representing the same
+ absolute (pixel) origin."
+
+ ^ self new leftOffset:aPoint x topOffset:aPoint y
+
+ "
+ LayoutOrigin offsetFromPoint:100@100
+ "
+! !
+
+!LayoutOrigin methodsFor:'accessing'!
+
+leftFraction
+ "return leftFraction"
+
+ ^ leftFraction
+!
+
+leftFraction:something
+ "set leftFraction"
+
+ leftFraction := something.
+!
+
+leftFraction:something offset:o
+ "set leftFraction and offset"
+
+ leftFraction := something.
+ leftOffset := o
+!
+
+leftFraction:newLeft topFraction:newTop
+ "set leftFraction and topFraction"
+
+ leftFraction := newLeft.
+ topFraction := newTop.
+!
+
+leftOffset
+ "return leftOffset"
+
+ ^ leftOffset
+!
+
+leftOffset:something
+ "set leftOffset"
+
+ leftOffset := something.
+!
+
+leftOffset:newLeft topOffset:newTop
+ "set leftOffset and topOffset"
+
+ leftOffset := newLeft.
+ topOffset := newTop.
+!
+
+topFraction
+ "return topFraction"
+
+ ^ topFraction
+!
+
+topFraction:something
+ "set topFraction"
+
+ topFraction := something.
+!
+
+topFraction:something offset:o
+ "set topFraction and offset"
+
+ topFraction := something.
+ topOffset := o
+!
+
+topOffset
+ "return topOffset"
+
+ ^ topOffset
+!
+
+topOffset:something
+ "set topOffset"
+
+ topOffset := something.
+! !
+
+!LayoutOrigin methodsFor:'converting'!
+
+fromLiteralArrayEncoding:encoding
+ "read my values from an encoding.
+ The encoding is supposed to be of the form:
+ (#LayoutOrigin orgOffsX relOrgX orgOffsY relOrgY)
+ This is the reverse operation to #literalArrayEncoding."
+
+ leftOffset := encoding at:2.
+ leftFraction := encoding at:3.
+ topOffset := encoding at:4.
+ topFraction := encoding at:5.
+
+
+ "
+ LayoutOrigin new fromLiteralArrayEncoding:#(#LayoutOrigin 70 0 2 0)
+ "
+!
+
+literalArrayEncoding
+ "encode myself as an array.
+ The encoding is:
+ (#LayoutOrigin orgOffsX relOrgX orgOffsY relOrgY)
+ "
+
+ ^ Array
+ with:self class name asSymbol
+ with:leftOffset
+ with:leftFraction
+ with:topOffset
+ with:topFraction
+
+ "
+ LayoutOrigin new fromLiteralArrayEncoding:#(#LayoutOrigin 70 0 2 0)
+ (LayoutOrigin new leftOffset:10; leftFraction:0.2;
+ topOffset:20; topFraction:0.4) literalArrayEncoding
+ "
+
+ "Modified: 1.9.1995 / 02:43:48 / claus"
+! !
+
+!LayoutOrigin methodsFor:'initialization'!
+
+initialize
+ leftOffset := topOffset := 0.
+ leftFraction := topFraction := 0.
! !
!LayoutOrigin methodsFor:'printing & storing'!
@@ -157,86 +276,12 @@
, ')'
! !
-!LayoutOrigin methodsFor:'accessing'!
-
-leftFraction:something
- "set leftFraction"
-
- leftFraction := something.
-!
-
-leftFraction
- "return leftFraction"
-
- ^ leftFraction
-!
-
-leftOffset:something
- "set leftOffset"
-
- leftOffset := something.
-!
-
-leftOffset
- "return leftOffset"
-
- ^ leftOffset
-!
-
-leftFraction:something offset:o
- "set leftFraction and offset"
-
- leftFraction := something.
- leftOffset := o
-!
-
-topFraction:something
- "set topFraction"
-
- topFraction := something.
-!
+!LayoutOrigin methodsFor:'queries'!
-topFraction
- "return topFraction"
-
- ^ topFraction
-!
-
-topOffset:something
- "set topOffset"
-
- topOffset := something.
-!
-
-topOffset
- "return topOffset"
-
- ^ topOffset
+origin
+ ^ leftFraction asFloat @ topFraction asFloat
!
-topFraction:something offset:o
- "set topFraction and offset"
-
- topFraction := something.
- topOffset := o
-!
-
-leftFraction:newLeft topFraction:newTop
- "set leftFraction and topFraction"
-
- leftFraction := newLeft.
- topFraction := newTop.
-!
-
-leftOffset:newLeft topOffset:newTop
- "set leftOffset and topOffset"
-
- leftOffset := newLeft.
- topOffset := newTop.
-! !
-
-!LayoutOrigin methodsFor:'queries'!
-
rectangleRelativeTo:superRectangle preferred:prefRect
|x y|
@@ -267,57 +312,10 @@
topFraction:0.5.
lO rectangleRelativeTo:superRect preferred:(0@0 corner:30@30)
"
-!
-
-origin
- ^ leftFraction asFloat @ topFraction asFloat
-! !
-
-!LayoutOrigin methodsFor:'initialization'!
-
-initialize
- leftOffset := topOffset := 0.
- leftFraction := topFraction := 0.
! !
-!LayoutOrigin methodsFor:'converting'!
-
-literalArrayEncoding
- "encode myself as an array.
- The encoding is:
- (#LayoutOrigin orgOffsX relOrgX orgOffsY relOrgY)
- "
-
- ^ Array
- with:self class name asSymbol
- with:leftOffset
- with:leftFraction
- with:topOffset
- with:topFraction
-
- "
- LayoutOrigin new fromLiteralArrayEncoding:#(#LayoutOrigin 70 0 2 0)
- (LayoutOrigin new leftOffset:10; leftFraction:0.2;
- topOffset:20; topFraction:0.4) literalArrayEncoding
- "
+!LayoutOrigin class methodsFor:'documentation'!
- "Modified: 1.9.1995 / 02:43:48 / claus"
-!
-
-fromLiteralArrayEncoding:encoding
- "read my values from an encoding.
- The encoding is supposed to be of the form:
- (#LayoutOrigin orgOffsX relOrgX orgOffsY relOrgY)
- This is the reverse operation to #literalArrayEncoding."
-
- leftOffset := encoding at:2.
- leftFraction := encoding at:3.
- topOffset := encoding at:4.
- topFraction := encoding at:5.
-
-
- "
- LayoutOrigin new fromLiteralArrayEncoding:#(#LayoutOrigin 70 0 2 0)
- "
+version
+ ^ '$Header: /cvs/stx/stx/libview2/LayoutOrigin.st,v 1.9 1995-11-23 17:42:34 cg Exp $'
! !
-