UILayoutTool.st
changeset 1680 be9c3f67a19b
parent 1625 4dc8b595e92f
child 1706 16ec8113198f
equal deleted inserted replaced
1679:876e76ae2997 1680:be9c3f67a19b
  1786     ^Icon
  1786     ^Icon
  1787         constantNamed:#'UILayoutTool::LayoutFrame setBottomRightQuarterIcon'
  1787         constantNamed:#'UILayoutTool::LayoutFrame setBottomRightQuarterIcon'
  1788         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]
  1788         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]
  1789 !
  1789 !
  1790 
  1790 
       
  1791 setFullIcon
       
  1792     "This resource specification was automatically generated
       
  1793      by the ImageEditor of ST/X."
       
  1794 
       
  1795     "Do not manually edit this!! If it is corrupted,
       
  1796      the ImageEditor may not be able to read the specification."
       
  1797 
       
  1798     "
       
  1799      self setFullIcon inspect
       
  1800      ImageEditor openOnClass:self andSelector:#setFullIcon
       
  1801      Icon flushCachedIcons
       
  1802     "
       
  1803 
       
  1804     <resource: #image>
       
  1805 
       
  1806     ^Icon
       
  1807         constantNamed:#'UILayoutTool::LayoutFrame class setFullIcon'
       
  1808         ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
       
  1809 @@@@@@@@@@@BH"H"H"H"H@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@HQ
       
  1810 DQDQDQD @!!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:'??????????????????????????????????????????<b') ; yourself); yourself]
       
  1811 !
       
  1812 
  1791 setHorizontalFixPartIcon
  1813 setHorizontalFixPartIcon
  1792     "This resource specification was automatically generated
  1814     "This resource specification was automatically generated
  1793      by the ImageEditor of ST/X."
  1815      by the ImageEditor of ST/X."
  1794 
  1816 
  1795     "Do not manually edit this!! If it is corrupted,
  1817     "Do not manually edit this!! If it is corrupted,
  2010        #(#WindowSpec
  2032        #(#WindowSpec
  2011           #label: 'UILayoutTool-LayoutFrame'
  2033           #label: 'UILayoutTool-LayoutFrame'
  2012           #name: 'UILayoutTool-LayoutFrame'
  2034           #name: 'UILayoutTool-LayoutFrame'
  2013           #min: #(#Point 10 10)
  2035           #min: #(#Point 10 10)
  2014           #max: #(#Point 1152 900)
  2036           #max: #(#Point 1152 900)
  2015           #bounds: #(#Rectangle 12 22 411 325)
  2037           #bounds: #(#Rectangle 16 46 415 349)
  2016           #forceRecursiveBackground: false
  2038           #forceRecursiveBackground: false
  2017         )
  2039         )
  2018         #component: 
  2040         #component: 
  2019        #(#SpecCollection
  2041        #(#SpecCollection
  2020           #collection: #(
  2042           #collection: #(
  2151                  )
  2173                  )
  2152                
  2174                
  2153               )
  2175               )
  2154             )
  2176             )
  2155            #(#MenuPanelSpec
  2177            #(#MenuPanelSpec
  2156               #name: 'commonLayoutToolBar'
  2178               #name: 'commonLayoutToolBar1'
  2157               #layout: #(#LayoutFrame 6 0.0 231 0 -4 1.0 263 0)
  2179               #layout: #(#LayoutFrame 6 0.0 215 0 -4 1.0 247 0)
  2158               #level: 0
  2180               #level: 0
  2159               #tabable: true
  2181               #tabable: true
  2160               #menu: #commonFrameLayoutsMenu
  2182               #menu: #commonFrameLayoutsMenu1
       
  2183               #textDefault: true
       
  2184             )
       
  2185            #(#MenuPanelSpec
       
  2186               #name: 'commonLayoutToolBar2'
       
  2187               #layout: #(#LayoutFrame 6 0.0 255 0 -4 1.0 287 0)
       
  2188               #level: 0
       
  2189               #tabable: true
       
  2190               #menu: #commonFrameLayoutsMenu2
  2161               #textDefault: true
  2191               #textDefault: true
  2162             )
  2192             )
  2163            )
  2193            )
  2164          
  2194          
  2165         )
  2195         )
  2166       )
  2196       )
  2167 ! !
  2197 ! !
  2168 
  2198 
  2169 !UILayoutTool::LayoutFrame class methodsFor:'menu specs'!
  2199 !UILayoutTool::LayoutFrame class methodsFor:'menu specs'!
  2170 
  2200 
  2171 commonFrameLayoutsMenu
  2201 commonFrameLayoutsMenu1
  2172     "This resource specification was automatically generated
  2202     "This resource specification was automatically generated
  2173      by the MenuEditor of ST/X."
  2203      by the MenuEditor of ST/X."
  2174 
  2204 
  2175     "Do not manually edit this!! If it is corrupted,
  2205     "Do not manually edit this!! If it is corrupted,
  2176      the MenuEditor may not be able to read the specification."
  2206      the MenuEditor may not be able to read the specification."
  2177 
  2207 
  2178     "
  2208     "
  2179      MenuEditor new openOnClass:UILayoutTool::LayoutFrame andSelector:#commonFrameLayoutsMenu
  2209      MenuEditor new openOnClass:UILayoutTool::LayoutFrame andSelector:#commonFrameLayoutsMenu1
  2180      (Menu new fromLiteralArrayEncoding:(UILayoutTool::LayoutFrame commonFrameLayoutsMenu)) startUp
  2210      (Menu new fromLiteralArrayEncoding:(UILayoutTool::LayoutFrame commonFrameLayoutsMenu1)) startUp
  2181     "
  2211     "
  2182 
  2212 
  2183     <resource: #menu>
  2213     <resource: #menu>
  2184 
  2214 
  2185     ^
  2215     ^ 
  2186      
  2216      #(#Menu
  2187        #(#Menu
  2217         #(
  2188           
  2218          #(#MenuItem
  2189            #(
  2219             #activeHelpKey: #fullLayout
  2190              #(#MenuItem
  2220             #label: 'setFullFrame'
  2191                 #label: 'setTopHalfFrame'
  2221             #itemValue: #setFullFrame
  2192                 #translateLabel: true
  2222             #nameKey: #setFullFrame
  2193                 #isButton: true
  2223             #translateLabel: true
  2194                 #nameKey: #setTopHalfFrame
  2224             #isButton: true
  2195                 #value: #setTopHalfFrame
  2225             #labelImage: #(#ResourceRetriever #'UILayoutTool::LayoutFrame' #setFullIcon)
  2196                 #activeHelpKey: #topHalfLayout
  2226           )
  2197                 #labelImage: #(#ResourceRetriever #'UILayoutTool::LayoutFrame' #setTopHalfIcon)
  2227          #(#MenuItem
  2198             )
  2228             #label: ''
  2199              #(#MenuItem
  2229           )
  2200                 #label: 'setBottomHalfFrame'
  2230          #(#MenuItem
  2201                 #translateLabel: true
  2231             #activeHelpKey: #topHalfLayout
  2202                 #isButton: true
  2232             #label: 'setTopHalfFrame'
  2203                 #nameKey: #setBottomHalfFrame
  2233             #itemValue: #setTopHalfFrame
  2204                 #value: #setBottomHalfFrame
  2234             #nameKey: #setTopHalfFrame
  2205                 #activeHelpKey: #bottomHalfLayout
  2235             #translateLabel: true
  2206                 #labelImage: #(#ResourceRetriever nil #setBottomHalfIcon)
  2236             #isButton: true
  2207             )
  2237             #labelImage: #(#ResourceRetriever #'UILayoutTool::LayoutFrame' #setTopHalfIcon)
  2208              #(#MenuItem
  2238           )
  2209                 #label: 'setLeftHalfFrame'
  2239          #(#MenuItem
  2210                 #translateLabel: true
  2240             #activeHelpKey: #bottomHalfLayout
  2211                 #isButton: true
  2241             #label: 'setBottomHalfFrame'
  2212                 #nameKey: #setLeftHalfFrame
  2242             #itemValue: #setBottomHalfFrame
  2213                 #value: #setLeftHalfFrame
  2243             #nameKey: #setBottomHalfFrame
  2214                 #activeHelpKey: #leftHalfLayout
  2244             #translateLabel: true
  2215                 #labelImage: #(#ResourceRetriever nil #setLeftHalfIcon)
  2245             #isButton: true
  2216             )
  2246             #labelImage: #(#ResourceRetriever nil #setBottomHalfIcon)
  2217              #(#MenuItem
  2247           )
  2218                 #label: 'setRightHalfFrame'
  2248          #(#MenuItem
  2219                 #translateLabel: true
  2249             #activeHelpKey: #leftHalfLayout
  2220                 #isButton: true
  2250             #label: 'setLeftHalfFrame'
  2221                 #nameKey: #setRightHalfFrame
  2251             #itemValue: #setLeftHalfFrame
  2222                 #value: #setRightHalfFrame
  2252             #nameKey: #setLeftHalfFrame
  2223                 #activeHelpKey: #rightHalfLayout
  2253             #translateLabel: true
  2224                 #labelImage: #(#ResourceRetriever nil #setRightHalfIcon)
  2254             #isButton: true
  2225             )
  2255             #labelImage: #(#ResourceRetriever nil #setLeftHalfIcon)
  2226              #(#MenuItem
  2256           )
  2227                 #label: ''
  2257          #(#MenuItem
  2228             )
  2258             #activeHelpKey: #rightHalfLayout
  2229              #(#MenuItem
  2259             #label: 'setRightHalfFrame'
  2230                 #label: 'setTopLeftQuarterFrame'
  2260             #itemValue: #setRightHalfFrame
  2231                 #translateLabel: true
  2261             #nameKey: #setRightHalfFrame
  2232                 #isButton: true
  2262             #translateLabel: true
  2233                 #activeHelpKey: #topLeftQuarterLayout
  2263             #isButton: true
  2234                 #nameKey: #setTopLeftQuarterFrame
  2264             #labelImage: #(#ResourceRetriever nil #setRightHalfIcon)
  2235                 #value: #setTopLeftQuarterFrame
  2265           )
  2236                 #labelImage: #(#ResourceRetriever nil #setTopLeftQuarterIcon)
  2266          #(#MenuItem
  2237             )
  2267             #label: ''
  2238              #(#MenuItem
  2268           )
  2239                 #label: 'setTopRightQuarterFrame'
  2269          #(#MenuItem
  2240                 #translateLabel: true
  2270             #activeHelpKey: #topLeftQuarterLayout
  2241                 #isButton: true
  2271             #label: 'setTopLeftQuarterFrame'
  2242                 #activeHelpKey: #topRightQuarterLayout
  2272             #itemValue: #setTopLeftQuarterFrame
  2243                 #nameKey: #setTopRightQuarterFrame
  2273             #nameKey: #setTopLeftQuarterFrame
  2244                 #value: #setTopRightQuarterFrame
  2274             #translateLabel: true
  2245                 #labelImage: #(#ResourceRetriever nil #setToRightQuarterIcon)
  2275             #isButton: true
  2246             )
  2276             #labelImage: #(#ResourceRetriever nil #setTopLeftQuarterIcon)
  2247              #(#MenuItem
  2277           )
  2248                 #label: 'setBottomRightQuarterFrame'
  2278          #(#MenuItem
  2249                 #translateLabel: true
  2279             #activeHelpKey: #topRightQuarterLayout
  2250                 #isButton: true
  2280             #label: 'setTopRightQuarterFrame'
  2251                 #activeHelpKey: #bottomRightQuarterLayout
  2281             #itemValue: #setTopRightQuarterFrame
  2252                 #nameKey: #setBottomRightQuarterFrame
  2282             #nameKey: #setTopRightQuarterFrame
  2253                 #value: #setBottomRightQuarterFrame
  2283             #translateLabel: true
  2254                 #labelImage: #(#ResourceRetriever nil #setBottomRightQuarterIcon)
  2284             #isButton: true
  2255             )
  2285             #labelImage: #(#ResourceRetriever nil #setToRightQuarterIcon)
  2256              #(#MenuItem
  2286           )
  2257                 #label: 'setBottomLeftQuarterFrame'
  2287          #(#MenuItem
  2258                 #translateLabel: true
  2288             #activeHelpKey: #bottomRightQuarterLayout
  2259                 #activeHelpKey: #bottomLeftQuarterLayout
  2289             #label: 'setBottomRightQuarterFrame'
  2260                 #isButton: true
  2290             #itemValue: #setBottomRightQuarterFrame
  2261                 #nameKey: #setBottomLeftQuarterFrame
  2291             #nameKey: #setBottomRightQuarterFrame
  2262                 #value: #setBottomLeftQuarterFrame
  2292             #translateLabel: true
  2263                 #labelImage: #(#ResourceRetriever nil #setBottomLeftQuarterIcon)
  2293             #isButton: true
  2264             )
  2294             #labelImage: #(#ResourceRetriever nil #setBottomRightQuarterIcon)
  2265              #(#MenuItem
  2295           )
  2266                 #label: ''
  2296          #(#MenuItem
  2267             )
  2297             #activeHelpKey: #bottomLeftQuarterLayout
  2268              #(#MenuItem
  2298             #label: 'setBottomLeftQuarterFrame'
  2269                 #label: 'setTopFixPartFrame'
  2299             #itemValue: #setBottomLeftQuarterFrame
  2270                 #translateLabel: true
  2300             #nameKey: #setBottomLeftQuarterFrame
  2271                 #isButton: true
  2301             #translateLabel: true
  2272                 #nameKey: #setTopFixPartFrame
  2302             #isButton: true
  2273                 #value: #setTopFixPartFrame
  2303             #labelImage: #(#ResourceRetriever nil #setBottomLeftQuarterIcon)
  2274                 #activeHelpKey: #topFixPartLayout
  2304           )
  2275                 #labelImage: #(#ResourceRetriever nil #setTopFixPartIcon)
  2305          )
  2276             )
  2306         nil
  2277              #(#MenuItem
  2307         nil
  2278                 #label: 'setHorizontalFixPartFrame'
  2308       )
  2279                 #translateLabel: true
  2309 !
  2280                 #isButton: true
  2310 
  2281                 #nameKey: #setHorizontalFixPartFrame
  2311 commonFrameLayoutsMenu2
  2282                 #value: #setHorizontalFixPartFrame
  2312     "This resource specification was automatically generated
  2283                 #activeHelpKey: #horizontalFixPartLayout
  2313      by the MenuEditor of ST/X."
  2284                 #labelImage: #(#ResourceRetriever nil #setHorizontalFixPartIcon)
  2314 
  2285             )
  2315     "Do not manually edit this!! If it is corrupted,
  2286              #(#MenuItem
  2316      the MenuEditor may not be able to read the specification."
  2287                 #label: 'setBottomFixPartFrame'
  2317 
  2288                 #translateLabel: true
  2318     "
  2289                 #isButton: true
  2319      MenuEditor new openOnClass:UILayoutTool::LayoutFrame andSelector:#commonFrameLayoutsMenu2
  2290                 #nameKey: #setBottomFixPartFrame
  2320      (Menu new fromLiteralArrayEncoding:(UILayoutTool::LayoutFrame commonFrameLayoutsMenu2)) startUp
  2291                 #value: #setBottomFixPartFrame
  2321     "
  2292                 #activeHelpKey: #bottomFixPartLayout
  2322 
  2293                 #labelImage: #(#ResourceRetriever nil #setBottomFixPartIcon)
  2323     <resource: #menu>
  2294             )
  2324 
  2295              #(#MenuItem
  2325     ^ 
  2296                 #label: ''
  2326      #(#Menu
  2297             )
  2327         #(
  2298              #(#MenuItem
  2328          #(#MenuItem
  2299                 #label: 'setLeftFixPartFrame'
  2329             #activeHelpKey: #topFixPartLayout
  2300                 #translateLabel: true
  2330             #label: 'setTopFixPartFrame'
  2301                 #isButton: true
  2331             #itemValue: #setTopFixPartFrame
  2302                 #nameKey: #setLeftFixPartFrame
  2332             #nameKey: #setTopFixPartFrame
  2303                 #value: #setLeftFixPartFrame
  2333             #translateLabel: true
  2304                 #activeHelpKey: #leftFixPartLayout
  2334             #isButton: true
  2305                 #labelImage: #(#ResourceRetriever nil #setLeftFixPartIcon)
  2335             #labelImage: #(#ResourceRetriever nil #setTopFixPartIcon)
  2306             )
  2336           )
  2307              #(#MenuItem
  2337          #(#MenuItem
  2308                 #label: 'setVerticalFixPartFrame'
  2338             #activeHelpKey: #horizontalFixPartLayout
  2309                 #translateLabel: true
  2339             #label: 'setHorizontalFixPartFrame'
  2310                 #isButton: true
  2340             #itemValue: #setHorizontalFixPartFrame
  2311                 #nameKey: #setVerticalFixPartFrame
  2341             #nameKey: #setHorizontalFixPartFrame
  2312                 #value: #setVerticalFixPartFrame
  2342             #translateLabel: true
  2313                 #activeHelpKey: #verticalFixPartLayout
  2343             #isButton: true
  2314                 #labelImage: #(#ResourceRetriever nil #setVerticalFixPartIcon)
  2344             #labelImage: #(#ResourceRetriever nil #setHorizontalFixPartIcon)
  2315             )
  2345           )
  2316              #(#MenuItem
  2346          #(#MenuItem
  2317                 #label: 'setRightFixPartFrame'
  2347             #activeHelpKey: #bottomFixPartLayout
  2318                 #translateLabel: true
  2348             #label: 'setBottomFixPartFrame'
  2319                 #isButton: true
  2349             #itemValue: #setBottomFixPartFrame
  2320                 #nameKey: #setRightFixPartFrame
  2350             #nameKey: #setBottomFixPartFrame
  2321                 #value: #setRightFixPartFrame
  2351             #translateLabel: true
  2322                 #activeHelpKey: #rightFixPartLayout
  2352             #isButton: true
  2323                 #labelImage: #(#ResourceRetriever nil #setRightFixPartIcon)
  2353             #labelImage: #(#ResourceRetriever nil #setBottomFixPartIcon)
  2324             )
  2354           )
  2325           ) nil
  2355          #(#MenuItem
  2326           nil
  2356             #label: ''
       
  2357           )
       
  2358          #(#MenuItem
       
  2359             #activeHelpKey: #leftFixPartLayout
       
  2360             #label: 'setLeftFixPartFrame'
       
  2361             #itemValue: #setLeftFixPartFrame
       
  2362             #nameKey: #setLeftFixPartFrame
       
  2363             #translateLabel: true
       
  2364             #isButton: true
       
  2365             #labelImage: #(#ResourceRetriever nil #setLeftFixPartIcon)
       
  2366           )
       
  2367          #(#MenuItem
       
  2368             #activeHelpKey: #verticalFixPartLayout
       
  2369             #label: 'setVerticalFixPartFrame'
       
  2370             #itemValue: #setVerticalFixPartFrame
       
  2371             #nameKey: #setVerticalFixPartFrame
       
  2372             #translateLabel: true
       
  2373             #isButton: true
       
  2374             #labelImage: #(#ResourceRetriever nil #setVerticalFixPartIcon)
       
  2375           )
       
  2376          #(#MenuItem
       
  2377             #activeHelpKey: #rightFixPartLayout
       
  2378             #label: 'setRightFixPartFrame'
       
  2379             #itemValue: #setRightFixPartFrame
       
  2380             #nameKey: #setRightFixPartFrame
       
  2381             #translateLabel: true
       
  2382             #isButton: true
       
  2383             #labelImage: #(#ResourceRetriever nil #setRightFixPartIcon)
       
  2384           )
       
  2385          )
       
  2386         nil
       
  2387         nil
  2327       )
  2388       )
  2328 ! !
  2389 ! !
  2329 
  2390 
  2330 !UILayoutTool::LayoutFrame methodsFor:'accessing'!
  2391 !UILayoutTool::LayoutFrame methodsFor:'accessing'!
  2331 
  2392 
  2407 
  2468 
  2408     (self aspectFor:#leftFraction)   value:lF.
  2469     (self aspectFor:#leftFraction)   value:lF.
  2409     (self aspectFor:#rightFraction)  value:rF.
  2470     (self aspectFor:#rightFraction)  value:rF.
  2410     (self aspectFor:#topFraction)    value:tF.
  2471     (self aspectFor:#topFraction)    value:tF.
  2411     (self aspectFor:#bottomFraction) value:bF.
  2472     (self aspectFor:#bottomFraction) value:bF.
       
  2473 !
       
  2474 
       
  2475 setFullFrame
       
  2476     self
       
  2477         setFrameLeft:0   offset:0 
       
  2478         right:1          offset:0 
       
  2479         top:0            offset:0 
       
  2480         bottom:1         offset:0
  2412 !
  2481 !
  2413 
  2482 
  2414 setHorizontalFixPartFrame
  2483 setHorizontalFixPartFrame
  2415     self
  2484     self
  2416         setFrameLeft:0   offset:0 
  2485         setFrameLeft:0   offset:0