*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Fri, 28 Nov 1997 20:07:46 +0100
changeset 742 fd4d0931b4a8
parent 741 59bf61da6319
child 743 43be299fc515
*** empty log message ***
AlignOrg.st
AlignmentOrigin.st
--- a/AlignOrg.st	Tue Nov 25 14:35:39 1997 +0100
+++ b/AlignOrg.st	Fri Nov 28 20:07:46 1997 +0100
@@ -44,18 +44,18 @@
     The reference point itself is specified as fraction of the components size.
 
     Notice: 
-        this class was implemented using protocol information
-        from alpha testers - it may not be complete or compatible to
-        the corresponding ST-80 class. 
-        If you encounter any incompatibilities, please forward a note 
-        describing the incompatibility verbal (i.e. no code) to the ST/X team.
+	this class was implemented using protocol information
+	from alpha testers - it may not be complete or compatible to
+	the corresponding ST-80 class. 
+	If you encounter any incompatibilities, please forward a note 
+	describing the incompatibility verbal (i.e. no code) to the ST/X team.
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 
     [See also:]
-        LayoutOrigin LayoutFrame Layout
-        View
+	LayoutOrigin LayoutFrame Layout
+	View
 "
 !
 
@@ -66,95 +66,95 @@
 
     using a LayoutOrigin, to control the top-left origins position of
     a component (i.e. origin at:0.5@0.5):
-                                                                        [exBegin]
-        |top button|
+									[exBegin]
+	|top button|
 
-        top := StandardSystemView new.
-        top extent:300@300.
+	top := StandardSystemView new.
+	top extent:300@300.
 
-        button := Button label:'component'.
-        top add:button in:(LayoutOrigin new
-                                leftFraction:0.5;
-                                topFraction:0.5).
+	button := Button label:'component'.
+	top add:button in:(LayoutOrigin new
+				leftFraction:0.5;
+				topFraction:0.5).
 
-        top open
-                                                                        [exEnd]
+	top open
+									[exEnd]
 
 
     using an AlignmentOrigin, to control the centers position of
     a component (i.e. center of component at:0.5@0.5):
-                                                                        [exBegin]
-        |top button|
+									[exBegin]
+	|top button|
 
-        top := StandardSystemView new.
-        top extent:300@300.
+	top := StandardSystemView new.
+	top extent:300@300.
 
-        button := Button label:'component'.
-        top add:button in:(AlignmentOrigin new
-                                leftFraction:0.5;
-                                topFraction:0.5;
-                                leftAlignmentFraction:0.5;
-                                topAlignmentFraction:0.5).
+	button := Button label:'component'.
+	top add:button in:(AlignmentOrigin new
+				leftFraction:0.5;
+				topFraction:0.5;
+				leftAlignmentFraction:0.5;
+				topAlignmentFraction:0.5).
 
-        top open
-                                                                        [exEnd]
+	top open
+									[exEnd]
 
 
     using an AlignmentOrigin, to control the bottom-right position of
     a component (i.e. bottom-right of component at:0.5@0.5):
-                                                                        [exBegin]
-        |top button|
+									[exBegin]
+	|top button|
 
-        top := StandardSystemView new.
-        top extent:300@300.
+	top := StandardSystemView new.
+	top extent:300@300.
 
-        button := Button label:'component'.
-        top add:button in:(AlignmentOrigin new
-                                leftFraction:0.5;
-                                topFraction:0.5;
-                                leftAlignmentFraction:1.0;
-                                topAlignmentFraction:1.0).
+	button := Button label:'component'.
+	top add:button in:(AlignmentOrigin new
+				leftFraction:0.5;
+				topFraction:0.5;
+				leftAlignmentFraction:1.0;
+				topAlignmentFraction:1.0).
 
-        top open
-                                                                        [exEnd]
+	top open
+									[exEnd]
 
 
     four buttons around relative 0.75@0.75:
-                                                                        [exBegin]
-        |top button|
+									[exBegin]
+	|top button|
 
-        top := StandardSystemView new.
-        top extent:300@300.
+	top := StandardSystemView new.
+	top extent:300@300.
 
-        button := Button label:'button1'.
-        top add:button in:(AlignmentOrigin new
-                                leftFraction:0.75;
-                                topFraction:0.75;
-                                leftAlignmentFraction:1.0;
-                                topAlignmentFraction:1.0).
+	button := Button label:'button1'.
+	top add:button in:(AlignmentOrigin new
+				leftFraction:0.75;
+				topFraction:0.75;
+				leftAlignmentFraction:1.0;
+				topAlignmentFraction:1.0).
 
-        button := Button label:'button2'.
-        top add:button in:(AlignmentOrigin new
-                                leftFraction:0.75;
-                                topFraction:0.75;
-                                leftAlignmentFraction:0.0;
-                                topAlignmentFraction:1.0).
+	button := Button label:'button2'.
+	top add:button in:(AlignmentOrigin new
+				leftFraction:0.75;
+				topFraction:0.75;
+				leftAlignmentFraction:0.0;
+				topAlignmentFraction:1.0).
 
-        button := Button label:'button3'.
-        top add:button in:(AlignmentOrigin new
-                                leftFraction:0.75;
-                                topFraction:0.75;
-                                leftAlignmentFraction:1.0;
-                                topAlignmentFraction:0.0).
+	button := Button label:'button3'.
+	top add:button in:(AlignmentOrigin new
+				leftFraction:0.75;
+				topFraction:0.75;
+				leftAlignmentFraction:1.0;
+				topAlignmentFraction:0.0).
 
-        button := Button label:'button4'.
-        top add:button in:(AlignmentOrigin new
-                                leftFraction:0.75;
-                                topFraction:0.75;
-                                leftAlignmentFraction:0.0;
-                                topAlignmentFraction:0.0).
-        top open
-                                                                        [exEnd]
+	button := Button label:'button4'.
+	top add:button in:(AlignmentOrigin new
+				leftFraction:0.75;
+				topFraction:0.75;
+				leftAlignmentFraction:0.0;
+				topAlignmentFraction:0.0).
+	top open
+									[exEnd]
 "
 ! !
 
@@ -195,36 +195,36 @@
 
 !AlignmentOrigin methodsFor:'converting'!
 
-fromLiteralArrayEncoding:encoding
+fromLiteralArrayEncoding:encodingArray
     "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.
-
+    leftOffset := encodingArray at:2.
+    leftFraction := encodingArray at:3.
+    topOffset := encodingArray at:4.
+    topFraction := encodingArray at:5.
+    leftAlignmentFraction := encodingArray at:6.
+    topAlignmentFraction := encodingArray at:7.
 
     "
       AlignmentOrigin new fromLiteralArrayEncoding:#(#AlignmentOrigin 70 0 2 0 0.5 0.25)
     "
 
-    "Modified: 1.9.1995 / 02:23:53 / claus"
+    "Modified: / 1.9.1995 / 02:23:53 / claus"
+    "Modified: / 16.11.1997 / 23:04:16 / cg"
 !
 
 literalArrayEncoding
     "encode myself as an array, from which a copy of the receiver
      can be reconstructed with #decodeAsLiteralArray.
      The encoding is: 
-        (#AlignmentOrigin orgOffsX relOrgX orgOffsY relOrgY leftAlignFract topAlignFract)"
+	(#AlignmentOrigin orgOffsX relOrgX orgOffsY relOrgY leftAlignFract topAlignFract)"
 
     ^ super literalArrayEncoding
       , (Array
-            with:leftAlignmentFraction
-            with:topAlignmentFraction)
+	    with:leftAlignmentFraction
+	    with:topAlignmentFraction)
 
     "Modified: 1.9.1995 / 02:43:35 / claus"
     "Modified: 22.4.1996 / 12:59:56 / cg"
@@ -243,13 +243,13 @@
     "return a printed representation of the receiver for displaying"
 
     ^ self class name , '(' 
-        , 'l: ' , leftFraction displayString
-        , '+' , leftOffset displayString
-        , ' t: ' , topFraction displayString
-        , '+' , topOffset displayString
-        , ' a: ' , leftAlignmentFraction displayString
-        , '@' , topAlignmentFraction displayString
-        , ')'
+	, 'l: ' , leftFraction displayString
+	, '+' , leftOffset displayString
+	, ' t: ' , topFraction displayString
+	, '+' , topOffset displayString
+	, ' a: ' , leftAlignmentFraction displayString
+	, '@' , topAlignmentFraction displayString
+	, ')'
 
     "Modified: 22.1.1997 / 11:58:38 / cg"
 ! !
@@ -271,26 +271,26 @@
     |x y|
 
     leftOffset isNil ifTrue:[
-        x := 0
+	x := 0
     ] ifFalse:[
-        x := leftOffset value
+	x := leftOffset value
     ].
     topOffset isNil ifTrue:[
-        y := 0
+	y := 0
     ] ifFalse:[
-        y := topOffset value
+	y := topOffset value
     ].
     leftFraction notNil ifTrue:[
-        x := x + (superRectangle width * leftFraction value)
+	x := x + (superRectangle width * leftFraction value)
     ].
     topFraction notNil ifTrue:[
-        y := y + (superRectangle height * topFraction value)
+	y := y + (superRectangle height * topFraction value)
     ].
     leftAlignmentFraction ~~ 0 ifTrue:[
-        x := x - (prefRect width * leftAlignmentFraction value)
+	x := x - (prefRect width * leftAlignmentFraction value)
     ].
     topAlignmentFraction ~~ 0 ifTrue:[
-        y := y - (prefRect height * topAlignmentFraction value)
+	y := y - (prefRect height * topAlignmentFraction value)
     ].
     ^ Rectangle left:x top:y extent:prefRect extent
 
@@ -300,9 +300,9 @@
      superRect := 0@0 corner:100@100.
      aO := (AlignmentOrigin new).
      aO leftFraction:0.5;
-        topFraction:0.5;
-        leftAlignmentFraction:0.5;
-        topAlignmentFraction:0.5.
+	topFraction:0.5;
+	leftAlignmentFraction:0.5;
+	topAlignmentFraction:0.5.
      aO rectangleRelativeTo:superRect preferred:(0@0 corner:30@30) 
     "
 
@@ -312,5 +312,5 @@
 !AlignmentOrigin class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Attic/AlignOrg.st,v 1.22 1997-11-02 18:54:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Attic/AlignOrg.st,v 1.23 1997-11-28 19:07:46 cg Exp $'
 ! !
--- a/AlignmentOrigin.st	Tue Nov 25 14:35:39 1997 +0100
+++ b/AlignmentOrigin.st	Fri Nov 28 20:07:46 1997 +0100
@@ -44,18 +44,18 @@
     The reference point itself is specified as fraction of the components size.
 
     Notice: 
-        this class was implemented using protocol information
-        from alpha testers - it may not be complete or compatible to
-        the corresponding ST-80 class. 
-        If you encounter any incompatibilities, please forward a note 
-        describing the incompatibility verbal (i.e. no code) to the ST/X team.
+	this class was implemented using protocol information
+	from alpha testers - it may not be complete or compatible to
+	the corresponding ST-80 class. 
+	If you encounter any incompatibilities, please forward a note 
+	describing the incompatibility verbal (i.e. no code) to the ST/X team.
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 
     [See also:]
-        LayoutOrigin LayoutFrame Layout
-        View
+	LayoutOrigin LayoutFrame Layout
+	View
 "
 !
 
@@ -66,95 +66,95 @@
 
     using a LayoutOrigin, to control the top-left origins position of
     a component (i.e. origin at:0.5@0.5):
-                                                                        [exBegin]
-        |top button|
+									[exBegin]
+	|top button|
 
-        top := StandardSystemView new.
-        top extent:300@300.
+	top := StandardSystemView new.
+	top extent:300@300.
 
-        button := Button label:'component'.
-        top add:button in:(LayoutOrigin new
-                                leftFraction:0.5;
-                                topFraction:0.5).
+	button := Button label:'component'.
+	top add:button in:(LayoutOrigin new
+				leftFraction:0.5;
+				topFraction:0.5).
 
-        top open
-                                                                        [exEnd]
+	top open
+									[exEnd]
 
 
     using an AlignmentOrigin, to control the centers position of
     a component (i.e. center of component at:0.5@0.5):
-                                                                        [exBegin]
-        |top button|
+									[exBegin]
+	|top button|
 
-        top := StandardSystemView new.
-        top extent:300@300.
+	top := StandardSystemView new.
+	top extent:300@300.
 
-        button := Button label:'component'.
-        top add:button in:(AlignmentOrigin new
-                                leftFraction:0.5;
-                                topFraction:0.5;
-                                leftAlignmentFraction:0.5;
-                                topAlignmentFraction:0.5).
+	button := Button label:'component'.
+	top add:button in:(AlignmentOrigin new
+				leftFraction:0.5;
+				topFraction:0.5;
+				leftAlignmentFraction:0.5;
+				topAlignmentFraction:0.5).
 
-        top open
-                                                                        [exEnd]
+	top open
+									[exEnd]
 
 
     using an AlignmentOrigin, to control the bottom-right position of
     a component (i.e. bottom-right of component at:0.5@0.5):
-                                                                        [exBegin]
-        |top button|
+									[exBegin]
+	|top button|
 
-        top := StandardSystemView new.
-        top extent:300@300.
+	top := StandardSystemView new.
+	top extent:300@300.
 
-        button := Button label:'component'.
-        top add:button in:(AlignmentOrigin new
-                                leftFraction:0.5;
-                                topFraction:0.5;
-                                leftAlignmentFraction:1.0;
-                                topAlignmentFraction:1.0).
+	button := Button label:'component'.
+	top add:button in:(AlignmentOrigin new
+				leftFraction:0.5;
+				topFraction:0.5;
+				leftAlignmentFraction:1.0;
+				topAlignmentFraction:1.0).
 
-        top open
-                                                                        [exEnd]
+	top open
+									[exEnd]
 
 
     four buttons around relative 0.75@0.75:
-                                                                        [exBegin]
-        |top button|
+									[exBegin]
+	|top button|
 
-        top := StandardSystemView new.
-        top extent:300@300.
+	top := StandardSystemView new.
+	top extent:300@300.
 
-        button := Button label:'button1'.
-        top add:button in:(AlignmentOrigin new
-                                leftFraction:0.75;
-                                topFraction:0.75;
-                                leftAlignmentFraction:1.0;
-                                topAlignmentFraction:1.0).
+	button := Button label:'button1'.
+	top add:button in:(AlignmentOrigin new
+				leftFraction:0.75;
+				topFraction:0.75;
+				leftAlignmentFraction:1.0;
+				topAlignmentFraction:1.0).
 
-        button := Button label:'button2'.
-        top add:button in:(AlignmentOrigin new
-                                leftFraction:0.75;
-                                topFraction:0.75;
-                                leftAlignmentFraction:0.0;
-                                topAlignmentFraction:1.0).
+	button := Button label:'button2'.
+	top add:button in:(AlignmentOrigin new
+				leftFraction:0.75;
+				topFraction:0.75;
+				leftAlignmentFraction:0.0;
+				topAlignmentFraction:1.0).
 
-        button := Button label:'button3'.
-        top add:button in:(AlignmentOrigin new
-                                leftFraction:0.75;
-                                topFraction:0.75;
-                                leftAlignmentFraction:1.0;
-                                topAlignmentFraction:0.0).
+	button := Button label:'button3'.
+	top add:button in:(AlignmentOrigin new
+				leftFraction:0.75;
+				topFraction:0.75;
+				leftAlignmentFraction:1.0;
+				topAlignmentFraction:0.0).
 
-        button := Button label:'button4'.
-        top add:button in:(AlignmentOrigin new
-                                leftFraction:0.75;
-                                topFraction:0.75;
-                                leftAlignmentFraction:0.0;
-                                topAlignmentFraction:0.0).
-        top open
-                                                                        [exEnd]
+	button := Button label:'button4'.
+	top add:button in:(AlignmentOrigin new
+				leftFraction:0.75;
+				topFraction:0.75;
+				leftAlignmentFraction:0.0;
+				topAlignmentFraction:0.0).
+	top open
+									[exEnd]
 "
 ! !
 
@@ -195,36 +195,36 @@
 
 !AlignmentOrigin methodsFor:'converting'!
 
-fromLiteralArrayEncoding:encoding
+fromLiteralArrayEncoding:encodingArray
     "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.
-
+    leftOffset := encodingArray at:2.
+    leftFraction := encodingArray at:3.
+    topOffset := encodingArray at:4.
+    topFraction := encodingArray at:5.
+    leftAlignmentFraction := encodingArray at:6.
+    topAlignmentFraction := encodingArray at:7.
 
     "
       AlignmentOrigin new fromLiteralArrayEncoding:#(#AlignmentOrigin 70 0 2 0 0.5 0.25)
     "
 
-    "Modified: 1.9.1995 / 02:23:53 / claus"
+    "Modified: / 1.9.1995 / 02:23:53 / claus"
+    "Modified: / 16.11.1997 / 23:04:16 / cg"
 !
 
 literalArrayEncoding
     "encode myself as an array, from which a copy of the receiver
      can be reconstructed with #decodeAsLiteralArray.
      The encoding is: 
-        (#AlignmentOrigin orgOffsX relOrgX orgOffsY relOrgY leftAlignFract topAlignFract)"
+	(#AlignmentOrigin orgOffsX relOrgX orgOffsY relOrgY leftAlignFract topAlignFract)"
 
     ^ super literalArrayEncoding
       , (Array
-            with:leftAlignmentFraction
-            with:topAlignmentFraction)
+	    with:leftAlignmentFraction
+	    with:topAlignmentFraction)
 
     "Modified: 1.9.1995 / 02:43:35 / claus"
     "Modified: 22.4.1996 / 12:59:56 / cg"
@@ -243,13 +243,13 @@
     "return a printed representation of the receiver for displaying"
 
     ^ self class name , '(' 
-        , 'l: ' , leftFraction displayString
-        , '+' , leftOffset displayString
-        , ' t: ' , topFraction displayString
-        , '+' , topOffset displayString
-        , ' a: ' , leftAlignmentFraction displayString
-        , '@' , topAlignmentFraction displayString
-        , ')'
+	, 'l: ' , leftFraction displayString
+	, '+' , leftOffset displayString
+	, ' t: ' , topFraction displayString
+	, '+' , topOffset displayString
+	, ' a: ' , leftAlignmentFraction displayString
+	, '@' , topAlignmentFraction displayString
+	, ')'
 
     "Modified: 22.1.1997 / 11:58:38 / cg"
 ! !
@@ -271,26 +271,26 @@
     |x y|
 
     leftOffset isNil ifTrue:[
-        x := 0
+	x := 0
     ] ifFalse:[
-        x := leftOffset value
+	x := leftOffset value
     ].
     topOffset isNil ifTrue:[
-        y := 0
+	y := 0
     ] ifFalse:[
-        y := topOffset value
+	y := topOffset value
     ].
     leftFraction notNil ifTrue:[
-        x := x + (superRectangle width * leftFraction value)
+	x := x + (superRectangle width * leftFraction value)
     ].
     topFraction notNil ifTrue:[
-        y := y + (superRectangle height * topFraction value)
+	y := y + (superRectangle height * topFraction value)
     ].
     leftAlignmentFraction ~~ 0 ifTrue:[
-        x := x - (prefRect width * leftAlignmentFraction value)
+	x := x - (prefRect width * leftAlignmentFraction value)
     ].
     topAlignmentFraction ~~ 0 ifTrue:[
-        y := y - (prefRect height * topAlignmentFraction value)
+	y := y - (prefRect height * topAlignmentFraction value)
     ].
     ^ Rectangle left:x top:y extent:prefRect extent
 
@@ -300,9 +300,9 @@
      superRect := 0@0 corner:100@100.
      aO := (AlignmentOrigin new).
      aO leftFraction:0.5;
-        topFraction:0.5;
-        leftAlignmentFraction:0.5;
-        topAlignmentFraction:0.5.
+	topFraction:0.5;
+	leftAlignmentFraction:0.5;
+	topAlignmentFraction:0.5.
      aO rectangleRelativeTo:superRect preferred:(0@0 corner:30@30) 
     "
 
@@ -312,5 +312,5 @@
 !AlignmentOrigin class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/AlignmentOrigin.st,v 1.22 1997-11-02 18:54:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/AlignmentOrigin.st,v 1.23 1997-11-28 19:07:46 cg Exp $'
 ! !