# HG changeset patch # User Stefan Vogel # Date 1530287999 -7200 # Node ID 6dffe5499f3b8b6acbac604ab8e7707dcb1ba195 # Parent 6300b7e324a45cb3f148fffa0d3d0f2a11932e41 move methods accessing LayoutFrame to libview2 diff -r 6300b7e324a4 -r 6dffe5499f3b extensions.st --- a/extensions.st Fri Jun 29 17:59:07 2018 +0200 +++ b/extensions.st Fri Jun 29 17:59:59 2018 +0200 @@ -15,6 +15,63 @@ " ! ! +!Point methodsFor:'converting'! + +asFractionalLayout + "return a LayoutOrigin from the receiver, + treating the receiver coordinates as fractional parts + (i.e. relative to superview). + Notice: in 10.5.x LayoutOrigin is not yet officially released." + + ^ LayoutOrigin fractionalFromPoint:self + + " + (0@0.5) asFractionalLayout + (0@0.5) asLayout + (0@10) asLayout + (0@10) asOffsetLayout + " + +! ! + +!Point methodsFor:'converting'! + +asLayout + "return a LayoutOrigin from the receiver. + If the receiver coordinates are between 0 and 1, take + them as fractional parts (relative to superview). + Otherwise, treat them as absolute offsets. + Notice: in 10.5.x LayoutOrigin is not yet released." + + ^ LayoutOrigin fromPoint:self + + " + (0@0.5) asFractionalLayout + (0@0.5) asLayout + (0@10) asLayout + (0@10) asOffsetLayout + " + +! ! + +!Point methodsFor:'converting'! + +asOffsetLayout + "return a LayoutOrigin from the receiver, + treating the receiver coordinates as absolute offsets. + Notice: in 10.5.x LayoutOrigin is not yet released." + + ^ LayoutOrigin offsetFromPoint:self + + " + (0@0.5) asFractionalLayout + (0@0.5) asLayout + (0@10) asLayout + (0@10) asOffsetLayout + " + +! ! + !stx_libview2 class methodsFor:'documentation'! extensionsVersion_CVS