diff -r 7196ca547f5d -r 1735e40c6825 UILayoutTool.st --- a/UILayoutTool.st Fri Mar 19 22:07:28 1999 +0100 +++ b/UILayoutTool.st Sat Mar 20 02:28:24 1999 +0100 @@ -1303,9 +1303,168 @@ #rightRelative 'Relative corner x of the selected widget.' +#topHalfLayout +'Set the layout for the top half of the widgets containers space' + +#bottomHalfLayout +'Set the layout for the bottom half of the widgets containers space' + +#leftHalfLayout +'Set the layout for the left half of the widgets containers space' + +#rightHalfLayout +'Set the layout for the right half of the widgets containers space' + + ) ! ! +!UILayoutTool::LayoutFrame class methodsFor:'image specs'! + +setBottomHalfIcon + "This resource specification was automatically generated + by the ImageEditor of ST/X." + + "Do not manually edit this!! If it is corrupted, + the ImageEditor may not be able to read the specification." + + " + self setBottomHalfIcon inspect + ImageEditor openOnClass:self andSelector:#setBottomHalfIcon + " + + + + ^Icon + constantNamed:#'UILayoutTool::LayoutFrame setBottomHalfIcon' + ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"H"H"H"H"@BDQDQDQDQH@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@H"H"H"H"H @@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@@X@A @F@@X@A @F@@_???????????????????? + + ^Icon + constantNamed:#'UILayoutTool::LayoutFrame setBottomLeftQuarterIcon' + ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H"H"@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@H"H"@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@@X@A @F@@X@A @G?@_ + + ^Icon + constantNamed:#'UILayoutTool::LayoutFrame setBottomRightQuarterIcon' + ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BH"H"@@@@@@HQDQH@@@@@@!!DQD @@@@@BDQDR@@@@@@HQDQH@@@@@@"H"H @@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@@X@A @F@@X@A @F@@XG? _>A?8G? _>A?8G??? + + ^Icon + constantNamed:#'UILayoutTool::LayoutFrame setLeftHalfIcon' + ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@BH"H @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@H"H"@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'????@_ + + ^Icon + constantNamed:#'UILayoutTool::LayoutFrame setRightHalfIcon' + ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@"H"H@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BH"H @@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@?8C? O>@?8C? O>@?8C? O>@?8C? O>@?8C??? + + ^Icon + constantNamed:#'UILayoutTool::LayoutFrame setToRightQuarterIcon' + ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@"H"H@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@?8C? O>@?8C? O>@?8C? @F@@X@A @F@@X@A?? + + ^Icon + constantNamed:#'UILayoutTool::LayoutFrame setTopHalfIcon' + ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@BH"H"H"H"H@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@HQDQDQDQD @"H"H"H"H"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'?????????????????????8@A @F@@X@A @F@@X@A?? + + ^Icon + constantNamed:#'UILayoutTool::LayoutFrame setTopLeftQuarterIcon' + ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@BH"H"@@@@@@HQDQH@@@@@@!!DQD @@@@@BDQDR@@@@@@HQDQH@@@@@@"H"H @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???? _>A?8G? _>A?8G? X@A @F@@X@A @F@@X@A?? + + ^ + + #(#Menu + + #( + #(#MenuItem + #label: 'setTopHalfFrame' + #translateLabel: true + #isButton: true + #nameKey: #setTopHalfFrame + #value: #setTopHalfFrame + #activeHelpKey: #topHalfLayout + #labelImage: #(#ResourceRetriever #'UILayoutTool::LayoutFrame' #setTopHalfIcon) + ) + #(#MenuItem + #label: 'setBottomHalfFrame' + #translateLabel: true + #isButton: true + #nameKey: #setBottomHalfFrame + #value: #setBottomHalfFrame + #activeHelpKey: #bottomHalfLayout + #labelImage: #(#ResourceRetriever nil #setBottomHalfIcon) + ) + #(#MenuItem + #label: 'setLeftHalfFrame' + #translateLabel: true + #isButton: true + #nameKey: #setLeftHalfFrame + #value: #setLeftHalfFrame + #activeHelpKey: #leftHalfLayout + #labelImage: #(#ResourceRetriever nil #setLeftHalfIcon) + ) + #(#MenuItem + #label: 'setRightHalfFrame' + #translateLabel: true + #isButton: true + #nameKey: #setRightHalfFrame + #value: #setRightHalfFrame + #activeHelpKey: #rightHalfLayout + #labelImage: #(#ResourceRetriever nil #setRightHalfIcon) + ) + #(#MenuItem + #label: '' + ) + #(#MenuItem + #label: 'setTopLeftQuarterFrame' + #translateLabel: true + #isButton: true + #nameKey: #setTopLeftQuarterFrame + #value: #setTopLeftQuarterFrame + #labelImage: #(#ResourceRetriever nil #setTopLeftQuarterIcon) + ) + #(#MenuItem + #label: 'setTopRightQuarterFrame' + #translateLabel: true + #isButton: true + #nameKey: #setTopRightQuarterFrame + #value: #setTopRightQuarterFrame + #labelImage: #(#ResourceRetriever nil #setToRightQuarterIcon) + ) + #(#MenuItem + #label: 'setBottomRightQuarterFrame' + #translateLabel: true + #isButton: true + #nameKey: #setBottomRightQuarterFrame + #value: #setBottomRightQuarterFrame + #labelImage: #(#ResourceRetriever nil #setBottomRightQuarterIcon) + ) + #(#MenuItem + #label: 'setBottomLeftQuarterFrame' + #translateLabel: true + #isButton: true + #nameKey: #setBottomLeftQuarterFrame + #value: #setBottomLeftQuarterFrame + #labelImage: #(#ResourceRetriever nil #setBottomLeftQuarterIcon) + ) + ) nil + nil + ) ! ! !UILayoutTool::LayoutFrame methodsFor:'accessing'! @@ -1478,6 +1743,84 @@ ! ! +!UILayoutTool::LayoutFrame methodsFor:'common frames'! + +setBottomHalfFrame + self + setFrameLeft:0 offset:0 + right:1 offset:0 + top:0.5 offset:0 + bottom:1 offset:0 +! + +setBottomLeftQuarterFrame + self + setFrameLeft:0 offset:0 + right:0.5 offset:0 + top:0.5 offset:0 + bottom:1 offset:0 +! + +setBottomRightQuarterFrame + self + setFrameLeft:0.5 offset:0 + right:1 offset:0 + top:0.5 offset:0 + bottom:1 offset:0 +! + +setFrameLeft:lF offset:lO right:rF offset:rO top:tF offset:tO bottom:bF offset:bO + (self aspectFor:#leftOffset) value:lO. + (self aspectFor:#rightOffset) value:rO. + (self aspectFor:#topOffset) value:tO. + (self aspectFor:#bottomOffset) value:bO. + + (self aspectFor:#leftFraction) value:lF. + (self aspectFor:#rightFraction) value:rF. + (self aspectFor:#topFraction) value:tF. + (self aspectFor:#bottomFraction) value:bF. +! + +setLeftHalfFrame + self + setFrameLeft:0 offset:0 + right:0.5 offset:0 + top:0 offset:0 + bottom:1 offset:0 +! + +setRightHalfFrame + self + setFrameLeft:0.5 offset:0 + right:1 offset:0 + top:0 offset:0 + bottom:1 offset:0 +! + +setTopHalfFrame + self + setFrameLeft:0 offset:0 + right:1 offset:0 + top:0 offset:0 + bottom:0.5 offset:0 +! + +setTopLeftQuarterFrame + self + setFrameLeft:0 offset:0 + right:0.5 offset:0 + top:0 offset:0 + bottom:0.5 offset:0 +! + +setTopRightQuarterFrame + self + setFrameLeft:0.5 offset:0 + right:1 offset:0 + top:0 offset:0 + bottom:0.5 offset:0 +! ! + !UILayoutTool::LayoutOrigin class methodsFor:'interface specs'! windowSpec