UILayoutTool.st
changeset 1070 1735e40c6825
parent 1069 7196ca547f5d
child 1072 84ae04e0af72
--- 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
+    "
+
+    <resource: #image>
+
+    ^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@@_????????????????????<b') ; yourself); yourself]!
+
+setBottomLeftQuarterIcon
+    "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 setBottomLeftQuarterIcon inspect
+     ImageEditor openOnClass:self andSelector:#setBottomLeftQuarterIcon
+    "
+
+    <resource: #image>
+
+    ^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?@_<A?0G?@_<A?0G?@_<A??<b') ; yourself); yourself]!
+
+setBottomRightQuarterIcon
+    "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 setBottomRightQuarterIcon inspect
+     ImageEditor openOnClass:self andSelector:#setBottomRightQuarterIcon
+    "
+
+    <resource: #image>
+
+    ^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???<b') ; yourself); yourself]!
+
+setLeftHalfIcon
+    "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 setLeftHalfIcon inspect
+     ImageEditor openOnClass:self andSelector:#setLeftHalfIcon
+    "
+
+    <resource: #image>
+
+    ^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:'????@_<A?0G?@_<A?0G?@_<A?0G?@_<A?0G?@_<A??<b') ; yourself); yourself]!
+
+setRightHalfIcon
+    "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 setRightHalfIcon inspect
+     ImageEditor openOnClass:self andSelector:#setRightHalfIcon
+    "
+
+    <resource: #image>
+
+    ^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???<b') ; yourself); yourself]!
+
+setToRightQuarterIcon
+    "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 setToRightQuarterIcon inspect
+     ImageEditor openOnClass:self andSelector:#setToRightQuarterIcon
+    "
+
+    <resource: #image>
+
+    ^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??<b') ; yourself); yourself]!
+
+setTopHalfIcon
+    "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 setTopHalfIcon inspect
+     ImageEditor openOnClass:self andSelector:#setTopHalfIcon
+    "
+
+    <resource: #image>
+
+    ^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??<b') ; yourself); yourself]!
+
+setTopLeftQuarterIcon
+    "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 setTopLeftQuarterIcon inspect
+     ImageEditor openOnClass:self andSelector:#setTopLeftQuarterIcon
+    "
+
+    <resource: #image>
+
+    ^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??<b') ; yourself); yourself]! !
+
 !UILayoutTool::LayoutFrame class methodsFor:'interface specs'!
 
 windowSpec
@@ -1326,16 +1485,20 @@
     ^
      
        #(#FullSpec
+          #name: #windowSpec
           #window: 
            #(#WindowSpec
               #name: 'UILayoutTool-LayoutFrame'
-              #layout: #(#LayoutFrame 291 0 130 0 689 0 363 0)
+              #layout: #(#LayoutFrame 216 0 173 0 614 0 475 0)
+              #level: 0
               #label: 'UILayoutTool-LayoutFrame'
               #min: #(#Point 10 10)
               #max: #(#Point 1152 900)
-              #bounds: #(#Rectangle 291 130 690 364)
+              #bounds: #(#Rectangle 216 173 615 476)
               #usePreferredExtent: false
               #forceRecursiveBackground: false
+              #returnIsOKInDialog: true
+              #escapeIsCancelInDialog: true
           )
           #component: 
            #(#SpecCollection
@@ -1366,8 +1529,8 @@
                               #model: #rightFraction
                               #group: #inputGroup
                               #type: #numberOrNil
-                    #acceptChannel: #acceptChannel
-                    #modifiedChannel: #modifiedChannel
+                              #acceptChannel: #acceptChannel
+                              #modifiedChannel: #modifiedChannel
                           )
                            #(#ActionButtonSpec
                               #name: 'actionRelativeRight'
@@ -1382,8 +1545,8 @@
                               #model: #rightOffset
                               #group: #inputGroup
                               #type: #numberOrNil
-                    #acceptChannel: #acceptChannel
-                    #modifiedChannel: #modifiedChannel
+                              #acceptChannel: #acceptChannel
+                              #modifiedChannel: #modifiedChannel
                           )
                            #(#ActionButtonSpec
                               #name: 'actionAbsoluteRight'
@@ -1403,8 +1566,8 @@
                               #model: #bottomFraction
                               #group: #inputGroup
                               #type: #numberOrNil
-                    #acceptChannel: #acceptChannel
-                    #modifiedChannel: #modifiedChannel
+                              #acceptChannel: #acceptChannel
+                              #modifiedChannel: #modifiedChannel
                           )
                            #(#ActionButtonSpec
                               #name: 'actionRelativeBottom'
@@ -1419,8 +1582,8 @@
                               #model: #bottomOffset
                               #group: #inputGroup
                               #type: #numberOrNil
-                    #acceptChannel: #acceptChannel
-                    #modifiedChannel: #modifiedChannel
+                              #acceptChannel: #acceptChannel
+                              #modifiedChannel: #modifiedChannel
                           )
                            #(#ActionButtonSpec
                               #name: 'actionAbsoluteBottom'
@@ -1433,11 +1596,113 @@
                     #label: 'Corner'
                     #labelPosition: #topLeft
                 )
+                 #(#MenuPanelSpec
+                    #name: 'commonLayoutToolBar'
+                    #layout: #(#LayoutFrame 10 0.0 224 0 0 1.0 256 0)
+                    #level: 0
+                    #menu: #commonFrameLayoutsMenu
+                    #textDefault: true
+                )
               )
           )
       )
+! !
 
-    "Modified: / 13.8.1998 / 19:58:24 / cg"
+!UILayoutTool::LayoutFrame class methodsFor:'menu specs'!
+
+commonFrameLayoutsMenu
+    "This resource specification was automatically generated
+     by the MenuEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the MenuEditor may not be able to read the specification."
+
+    "
+     MenuEditor new openOnClass:UILayoutTool::LayoutFrame andSelector:#commonFrameLayoutsMenu
+     (Menu new fromLiteralArrayEncoding:(UILayoutTool::LayoutFrame commonFrameLayoutsMenu)) startUp
+    "
+
+    <resource: #menu>
+
+    ^
+     
+       #(#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