UILayoutTool.st
author Patrik Svestka <patrik.svestka@gmail.com>
Wed, 14 Nov 2018 12:07:51 +0100
branchjv
changeset 3630 5e718e0a754e
parent 3240 28a65ccd21cc
child 3501 de5acee79014
permissions -rw-r--r--
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present

- All source *.st files are now Unicode UTF8 without BOM
Files are in two groups (fileOut works this way in Smalltalk/X):
- containing a unicode character have "{ Encoding: utf8 }" at the header
- ASCII only are without the header
     1 "
     2  COPYRIGHT (c) 1995 by eXept Software AG
     3               All Rights Reserved
     4 
     5  This software is furnished under a license and may be used
     6  only in accordance with the terms of that license and with the
     7  inclusion of the above copyright notice.   This software may not
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    11 "
    12 "{ Package: 'stx:libtool2' }"
    13 
    14 "{ NameSpace: Smalltalk }"
    15 
    16 ApplicationModel subclass:#UILayoutTool
    17 	instanceVariableNames:'modifiedHolder aspects selection currentTool layoutView tabList
    18 		layoutSpec toolsDictionary'
    19 	classVariableNames:''
    20 	poolDictionaries:''
    21 	category:'Interface-UIPainter'
    22 !
    23 
    24 ApplicationModel subclass:#AnyLayout
    25 	instanceVariableNames:''
    26 	classVariableNames:''
    27 	poolDictionaries:''
    28 	privateIn:UILayoutTool
    29 !
    30 
    31 UILayoutTool::AnyLayout subclass:#AlignmentOrigin
    32 	instanceVariableNames:''
    33 	classVariableNames:''
    34 	poolDictionaries:''
    35 	privateIn:UILayoutTool
    36 !
    37 
    38 UILayoutTool::AnyLayout subclass:#Extent
    39 	instanceVariableNames:''
    40 	classVariableNames:''
    41 	poolDictionaries:''
    42 	privateIn:UILayoutTool
    43 !
    44 
    45 UILayoutTool::AnyLayout subclass:#LayoutFrame
    46 	instanceVariableNames:''
    47 	classVariableNames:'DefaultFixPartHeight'
    48 	poolDictionaries:''
    49 	privateIn:UILayoutTool
    50 !
    51 
    52 UILayoutTool::AnyLayout subclass:#LayoutOrigin
    53 	instanceVariableNames:''
    54 	classVariableNames:''
    55 	poolDictionaries:''
    56 	privateIn:UILayoutTool
    57 !
    58 
    59 UILayoutTool::AnyLayout subclass:#Point
    60 	instanceVariableNames:''
    61 	classVariableNames:''
    62 	poolDictionaries:''
    63 	privateIn:UILayoutTool
    64 !
    65 
    66 UILayoutTool::AnyLayout subclass:#Rectangle
    67 	instanceVariableNames:''
    68 	classVariableNames:''
    69 	poolDictionaries:''
    70 	privateIn:UILayoutTool
    71 !
    72 
    73 !UILayoutTool class methodsFor:'documentation'!
    74 
    75 copyright
    76 "
    77  COPYRIGHT (c) 1995 by eXept Software AG
    78               All Rights Reserved
    79 
    80  This software is furnished under a license and may be used
    81  only in accordance with the terms of that license and with the
    82  inclusion of the above copyright notice.   This software may not
    83  be provided or otherwise made available to, or used by, any
    84  other person.  No title to or ownership of the software is
    85  hereby transferred.
    86 "
    87 
    88 
    89 
    90 !
    91 
    92 documentation
    93 "
    94     used by the UIPainter to manipulate the layout of the selected component
    95 
    96     [author:]
    97         Claus Atzkern
    98 
    99     [see also:]
   100         UIPainter
   101         UIHelpTool
   102         UISpecificationTool
   103 "
   104 
   105 
   106 ! !
   107 
   108 !UILayoutTool class methodsFor:'constants'!
   109 
   110 label
   111     ^ 'Layout'
   112 ! !
   113 
   114 !UILayoutTool class methodsFor:'help specs'!
   115 
   116 helpSpec
   117     "This resource specification was automatically generated
   118      by the UIHelpTool of ST/X."
   119 
   120     "Do not manually edit this!! If it is corrupted,
   121      the UIHelpTool may not be able to read the specification."
   122 
   123     "
   124      UIHelpTool openOnClass:UILayoutTool    
   125     "
   126 
   127     <resource: #help>
   128 
   129     ^super helpSpec addPairsFrom:#(
   130 
   131 #cornerX
   132 'Absolute corner x of the selected widget.'
   133 
   134 #cornerY
   135 'Absolute corner y of the selected widget.'
   136 
   137 #layoutTool
   138 'Tool to set the layout of the selected widget.'
   139 
   140 #leftAbsolute
   141 'Offset of the left edge; positive is to the right, negative to the left.'
   142 
   143 #leftRelative
   144 'Relative origin x of the selected widget.'
   145 
   146 #makeLeftAbsolute
   147 'Compute pure-absolute x'
   148 
   149 #makeLeftRelative
   150 'Compute pure-fractional x.'
   151 
   152 #makeLeftRelativeFromRight
   153 'Compute fraction+offset for x relative to containers right.'
   154 
   155 #makeTopAbsolute
   156 'Compute pure-absolute y.'
   157 
   158 #makeTopRelative
   159 'Compute pure-fractional y.'
   160 
   161 #makeTopRelativeFromBottom
   162 'Compute fraction+offset for y relative to containers bottom.'
   163 
   164 #originX
   165 'Absolute origin x of the selected widget.'
   166 
   167 #originY
   168 'Absolute origin y of the selected widget.'
   169 
   170 #topAbsolute
   171 'Offset of the top edge; positive is to the bottom, negative to the top.'
   172 
   173 #topRelative
   174 'Relative origin y of the selected widget.'
   175 
   176 )
   177 ! !
   178 
   179 !UILayoutTool class methodsFor:'interface specs'!
   180 
   181 layoutOriginSpec
   182     "This resource specification was automatically generated
   183      by the UIPainter of ST/X."
   184 
   185     "Do not manually edit this!! If it is corrupted,
   186      the UIPainter may not be able to read the specification."
   187 
   188     "
   189      UIPainter new openOnClass:UILayoutTool andSelector:#layoutOriginSpec
   190      UILayoutTool new openInterface:#layoutOriginSpec
   191     "
   192 
   193     <resource: #canvas>
   194 
   195     ^ 
   196     #(FullSpec
   197        name: layoutOriginSpec
   198        window: 
   199       (WindowSpec
   200          label: 'UILayoutTool'
   201          name: 'UILayoutTool'
   202          min: (Point 10 10)
   203          bounds: (Rectangle 0 0 345 107)
   204        )
   205        component: 
   206       (SpecCollection
   207          collection: (
   208           (FramedBoxSpec
   209              label: 'Origin'
   210              name: 'FramedBox'
   211              layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 108 0)
   212              labelPosition: topLeft
   213              translateLabel: true
   214              component: 
   215             (SpecCollection
   216                collection: (
   217                 (LabelSpec
   218                    label: 'Relative:'
   219                    name: 'labelRelative'
   220                    layout: (Point 103 3)
   221                    translateLabel: true
   222                  )
   223                 (LabelSpec
   224                    label: 'Offset:'
   225                    name: 'labelAbsolute'
   226                    layout: (Point 203 3)
   227                    translateLabel: true
   228                  )
   229                 (LabelSpec
   230                    label: 'Left:'
   231                    name: 'labelLeft'
   232                    layout: (AlignmentOrigin 68 0 24 0 1 0)
   233                    translateLabel: true
   234                  )
   235                 (ActionButtonSpec
   236                    label: 'imageFractX'
   237                    name: 'actionRelativeLeft'
   238                    layout: (LayoutFrame 77 0 21 0 99 0 43 0)
   239                    activeHelpKey: makeLeftRelative
   240                    hasCharacterOrientedLabel: false
   241                    translateLabel: true
   242                    tabable: true
   243                    model: relativeLeft
   244                  )
   245                 (InputFieldSpec
   246                    name: 'fieldLeftFraction'
   247                    layout: (LayoutFrame 102 0 22 0 152 0 44 0)
   248                    activeHelpKey: leftRelative
   249                    tabable: true
   250                    model: leftFraction
   251                    group: inputGroup
   252                    type: numberOrNil
   253                    acceptOnLostFocus: true
   254                    acceptChannel: acceptChannel
   255                    modifiedChannel: modifiedChannel
   256                    acceptOnPointerLeave: true
   257                  )
   258                 (ActionButtonSpec
   259                    label: 'imageAbsX'
   260                    name: 'actionAbsoluteLeft'
   261                    layout: (LayoutFrame 178 0 21 0 200 0 43 0)
   262                    activeHelpKey: makeLeftAbsolute
   263                    hasCharacterOrientedLabel: false
   264                    translateLabel: true
   265                    tabable: true
   266                    model: absoluteLeft
   267                  )
   268                 (InputFieldSpec
   269                    name: 'fieldLeftOffset'
   270                    layout: (LayoutFrame 203 0 21 0 253 0 43 0)
   271                    activeHelpKey: leftAbsolute
   272                    tabable: true
   273                    model: leftOffset
   274                    group: inputGroup
   275                    type: numberOrNil
   276                    acceptOnLostFocus: true
   277                    acceptChannel: acceptChannel
   278                    modifiedChannel: modifiedChannel
   279                    acceptOnPointerLeave: true
   280                  )
   281                 (ActionButtonSpec
   282                    label: 'imageAbsXFromRight'
   283                    name: 'actionRightRelativeLeft'
   284                    layout: (LayoutFrame 257 0 21 0 279 0 43 0)
   285                    activeHelpKey: makeLeftRelativeFromRight
   286                    hasCharacterOrientedLabel: false
   287                    translateLabel: true
   288                    tabable: true
   289                    model: rightRelativeLeft
   290                  )
   291                 (LabelSpec
   292                    label: 'Top:'
   293                    name: 'labelTop'
   294                    layout: (AlignmentOrigin 68 0 51 0 1 0)
   295                    translateLabel: true
   296                  )
   297                 (ActionButtonSpec
   298                    label: 'imageFractY'
   299                    name: 'actionRelativeTop'
   300                    layout: (LayoutFrame 77 0 48 0 99 0 70 0)
   301                    activeHelpKey: makeTopRelative
   302                    hasCharacterOrientedLabel: false
   303                    translateLabel: true
   304                    tabable: true
   305                    model: relativeTop
   306                  )
   307                 (InputFieldSpec
   308                    name: 'fieldTopFraction'
   309                    layout: (LayoutFrame 103 0 48 0 153 0 70 0)
   310                    activeHelpKey: topRelative
   311                    tabable: true
   312                    model: topFraction
   313                    group: inputGroup
   314                    type: numberOrNil
   315                    acceptOnLostFocus: true
   316                    acceptChannel: acceptChannel
   317                    modifiedChannel: modifiedChannel
   318                    acceptOnPointerLeave: true
   319                  )
   320                 (ActionButtonSpec
   321                    label: 'imageAbsY'
   322                    name: 'actionAbsoluteTop'
   323                    layout: (LayoutFrame 178 0 48 0 200 0 70 0)
   324                    activeHelpKey: makeTopAbsolute
   325                    hasCharacterOrientedLabel: false
   326                    translateLabel: true
   327                    tabable: true
   328                    model: absoluteTop
   329                  )
   330                 (InputFieldSpec
   331                    name: 'fieldTopOffset'
   332                    layout: (LayoutFrame 203 0 48 0 253 0 70 0)
   333                    activeHelpKey: topAbsolute
   334                    tabable: true
   335                    model: topOffset
   336                    group: inputGroup
   337                    type: numberOrNil
   338                    acceptOnLostFocus: true
   339                    acceptChannel: acceptChannel
   340                    modifiedChannel: modifiedChannel
   341                    acceptOnPointerLeave: true
   342                  )
   343                 (ActionButtonSpec
   344                    label: 'imageAbsYFromBottom'
   345                    name: 'actionBottomRelativeTop'
   346                    layout: (LayoutFrame 257 0 48 0 279 0 70 0)
   347                    activeHelpKey: makeTopRelativeFromBottom
   348                    hasCharacterOrientedLabel: false
   349                    translateLabel: true
   350                    tabable: true
   351                    model: bottomRelativeTop
   352                  )
   353                 )
   354               
   355              )
   356            )
   357           )
   358         
   359        )
   360      )
   361 !
   362 
   363 layoutPointSpec
   364     "This resource specification was automatically generated
   365      by the UIPainter of ST/X."
   366 
   367     "Do not manually edit this!! If it is corrupted,
   368      the UIPainter may not be able to read the specification."
   369 
   370     "
   371      UIPainter new openOnClass:UILayoutTool andSelector:#layoutPointSpec
   372      UILayoutTool new openInterface:#layoutPointSpec
   373     "
   374 
   375     <resource: #canvas>
   376 
   377     ^ 
   378     #(FullSpec
   379        name: layoutPointSpec
   380        window: 
   381       (WindowSpec
   382          label: 'UILayoutTool'
   383          name: 'UILayoutTool'
   384          min: (Point 10 10)
   385          bounds: (Rectangle 0 0 278 124)
   386        )
   387        component: 
   388       (SpecCollection
   389          collection: (
   390           (FramedBoxSpec
   391              label: 'Origin'
   392              name: 'FramedBox'
   393              layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 94 0)
   394              labelPosition: topLeft
   395              translateLabel: true
   396              component: 
   397             (SpecCollection
   398                collection: (
   399                 (LabelSpec
   400                    label: 'Left:'
   401                    name: 'labelOriginY'
   402                    layout: (AlignmentOrigin 83 0 12 0 1 0)
   403                    translateLabel: true
   404                  )
   405                 (InputFieldSpec
   406                    name: 'fieldOriginX'
   407                    layout: (LayoutFrame 85 0 9 0 135 0 31 0)
   408                    activeHelpKey: originX
   409                    tabable: true
   410                    model: leftOffset
   411                    group: inputGroup
   412                    type: numberOrNil
   413                    acceptOnLostFocus: true
   414                    acceptChannel: acceptChannel
   415                    modifiedChannel: modifiedChannel
   416                    acceptOnPointerLeave: true
   417                  )
   418                 (LabelSpec
   419                    label: 'Top:'
   420                    name: 'labelOriginX'
   421                    layout: (AlignmentOrigin 83 0 37 0 1 0)
   422                    translateLabel: true
   423                  )
   424                 (InputFieldSpec
   425                    name: 'fieldOriginY'
   426                    layout: (LayoutFrame 85 0 34 0 135 0 56 0)
   427                    activeHelpKey: originY
   428                    tabable: true
   429                    model: topOffset
   430                    group: inputGroup
   431                    type: numberOrNil
   432                    acceptOnLostFocus: true
   433                    acceptChannel: acceptChannel
   434                    modifiedChannel: modifiedChannel
   435                    acceptOnPointerLeave: true
   436                  )
   437                 )
   438               
   439              )
   440            )
   441           )
   442         
   443        )
   444      )
   445 !
   446 
   447 slices
   448     ^ #(
   449         ( 'Frame'          LayoutFrame)
   450         ( 'Origin'         LayoutOrigin)
   451         ( 'Alig.Origin'    AlignmentOrigin)
   452         ( 'Point'          Point)
   453         ( 'Rectangle'      Rectangle)
   454         ( 'Extent'         Extent)
   455        ) 
   456 
   457 !
   458 
   459 windowSpec
   460     "This resource specification was automatically generated
   461      by the UIPainter of ST/X."
   462 
   463     "Do not manually edit this!! If it is corrupted,
   464      the UIPainter may not be able to read the specification."
   465 
   466     "
   467      UIPainter new openOnClass:UILayoutTool andSelector:#windowSpec
   468      UILayoutTool new openInterface:#windowSpec
   469      UILayoutTool open
   470     "
   471 
   472     <resource: #canvas>
   473 
   474     ^ 
   475      #(FullSpec
   476         name: windowSpec
   477         window: 
   478        (WindowSpec
   479           label: 'UILayoutTool'
   480           name: 'UILayoutTool'
   481           min: (Point 10 10)
   482           bounds: (Rectangle 12 22 354 321)
   483         )
   484         component: 
   485        (SpecCollection
   486           collection: (
   487            (NoteBookViewSpec
   488               name: 'NoteBook'
   489               layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   490               activeHelpKey: layoutTool
   491               enableChannel: enableChannel
   492               tabable: true
   493               model: noteBookModel
   494               menu: noteBookList
   495               direction: bottom
   496               translateLabel: true
   497               canvas: layoutCanvasHolder
   498               tabTopMargin: 0
   499               tabBottomMargin: 0
   500               keepCanvasAlive: true
   501               tabLevel: 0
   502             )
   503            )
   504          
   505         )
   506       )
   507 ! !
   508 
   509 !UILayoutTool class methodsFor:'resources'!
   510 
   511 classResources
   512     "my translations are found in the UIPainter classes resources"
   513 
   514     ^ UIPainter classResources 
   515 ! !
   516 
   517 !UILayoutTool methodsFor:'accessing'!
   518 
   519 acceptChannel
   520     "return the value of the instance variable 'acceptChannel' (automatically generated)"
   521 
   522     ^ masterApplication acceptChannel
   523 !
   524 
   525 layout
   526     "returns configued layout or nil
   527     "
   528     ^ currentTool notNil ifTrue:[currentTool layout]
   529                         ifFalse:[nil]
   530 !
   531 
   532 layoutType
   533     "returns current layout type or nil
   534     "
   535     |slice|
   536 
   537     (slice := self selectedSlice) notNil ifTrue:[
   538         ^ slice last
   539     ].
   540   ^ nil
   541 !
   542 
   543 layoutView
   544     "returns current edited view
   545     "
   546     ^ layoutView
   547 !
   548 
   549 layoutView:aView type:aTypeOrNil spec:aSpec
   550     "change current edited view
   551     "
   552     |type name list|
   553 
   554     layoutView := aView.
   555     layoutSpec := aSpec.
   556 
   557     (self aspectFor:#defaultExtentEnabled) value:(aSpec class ==  WindowSpec) not.
   558 
   559     aTypeOrNil notNil ifTrue:[ 
   560         self class slices findFirst:[:e|
   561             e last == aTypeOrNil 
   562                 ifTrue:[name := e first. true] 
   563                 ifFalse:[false].
   564         ].
   565         list := Array with:name with: 'Frame'.
   566     ] ifFalse:[
   567         (type := UIPainterView layoutType:layoutView) notNil ifTrue:[
   568             self class slices findFirst:[:e|
   569                 e last == type ifTrue:[name := e first. true] ifFalse:[false]
   570             ].
   571             list := tabList.
   572             type == #Extent ifTrue:[ 
   573                 aView superView specClass isLayoutContainer ifTrue:[
   574                     list := Array with:name
   575                 ] ifFalse:[
   576                     list := list copyWith:name
   577                 ]
   578             ]
   579         ]
   580     ].
   581     self noteBookList  value:list.
   582     self noteBookModel value:name.
   583     self update.
   584 !
   585 
   586 modifiedHolder:aValueHolder
   587     "set the value holder set to true in case of modifying attributes
   588     "
   589     modifiedHolder notNil ifTrue:[
   590         modifiedHolder removeDependent:self. 
   591     ].
   592 
   593     (modifiedHolder := aValueHolder) notNil ifTrue:[
   594         modifiedHolder addDependent:self.
   595     ].
   596 
   597 !
   598 
   599 update
   600     "update from view
   601     "
   602     |view|
   603 
   604     (selection notNil and:[currentTool notNil]) ifTrue:[
   605         (view := layoutView) notNil ifTrue:[
   606             currentTool fetch:view spec:layoutSpec
   607         ]
   608     ].
   609         
   610 ! !
   611 
   612 !UILayoutTool methodsFor:'aspects'!
   613 
   614 aspectFor:aKey
   615     "returns the aspect for a aKey or nil"
   616 
   617     ^ aspects at:aKey ifAbsent:[ super aspectFor:aKey ]
   618 !
   619 
   620 layoutCanvasHolder
   621     |holder|
   622 
   623     (holder := builder bindingAt:#layoutCanvasHolder) isNil ifTrue:[
   624         holder := ValueHolder new.
   625         builder aspectAt:#layoutCanvasHolder put:holder
   626     ].
   627   ^ holder
   628 !
   629 
   630 notUsingDefaultExtent
   631     |holder|
   632 
   633     (holder := builder bindingAt:#notUsingDefaultExtent) isNil ifTrue:[
   634         holder := BlockValue forLogicalNot:(self aspectFor:#useDefaultExtent).
   635         builder aspectAt:#notUsingDefaultExtent put:holder.
   636     ].
   637     ^ holder
   638 
   639 !
   640 
   641 noteBookList
   642     "holds the list of tab labels"
   643 
   644     ^ builder valueAspectFor:#noteBookList initialValue:nil
   645 !
   646 
   647 noteBookModel
   648     "automatically generated by UIPainter ..."
   649 
   650     |holder|
   651 
   652     (holder := builder bindingAt:#noteBookModel) isNil ifTrue:[
   653         holder := AspectAdaptor new subject:self; forAspect:#selection.
   654         builder aspectAt:#noteBookModel put:holder.
   655     ].
   656     ^ holder
   657 ! !
   658 
   659 !UILayoutTool methodsFor:'change & update'!
   660 
   661 update:something with:aParameter from:changedObject
   662     "one of my models changed its value
   663     "
   664     changedObject ~~ modifiedHolder ifTrue:[
   665         modifiedHolder value ~~ true ifTrue:[
   666             modifiedHolder isNil ifFalse:[
   667                 modifiedHolder value:true
   668             ]
   669         ]
   670     ]
   671 
   672 ! !
   673 
   674 !UILayoutTool methodsFor:'converting absolute'!
   675 
   676 absolute:what xOrY:xOrY
   677     "compute what as absolute (i.e. fraction=0, offset >= 0)"
   678 
   679     |extent fraction offset fractSymb offsetSymb 
   680      newOffset newFraction fractHolder offsetHolder|
   681 
   682     extent     := (self layoutView superView computeExtent) perform:xOrY.
   683     fractSymb  := (what, 'Fraction') asSymbol.
   684     offsetSymb := (what,   'Offset') asSymbol.
   685     fractHolder := (self aspectFor:fractSymb).
   686     offsetHolder := (self aspectFor:offsetSymb).
   687     fraction   := fractHolder  value.
   688     offset     := offsetHolder value.
   689 
   690     newOffset := offset + ((fraction * extent) asInteger).
   691     newFraction := 0.
   692 
   693     fractHolder  value:newFraction.
   694     offsetHolder value:newOffset.
   695 !
   696 
   697 absoluteBottom
   698     "compute bottom as absolute (i.e. fraction=0, offset >= 0)"
   699 
   700     self absolute:'bottom' xOrY:#y
   701 
   702 !
   703 
   704 absoluteLeft
   705     "compute left as absolute (i.e. fraction=0, offset >= 0)"
   706 
   707     self absolute:'left' xOrY:#x
   708 
   709 !
   710 
   711 absoluteRight
   712     "compute right as absolute (i.e. fraction=0, offset >= 0)"
   713 
   714     self absolute:'right' xOrY:#x
   715 
   716 !
   717 
   718 absoluteTop
   719     "compute top as absolute (i.e. fraction=0, offset >= 0)"
   720 
   721     self absolute:'top' xOrY:#y
   722 
   723 ! !
   724 
   725 !UILayoutTool methodsFor:'converting absolute from corner'!
   726 
   727 bottomRelativeBottom
   728     "compute bottom relative to containers bottom (fraction=1, offset negative)"
   729 
   730     self cornerRelative:'bottom' xOrY:#y
   731 
   732 !
   733 
   734 bottomRelativeTop
   735     "compute top relative to containers bottom (fraction=1, offset negative)"
   736 
   737     self cornerRelative:'top' xOrY:#y
   738 
   739 !
   740 
   741 cornerRelative:what xOrY:xOrY
   742     "compute what relative to the corner (i.e. fraction=1, offset negative)"
   743 
   744     |extent fraction offset fractSymb offsetSymb 
   745      newFraction newOffset fractHolder offsetHolder|
   746 
   747     extent     := (self layoutView superView computeExtent) perform:xOrY.
   748     fractSymb  := (what, 'Fraction') asSymbol.
   749     offsetSymb := (what,   'Offset') asSymbol.
   750     fractHolder := (self aspectFor:fractSymb).
   751     offsetHolder := (self aspectFor:offsetSymb).
   752     fraction   := fractHolder  value.
   753     offset     := offsetHolder value.
   754 
   755     newOffset := offset + ((fraction * extent) asInteger).
   756     newOffset := newOffset - extent.
   757     newFraction := 1.
   758 
   759     fractHolder  value:newFraction.
   760     offsetHolder value:newOffset.
   761 
   762 
   763 
   764 !
   765 
   766 rightRelativeLeft
   767     "compute left relative to containers right (fraction=1, offset negative)"
   768 
   769     self cornerRelative:'left' xOrY:#x
   770 
   771 !
   772 
   773 rightRelativeRight
   774     "compute right relative to containers right (fraction=1, offset negative)"
   775 
   776     self cornerRelative:'right' xOrY:#x
   777 
   778 ! !
   779 
   780 !UILayoutTool methodsFor:'converting relative'!
   781 
   782 relative:what xOrY:xOrY
   783     "compute what relative to the origin (i.e. fraction=0..1, offset 0)"
   784 
   785     |extent fraction offset fractSymb offsetSymb 
   786      newFraction newOffset
   787      fractHolder offsetHolder|
   788 
   789     extent     := (self layoutView superView computeExtent) perform:xOrY.
   790     fractSymb  := (what, 'Fraction') asSymbol.
   791     offsetSymb := (what,   'Offset') asSymbol.
   792     fractHolder := (self aspectFor:fractSymb).
   793     offsetHolder := (self aspectFor:offsetSymb).
   794     fraction   := fractHolder  value.
   795     offset     := offsetHolder value.
   796 
   797     newFraction   := (fraction + (offset / extent)) asFloat.
   798     newOffset := 0.
   799 
   800     (newFraction > 1.0) ifTrue:[newFraction := 1.0].
   801     (newFraction < 0.0) ifTrue:[newFraction := 0].
   802 
   803     offsetHolder value:newOffset.
   804     fractHolder  value:newFraction.
   805 
   806 
   807 
   808 !
   809 
   810 relativeBottom
   811     "compute bottom relative to the origin (i.e. fraction=0..1, offset 0)"
   812 
   813     self relative:'bottom' xOrY:#y
   814 
   815 
   816 !
   817 
   818 relativeLeft
   819     "compute left relative to the origin (i.e. fraction=0..1, offset 0)"
   820 
   821     self relative:'left' xOrY:#x
   822 
   823 !
   824 
   825 relativeRight
   826     "compute right relative to the origin (i.e. fraction=0..1, offset 0)"
   827 
   828     self relative:'right' xOrY:#x
   829 
   830 !
   831 
   832 relativeTop
   833     "compute top relative to the origin (i.e. fraction=0..1, offset 0)"
   834 
   835     self relative:'top' xOrY:#y
   836 
   837 ! !
   838 
   839 !UILayoutTool methodsFor:'initialization'!
   840 
   841 initialize
   842     "initialize channels
   843     "
   844     |slices size|
   845 
   846     super initialize.
   847 
   848     aspects  := IdentityDictionary new.
   849     toolsDictionary := IdentityDictionary new.
   850 
   851     #(  bottomFraction          bottomOffset
   852         leftFraction            leftOffset
   853         topFraction             topOffset
   854         rightFraction           rightOffset
   855         leftAlignmentFraction   topAlignmentFraction
   856         (useDefaultExtent     false)
   857         (defaultExtentEnabled false)
   858 
   859         (usePreferredWidth false)
   860         (usePreferredHeight false)
   861         (useDynamicPreferredWidth false)
   862         (useDynamicPreferredHeight false)
   863         (keepSpaceForOSXResizeHandleV false)
   864         (keepSpaceForOSXResizeHandleH false)
   865     )
   866 
   867     do:[:aKeyOrPair| |holder key val|
   868         (key := aKeyOrPair) isSymbol ifFalse:[
   869             key := aKeyOrPair first.
   870             val := aKeyOrPair second
   871         ].
   872         holder := val asValue.
   873         holder addDependent:self.
   874         aspects at:key put:holder.
   875     ].
   876 
   877     slices  := self class slices.
   878     size    := slices size - 1.
   879     tabList := Array new:size.
   880 
   881     1 to:size do:[:i| tabList at:i put:((slices at:i) first) ].
   882 ! !
   883 
   884 !UILayoutTool methodsFor:'selection'!
   885 
   886 selectedSlice
   887     "returns the slice assigned to the selection or nil"
   888 
   889     selection isNil ifTrue:[^ nil].
   890     ^ self class slices detect:[:aSlice | aSlice first = selection] ifNone:nil
   891 
   892 "/    selection notNil ifTrue:[
   893 "/        self class slices do:[:aSlice|
   894 "/            aSlice first = selection ifTrue:[
   895 "/                ^ aSlice
   896 "/            ]
   897 "/        ]
   898 "/    ].
   899 "/    ^ nil
   900 !
   901 
   902 selection
   903     ^ selection
   904 !
   905 
   906 selection:aSelection
   907     |appl slice sel key view|
   908 
   909     aSelection isNumber ifTrue:[
   910         aSelection ~~ 0 ifTrue:[sel := tabList at:aSelection]
   911     ] ifFalse:[
   912         sel := aSelection
   913     ].
   914 
   915     selection = sel ifFalse:[
   916         (selection := sel) notNil ifTrue:[
   917             key := selection asSymbol.
   918             appl := toolsDictionary at:key ifAbsent:nil.
   919 
   920             appl isNil ifTrue:[
   921                 view  := ApplicationSubView new.
   922                 slice := self selectedSlice.
   923                 appl  := slice last asString.
   924                 appl := Smalltalk classNamed:(self class name asString, '::', appl).
   925                 appl := appl new.
   926                 appl masterApplication:self.
   927                 appl createBuilder.
   928                 view client:appl.
   929                 appl window:view.
   930                 toolsDictionary at:key put:appl.
   931             ] ifFalse:[
   932                 view := appl window
   933             ].
   934             modifiedHolder value:true.
   935         ].
   936         currentTool := appl.
   937         self layoutCanvasHolder value:view.
   938     ].
   939     self update
   940 
   941     "Modified: / 4.2.2000 / 22:31:41 / cg"
   942 ! !
   943 
   944 !UILayoutTool::AnyLayout class methodsFor:'image specs'!
   945 
   946 imageAbsX
   947     <resource: #image>
   948     "This resource specification was automatically generated
   949      by the ImageEditor of ST/X."
   950     "Do not manually edit this!! If it is corrupted,
   951      the ImageEditor may not be able to read the specification."
   952     "
   953      self imageAbsX inspect
   954      ImageEditor openOnClass:self andSelector:#imageAbsX
   955      Icon flushCachedIcons"
   956     
   957     ^ Icon constantNamed:'UILayoutTool::AnyLayout class imageAbsX'
   958         ifAbsentPut:[
   959             (Depth1Image new)
   960                 width:16;
   961                 height:16;
   962                 photometric:(#palette);
   963                 bitsPerSample:(#( 1 ));
   964                 samplesPerPixel:(1);
   965                 bits:(ByteArray 
   966                             fromPackedString:'
   967 <@BP@I@N$L*P*)BZ''8*@@(@B''8*P&)B*$L*PC)@@<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
   968 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
   969 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a');
   970                 colorMapFromArray:#[ 0 0 0 255 255 255 ];
   971                 mask:((ImageMask new)
   972                             width:16;
   973                             height:16;
   974                             bits:(ByteArray 
   975                                         fromPackedString:'<@C0@O@N<L;0;/C>??;??/?>??;0?/C.<L;0C/@@<@@b');
   976                             yourself);
   977                 yourself
   978         ]
   979 !
   980 
   981 imageAbsXFromRight
   982     <resource: #image>
   983     "This resource specification was automatically generated
   984      by the ImageEditor of ST/X."
   985     "Do not manually edit this!! If it is corrupted,
   986      the ImageEditor may not be able to read the specification."
   987     "
   988      self imageAbsXFromRight inspect
   989      ImageEditor openOnClass:self andSelector:#imageAbsXFromRight
   990      Icon flushCachedIcons"
   991     
   992     ^ Icon constantNamed:'UILayoutTool::AnyLayout class imageAbsXFromRight'
   993         ifAbsentPut:[
   994             (Depth1Image new)
   995                 width:16;
   996                 height:16;
   997                 photometric:(#palette);
   998                 bitsPerSample:(#( 1 ));
   999                 samplesPerPixel:(1);
  1000                 bits:(ByteArray 
  1001                             fromPackedString:'@@<@BW@IT0%UBU$IT_%@@T@AT_%YBUTIT0%0BP@I@@<b');
  1002                 colorMapFromArray:#[ 0 0 0 255 255 255 ];
  1003                 mask:((ImageMask new)
  1004                             width:16;
  1005                             height:16;
  1006                             bits:(ByteArray 
  1007                                         fromPackedString:'@@<@C7@O\0=7C7<O_?=??7??_?=?C7\O\0=0C0@O@@<b');
  1008                             yourself);
  1009                 yourself
  1010         ]
  1011 !
  1012 
  1013 imageAbsY
  1014     <resource: #image>
  1015     "This resource specification was automatically generated
  1016      by the ImageEditor of ST/X."
  1017     "Do not manually edit this!! If it is corrupted,
  1018      the ImageEditor may not be able to read the specification."
  1019     "
  1020      self imageAbsY inspect
  1021      ImageEditor openOnClass:self andSelector:#imageAbsY
  1022      Icon flushCachedIcons"
  1023     
  1024     ^ Icon constantNamed:'UILayoutTool::AnyLayout class imageAbsY'
  1025         ifAbsentPut:[
  1026             (Depth1Image new)
  1027                 width:16;
  1028                 height:16;
  1029                 photometric:(#palette);
  1030                 bitsPerSample:(#( 1 ));
  1031                 samplesPerPixel:(1);
  1032                 bits:(ByteArray 
  1033                             fromPackedString:'??>@@X@A?''<BP@I@@$@BPA98D@ HD@P O''0 AC?<@@@b');
  1034                 colorMapFromArray:#[ 0 0 0 255 255 255 ];
  1035                 mask:((ImageMask new)
  1036                             width:16;
  1037                             height:16;
  1038                             bits:(ByteArray 
  1039                                         fromPackedString:'??????????<C0@O@@<@C0A?8G? O<@_ O?0??C?<@@@b');
  1040                             yourself);
  1041                 yourself
  1042         ]
  1043 !
  1044 
  1045 imageAbsYFromBottom
  1046     <resource: #image>
  1047     "This resource specification was automatically generated
  1048      by the ImageEditor of ST/X."
  1049     "Do not manually edit this!! If it is corrupted,
  1050      the ImageEditor may not be able to read the specification."
  1051     "
  1052      self imageAbsYFromBottom inspect
  1053      ImageEditor openOnClass:self andSelector:#imageAbsYFromBottom
  1054      Icon flushCachedIcons"
  1055     
  1056     ^ Icon constantNamed:'UILayoutTool::AnyLayout class imageAbsYFromBottom'
  1057         ifAbsentPut:[
  1058             (Depth1Image new)
  1059                 width:16;
  1060                 height:16;
  1061                 photometric:(#palette);
  1062                 bitsPerSample:(#( 1 ));
  1063                 samplesPerPixel:(1);
  1064                 bits:(ByteArray 
  1065                             fromPackedString:'@@@??B@DO''0DH@ PD@ ^^@I@@$@BP@I@?''>@@X@A??<b');
  1066                 colorMapFromArray:#[ 0 0 0 255 255 255 ];
  1067                 mask:((ImageMask new)
  1068                             width:16;
  1069                             height:16;
  1070                             bits:(ByteArray 
  1071                                         fromPackedString:'@@@??C?<O?0G8@?0G? _>@O@@<@C0@O@??????????<b');
  1072                             yourself);
  1073                 yourself
  1074         ]
  1075 !
  1076 
  1077 imageFractX
  1078     <resource: #image>
  1079     "This resource specification was automatically generated
  1080      by the ImageEditor of ST/X."
  1081     "Do not manually edit this!! If it is corrupted,
  1082      the ImageEditor may not be able to read the specification."
  1083     "
  1084      self imageFractX inspect
  1085      ImageEditor openOnClass:self andSelector:#imageFractX
  1086      Icon flushCachedIcons"
  1087     
  1088     ^ Icon constantNamed:'UILayoutTool::AnyLayout class imageFractX'
  1089         ifAbsentPut:[
  1090             (Depth1Image new)
  1091                 width:16;
  1092                 height:16;
  1093                 photometric:(#palette);
  1094                 bitsPerSample:(#( 1 ));
  1095                 samplesPerPixel:(1);
  1096                 bits:(ByteArray 
  1097                             fromPackedString:'
  1098 <@>PBY@I&A&TJYII$X&@@X@A$X&RRYP)&A&PBY@I<@<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  1099 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  1100 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a');
  1101                 colorMapFromArray:#[ 0 0 0 255 255 255 ];
  1102                 mask:((ImageMask new)
  1103                             width:16;
  1104                             height:16;
  1105                             bits:(ByteArray 
  1106                                         fromPackedString:'<@?0C?@O>A?<O?9????????????>_?0?>A?0C?@O<@<b');
  1107                             yourself);
  1108                 yourself
  1109         ]
  1110 !
  1111 
  1112 imageFractY
  1113     <resource: #image>
  1114     "This resource specification was automatically generated
  1115      by the ImageEditor of ST/X."
  1116     "Do not manually edit this!! If it is corrupted,
  1117      the ImageEditor may not be able to read the specification."
  1118     "
  1119      self imageFractY inspect
  1120      ImageEditor openOnClass:self andSelector:#imageFractY
  1121      Icon flushCachedIcons"
  1122     
  1123     ^ Icon constantNamed:'UILayoutTool::AnyLayout class imageFractY'
  1124         ifAbsentPut:[
  1125             (Depth1Image new)
  1126                 width:16;
  1127                 height:16;
  1128                 photometric:(#palette);
  1129                 bitsPerSample:(#( 1 ));
  1130                 samplesPerPixel:(1);
  1131                 bits:(ByteArray 
  1132                             fromPackedString:'??>@@X@A?''<PB@ PAB@BP@I@AB@HDA@H?''>@@X@A??<b');
  1133                 colorMapFromArray:#[ 0 0 0 255 255 255 ];
  1134                 mask:((ImageMask new)
  1135                             width:16;
  1136                             height:16;
  1137                             bits:(ByteArray 
  1138                                         fromPackedString:'??????????<_>@?0A>@C0@O@A>@O<A?8??????????<b');
  1139                             yourself);
  1140                 yourself
  1141         ]
  1142 ! !
  1143 
  1144 !UILayoutTool::AnyLayout methodsFor:'accessing'!
  1145 
  1146 aspectValueOr0For:aspectName
  1147     "common helper - fetches the aspect value; if it is nil, return 0."
  1148 
  1149     ^ self aspectValueOr:0 for:aspectName
  1150 ! !
  1151 
  1152 !UILayoutTool::AlignmentOrigin class methodsFor:'help specs'!
  1153 
  1154 helpSpec
  1155     "This resource specification was automatically generated
  1156      by the UIHelpTool of ST/X."
  1157 
  1158     "Do not manually edit this!! If it is corrupted,
  1159      the UIHelpTool may not be able to read the specification."
  1160 
  1161     "
  1162      UIHelpTool openOnClass:UILayoutTool::AlignmentOrigin    
  1163     "
  1164 
  1165     <resource: #help>
  1166 
  1167     ^super helpSpec addPairsFrom:#(
  1168 
  1169 #alignBottomCenter
  1170 'Aligns the widget''s bottomCenter to location.'
  1171 
  1172 #alignBottomLeft
  1173 'Aligns the widget''s bottomLeft to location.'
  1174 
  1175 #alignBottomRight
  1176 'Aligns the widget''s bottomRight to location.'
  1177 
  1178 #alignCenter
  1179 'Aligns the widget''s center to location.'
  1180 
  1181 #alignHorizontal
  1182 'Horizontal relative position of the alignment point of the widget (that point is aligned with the above origin).'
  1183 
  1184 #alignLeftCenter
  1185 'Aligns the widget''s leftCenter to location.'
  1186 
  1187 #alignRightCenter
  1188 'Aligns the widget''s rightCenter to location.'
  1189 
  1190 #alignTopCenter
  1191 'Aligns the widget''s topCenter to location.'
  1192 
  1193 #alignTopLeft
  1194 'Aligns the widget''s topLeft to location.'
  1195 
  1196 #alignTopRight
  1197 'Aligns the widget''s topRight to location.'
  1198 
  1199 #alignVertical
  1200 'Vertical relative position of the alignment point of the widget (that point is aligned with the above origin).'
  1201 
  1202 )
  1203 
  1204     "Modified: / 28-07-2010 / 10:05:41 / cg"
  1205 ! !
  1206 
  1207 !UILayoutTool::AlignmentOrigin class methodsFor:'interface specs'!
  1208 
  1209 windowSpec
  1210     "This resource specification was automatically generated
  1211      by the UIPainter of ST/X."
  1212 
  1213     "Do not manually edit this!! If it is corrupted,
  1214      the UIPainter may not be able to read the specification."
  1215 
  1216     "
  1217      UIPainter new openOnClass:UILayoutTool::AlignmentOrigin andSelector:#windowSpec
  1218      UILayoutTool::AlignmentOrigin new openInterface:#windowSpec
  1219      UILayoutTool::AlignmentOrigin open
  1220     "
  1221 
  1222     <resource: #canvas>
  1223 
  1224     ^ 
  1225     #(FullSpec
  1226        name: windowSpec
  1227        window: 
  1228       (WindowSpec
  1229          label: 'UILayoutTool-AlignmentOrigin'
  1230          name: 'UILayoutTool-AlignmentOrigin'
  1231          min: (Point 10 10)
  1232          bounds: (Rectangle 0 0 405 220)
  1233        )
  1234        component: 
  1235       (SpecCollection
  1236          collection: (
  1237           (UISubSpecification
  1238              name: 'layoutOriginSpec'
  1239              layout: (LayoutFrame 1 0.0 6 0 0 1.0 111 0)
  1240              majorKey: UILayoutTool
  1241              minorKey: layoutOriginSpec
  1242            )
  1243           (FramedBoxSpec
  1244              label: 'Alignment'
  1245              name: 'FramedBox'
  1246              layout: (LayoutFrame 1 0.0 113 0 0 1.0 215 0)
  1247              labelPosition: topLeft
  1248              translateLabel: true
  1249              component: 
  1250             (SpecCollection
  1251                collection: (
  1252                 (LabelSpec
  1253                    label: 'Horizontal:'
  1254                    name: 'alignHLabel'
  1255                    layout: (AlignmentOrigin 88 0 17 0 1 0)
  1256                    translateLabel: true
  1257                    adjust: right
  1258                  )
  1259                 (InputFieldSpec
  1260                    name: 'leftAlignmentFractionField'
  1261                    layout: (LayoutFrame 90 0 14 0 147 0 36 0)
  1262                    activeHelpKey: alignHorizontal
  1263                    tabable: true
  1264                    model: leftAlignmentFraction
  1265                    group: inputGroup
  1266                    type: numberOrNil
  1267                    acceptOnLostFocus: true
  1268                    acceptChannel: acceptChannel
  1269                    modifiedChannel: modifiedChannel
  1270                    acceptOnPointerLeave: true
  1271                  )
  1272                 (LabelSpec
  1273                    label: 'Vertical:'
  1274                    name: 'alignVLabel'
  1275                    layout: (AlignmentOrigin 88 0 43 0 1 0)
  1276                    translateLabel: true
  1277                    adjust: right
  1278                  )
  1279                 (InputFieldSpec
  1280                    name: 'topAlignmentFractionField'
  1281                    layout: (LayoutFrame 90 0 40 0 147 0 62 0)
  1282                    activeHelpKey: alignVertical
  1283                    tabable: true
  1284                    model: topAlignmentFraction
  1285                    group: inputGroup
  1286                    type: numberOrNil
  1287                    acceptOnLostFocus: true
  1288                    acceptChannel: acceptChannel
  1289                    modifiedChannel: modifiedChannel
  1290                    acceptOnPointerLeave: true
  1291                  )
  1292                 (DividerSpec
  1293                    name: 'separator1'
  1294                    layout: (LayoutFrame 204 0 19 0 245 0 22 0)
  1295                  )
  1296                 (DividerSpec
  1297                    name: 'separator2'
  1298                    layout: (LayoutFrame 204 0 55 0 245 0 58 0)
  1299                  )
  1300                 (DividerSpec
  1301                    name: 'separator3'
  1302                    layout: (LayoutFrame 196 0 28 0 199 0 50 0)
  1303                    orientation: vertical
  1304                  )
  1305                 (DividerSpec
  1306                    name: 'separator4'
  1307                    layout: (LayoutFrame 250 0 28 0 253 0 50 0)
  1308                    orientation: vertical
  1309                  )
  1310                 (ActionButtonSpec
  1311                    name: 'alignTopLeft'
  1312                    layout: (LayoutFrame 190 0 14 0 204 0 28 0)
  1313                    activeHelpKey: alignTopLeft
  1314                    tabable: true
  1315                    model: alignTopLeft
  1316                  )
  1317                 (ActionButtonSpec
  1318                    name: 'alignTopCenter'
  1319                    layout: (LayoutFrame 217 0 14 0 231 0 28 0)
  1320                    activeHelpKey: alignTopCenter
  1321                    tabable: true
  1322                    model: alignTopCenter
  1323                  )
  1324                 (ActionButtonSpec
  1325                    name: 'alignTopRight'
  1326                    layout: (LayoutFrame 245 0 14 0 259 0 28 0)
  1327                    activeHelpKey: alignTopRight
  1328                    tabable: true
  1329                    model: alignTopRight
  1330                  )
  1331                 (ActionButtonSpec
  1332                    name: 'alignLeftCenter'
  1333                    layout: (LayoutFrame 190 0 32 0 204 0 46 0)
  1334                    activeHelpKey: alignLeftCenter
  1335                    tabable: true
  1336                    model: alignLeftCenter
  1337                  )
  1338                 (ActionButtonSpec
  1339                    name: 'alignCenter'
  1340                    layout: (LayoutFrame 217 0 32 0 231 0 46 0)
  1341                    activeHelpKey: alignCenter
  1342                    tabable: true
  1343                    model: alignCenter
  1344                  )
  1345                 (ActionButtonSpec
  1346                    name: 'alignRightCenter'
  1347                    layout: (LayoutFrame 245 0 32 0 259 0 46 0)
  1348                    activeHelpKey: alignRightCenter
  1349                    tabable: true
  1350                    model: alignRightCenter
  1351                  )
  1352                 (ActionButtonSpec
  1353                    name: 'alignBottomLeft'
  1354                    layout: (LayoutFrame 190 0 50 0 204 0 64 0)
  1355                    activeHelpKey: alignBottomLeft
  1356                    tabable: true
  1357                    model: alignBottomLeft
  1358                  )
  1359                 (ActionButtonSpec
  1360                    name: 'alignBottomCenter'
  1361                    layout: (LayoutFrame 217 0 50 0 231 0 64 0)
  1362                    activeHelpKey: alignBottomCenter
  1363                    tabable: true
  1364                    model: alignBottomCenter
  1365                  )
  1366                 (ActionButtonSpec
  1367                    name: 'alignBottomRight'
  1368                    layout: (LayoutFrame 245 0 50 0 259 0 64 0)
  1369                    activeHelpKey: alignBottomRight
  1370                    tabable: true
  1371                    model: alignBottomRight
  1372                  )
  1373                 )
  1374               
  1375              )
  1376            )
  1377           )
  1378         
  1379        )
  1380      )
  1381 ! !
  1382 
  1383 !UILayoutTool::AlignmentOrigin methodsFor:'accessing'!
  1384 
  1385 fetch:aView spec:aSpec
  1386     "fetch alignmentOrigin
  1387     "
  1388     |layout type 
  1389      leftAlignmentFractionHolder topAlignmentFractionHolder
  1390      leftOffsetHolder leftFractionHolder topOffsetHolder topFractionHolder|
  1391 
  1392     type   := UIPainterView layoutType:aView.
  1393     layout := aView geometryLayout.
  1394 
  1395     leftOffsetHolder := (self aspectFor:#leftOffset).
  1396     leftFractionHolder := (self aspectFor:#leftFraction).
  1397     topOffsetHolder := (self aspectFor:#topOffset).
  1398     topFractionHolder := (self aspectFor:#topFraction).
  1399     leftAlignmentFractionHolder := (self aspectFor:#leftAlignmentFraction).
  1400     topAlignmentFractionHolder := (self aspectFor:#topAlignmentFraction).
  1401 
  1402     layout isLayout ifTrue:[
  1403         leftOffsetHolder   value:(layout leftOffset).
  1404         leftFractionHolder value:(layout leftFraction).
  1405         topOffsetHolder    value:(layout topOffset).
  1406         topFractionHolder  value:(layout topFraction).
  1407 
  1408         type == #AlignmentOrigin ifTrue:[
  1409             leftAlignmentFractionHolder value:(layout leftAlignmentFraction).
  1410             topAlignmentFractionHolder  value:(layout topAlignmentFraction).
  1411           ^ self
  1412         ]
  1413     ] ifFalse:[
  1414         layout := aView computeOrigin.
  1415 
  1416         leftOffsetHolder   value:(layout x).
  1417         leftFractionHolder value:0.
  1418         topOffsetHolder    value:(layout y).
  1419         topFractionHolder  value:0.
  1420     ].
  1421     leftAlignmentFractionHolder value:0.
  1422     topAlignmentFractionHolder  value:0.
  1423 
  1424 
  1425 !
  1426 
  1427 layout
  1428     "returns current layout as alignmentOrigin
  1429     "
  1430     |layout|
  1431 
  1432     layout  := (Smalltalk at:#AlignmentOrigin) new.
  1433 
  1434     layout 
  1435         leftFraction:(self aspectValueOr0For:#leftFraction)
  1436         offset:(self aspectValueOr0For:#leftOffset)
  1437         topFraction:(self aspectValueOr0For:#topFraction)
  1438         offset:(self aspectValueOr0For:#topOffset).
  1439 
  1440     layout 
  1441         leftAlignmentFraction:(self aspectValueOr0For:#leftAlignmentFraction)
  1442         topAlignmentFraction:(self aspectValueOr0For:#topAlignmentFraction).
  1443 
  1444   ^ layout
  1445 ! !
  1446 
  1447 !UILayoutTool::AlignmentOrigin methodsFor:'alignment'!
  1448 
  1449 alignBottomCenter
  1450     self makeAlignLeft:0.5 top:1
  1451 
  1452 
  1453 !
  1454 
  1455 alignBottomLeft
  1456     self makeAlignLeft:0 top:1
  1457 
  1458 
  1459 !
  1460 
  1461 alignBottomRight
  1462     self makeAlignLeft:1 top:1
  1463 
  1464 
  1465 !
  1466 
  1467 alignCenter
  1468     self makeAlignLeft:0.5 top:0.5
  1469 
  1470 
  1471 !
  1472 
  1473 alignLeftCenter
  1474     self makeAlignLeft:0 top:0.5
  1475 
  1476 
  1477 !
  1478 
  1479 alignRightCenter
  1480     self makeAlignLeft:1 top:0.5
  1481 
  1482 
  1483 !
  1484 
  1485 alignTopCenter
  1486     self makeAlignLeft:0.5 top:0
  1487 
  1488 
  1489 !
  1490 
  1491 alignTopLeft
  1492     self makeAlignLeft:0 top:0
  1493 
  1494 
  1495 !
  1496 
  1497 alignTopRight
  1498     self makeAlignLeft:1 top:0
  1499 
  1500 
  1501 !
  1502 
  1503 makeAlignLeft:leftAlignmentFraction top:topAlignmentFraction
  1504     |lAF tAF lO tO ext lAHolder tAHolder lOHolder tOHolder|
  1505 
  1506     lAF     := (lAHolder := self aspectFor:#leftAlignmentFraction) value ? 0.
  1507     tAF     := (tAHolder := self aspectFor:#topAlignmentFraction)  value ? 0.
  1508     ext     := (self aspectFor:#layoutView) computeExtent.
  1509 
  1510     lAHolder value:leftAlignmentFraction.
  1511     tAHolder  value:topAlignmentFraction.
  1512 
  1513     lO := (lOHolder := self aspectFor:#leftOffset) value ? 0.
  1514     tO := (tOHolder := self aspectFor:#topOffset)  value ? 0.
  1515 
  1516     lO := lO + (ext x * (leftAlignmentFraction - lAF)).
  1517     tO := tO + (ext y * (topAlignmentFraction  - tAF)).
  1518 
  1519     lOHolder value:(lO rounded).
  1520     tOHolder value:(tO rounded).
  1521 
  1522 !
  1523 
  1524 makeAlignTopRight
  1525     self makeAlignLeft:1 top:0
  1526 
  1527 
  1528 ! !
  1529 
  1530 !UILayoutTool::Extent class methodsFor:'help specs'!
  1531 
  1532 helpSpec
  1533     "This resource specification was automatically generated
  1534      by the UIHelpTool of ST/X."
  1535 
  1536     "Do not manually edit this!! If it is corrupted,
  1537      the UIHelpTool may not be able to read the specification."
  1538 
  1539     "
  1540      UIHelpTool openOnClass:UILayoutTool::Extent    
  1541     "
  1542 
  1543     <resource: #help>
  1544 
  1545     ^ super helpSpec addPairsFrom:#(
  1546 
  1547 #hrzExtent
  1548 'Horizontal extent of the selected widget.'
  1549 
  1550 #useDynamicPreferredWidth
  1551 'Dynamically adapt to any change of the widget''s preferred width'
  1552 
  1553 #useDynamicPreferredHeight
  1554 'Dynamically adapt to any change of the widget''s preferred height'
  1555 
  1556 #usePreferredHeight
  1557 'Use the widget''s preferred height as initial size'
  1558 
  1559 #usePreferredWidth
  1560 'Use the widget''s preferred width as initial size'
  1561 
  1562 #useDefaultExtent
  1563 'Use the widget''s default extent as initial size'
  1564 
  1565 #vrtExtent
  1566 'Vertical extent of the selected widget.'
  1567 
  1568 )
  1569 ! !
  1570 
  1571 !UILayoutTool::Extent class methodsFor:'interface specs'!
  1572 
  1573 windowSpec
  1574     "This resource specification was automatically generated
  1575      by the UIPainter of ST/X."
  1576 
  1577     "Do not manually edit this!! If it is corrupted,
  1578      the UIPainter may not be able to read the specification."
  1579 
  1580     "
  1581      UIPainter new openOnClass:UILayoutTool::Extent andSelector:#windowSpec
  1582      UILayoutTool::Extent new openInterface:#windowSpec
  1583      UILayoutTool::Extent open
  1584     "
  1585 
  1586     <resource: #canvas>
  1587 
  1588     ^ 
  1589     #(FullSpec
  1590        name: windowSpec
  1591        window: 
  1592       (WindowSpec
  1593          label: 'UILayoutTool-Extent'
  1594          name: 'UILayoutTool-Extent'
  1595          min: (Point 10 10)
  1596          bounds: (Rectangle 0 0 506 169)
  1597        )
  1598        component: 
  1599       (SpecCollection
  1600          collection: (
  1601           (FramedBoxSpec
  1602              label: 'Extent'
  1603              name: 'FramedBox'
  1604              layout: (LayoutFrame 0 0.0 6 0.0 0 1.0 158 0)
  1605              labelPosition: topLeft
  1606              translateLabel: true
  1607              component: 
  1608             (SpecCollection
  1609                collection: (
  1610                 (LabelSpec
  1611                    label: 'Width:'
  1612                    name: 'labelWidth'
  1613                    layout: (AlignmentOrigin 89 0 41 0 1 0.5)
  1614                    translateLabel: true
  1615                    adjust: right
  1616                  )
  1617                 (InputFieldSpec
  1618                    name: 'fieldLeftOffset'
  1619                    layout: (LayoutFrame 90 0 30 0 140 0 52 0)
  1620                    activeHelpKey: hrzExtent
  1621                    enableChannel: notUsingDefaultExtent
  1622                    tabable: true
  1623                    model: leftOffset
  1624                    group: inputGroup
  1625                    type: numberOrNil
  1626                    acceptOnLostFocus: true
  1627                    acceptChannel: acceptChannel
  1628                    modifiedChannel: modifiedChannel
  1629                    acceptOnPointerLeave: true
  1630                  )
  1631                 (LabelSpec
  1632                    label: 'Height:'
  1633                    name: 'labelHeight'
  1634                    layout: (AlignmentOrigin 89 0 66 0 1 0.5)
  1635                    translateLabel: true
  1636                    adjust: right
  1637                  )
  1638                 (InputFieldSpec
  1639                    name: 'fieldRightOffset'
  1640                    layout: (LayoutFrame 90 0 55 0 140 0 77 0)
  1641                    activeHelpKey: vrtExtent
  1642                    enableChannel: notUsingDefaultExtent
  1643                    tabable: true
  1644                    model: topOffset
  1645                    group: inputGroup
  1646                    type: numberOrNil
  1647                    acceptOnLostFocus: true
  1648                    acceptChannel: acceptChannel
  1649                    modifiedChannel: modifiedChannel
  1650                    acceptOnPointerLeave: true
  1651                  )
  1652                 (CheckBoxSpec
  1653                    label: 'Preferred'
  1654                    name: 'CheckBox1'
  1655                    layout: (LayoutFrame 169 0 30 0 275 0 52 0)
  1656                    activeHelpKey: usePreferredWidth
  1657                    model: usePreferredWidth
  1658                    translateLabel: true
  1659                  )
  1660                 (CheckBoxSpec
  1661                    label: 'Dynamic'
  1662                    name: 'CheckBox3'
  1663                    layout: (LayoutFrame 276 0 30 0 371 0 52 0)
  1664                    activeHelpKey: useDynamicPreferredWidth
  1665                    model: useDynamicPreferredWidth
  1666                    translateLabel: true
  1667                  )
  1668                 (CheckBoxSpec
  1669                    label: 'Preferred'
  1670                    name: 'CheckBox2'
  1671                    layout: (LayoutFrame 169 0 58 0 275 0 80 0)
  1672                    activeHelpKey: usePreferredHeight
  1673                    model: usePreferredHeight
  1674                    translateLabel: true
  1675                  )
  1676                 (CheckBoxSpec
  1677                    label: 'Dynamic'
  1678                    name: 'CheckBox4'
  1679                    layout: (LayoutFrame 276 0 58 0 372 0 80 0)
  1680                    activeHelpKey: useDynamicPreferredHeight
  1681                    model: useDynamicPreferredHeight
  1682                    translateLabel: true
  1683                  )
  1684                 (CheckBoxSpec
  1685                    label: 'Use Widget''s Default Extent'
  1686                    name: 'useDefaultExtentCheckBox'
  1687                    layout: (Point 5 84)
  1688                    activeHelpKey: useDefaultExtent
  1689                    enableChannel: defaultExtentEnabled
  1690                    tabable: true
  1691                    model: useDefaultExtent
  1692                    translateLabel: true
  1693                  )
  1694                 )
  1695               
  1696              )
  1697            )
  1698           (PopUpListSpec
  1699              label: 'Common Extents'
  1700              name: 'CommonExtentsPopUpList'
  1701              layout: (LayoutFrame 189 0 21 0 314 0 43 0)
  1702              tabable: true
  1703              menu: listOfCommonExtents
  1704              useIndex: true
  1705              ignoreReselect: false
  1706              stateChangeCallBackSelector: commonExtentSelected:
  1707            )
  1708           )
  1709         
  1710        )
  1711      )
  1712 ! !
  1713 
  1714 !UILayoutTool::Extent methodsFor:'accessing'!
  1715 
  1716 fetch:aView spec:aSpec
  1717     "fetch the extent from aView"
  1718 
  1719     |extent|
  1720 
  1721     extent  := aView computeExtent.
  1722 
  1723     (self aspectFor:#leftOffset)  value:(extent x).
  1724     (self aspectFor:#topOffset)   value:(extent y).
  1725     aSpec notNil ifTrue:[
  1726         (self aspectFor:#usePreferredWidth) value:(aSpec usePreferredWidth).
  1727         (self aspectFor:#usePreferredHeight) value:(aSpec usePreferredHeight).
  1728         (self aspectFor:#useDynamicPreferredWidth) value:(aSpec useDynamicPreferredWidth).
  1729         (self aspectFor:#useDynamicPreferredHeight) value:(aSpec useDynamicPreferredHeight).
  1730         (self aspectFor:#useDefaultExtent) value:aSpec useDefaultExtent 
  1731     ].
  1732 !
  1733 
  1734 layout
  1735     "returns the current extent"
  1736 
  1737     ^ (self aspectValueOr0For:#leftOffset) @ (self aspectValueOr0For:#topOffset)
  1738 ! !
  1739 
  1740 !UILayoutTool::Extent methodsFor:'aspects'!
  1741 
  1742 commonExtentsSpec
  1743     ^ #( 
  1744         ('200 x 100'  (200 100) ) 
  1745         ('300 x 300'  (300 300) ) 
  1746         ('640 x 400'  (640 400) ) 
  1747         ('800 x 600'  (800 600) ) 
  1748         ('1024 x 768'  (1024 768) ) 
  1749         ('1200 x 800'  (1200 800) ) 
  1750       )
  1751 !
  1752 
  1753 listOfCommonExtents
  1754     ^ self commonExtentsSpec collect:[:eachRow | eachRow first].
  1755 ! !
  1756 
  1757 !UILayoutTool::Extent methodsFor:'user actions'!
  1758 
  1759 commonExtentSelected:index
  1760     |xy x y|
  1761 
  1762     xy := (self commonExtentsSpec at:index) second. 
  1763     x := xy at:1.
  1764     y := xy at:2.
  1765 
  1766     (self aspectFor:#leftOffset)  value:x.
  1767     (self aspectFor:#topOffset)   value:y.
  1768 
  1769     (builder componentAt:#CommonExtentsPopUpList) 
  1770         label:(resources string:'Common Extents').
  1771 ! !
  1772 
  1773 !UILayoutTool::LayoutFrame class methodsFor:'defaults'!
  1774 
  1775 defaultFixPartHeight
  1776     ^ DefaultFixPartHeight ? 30
  1777 ! !
  1778 
  1779 !UILayoutTool::LayoutFrame class methodsFor:'help specs'!
  1780 
  1781 helpSpec
  1782     "This resource specification was automatically generated
  1783      by the UIHelpTool of ST/X."
  1784 
  1785     "Do not manually edit this!! If it is corrupted,
  1786      the UIHelpTool may not be able to read the specification."
  1787 
  1788     "
  1789      UIHelpTool openOnClass:UILayoutTool::LayoutFrame    
  1790     "
  1791 
  1792     <resource: #help>
  1793 
  1794     ^ super helpSpec addPairsFrom:#(
  1795 
  1796 #bigBottomFixPartLayout
  1797 'Set layout for a big fixed area at the bottom of the widgets container'
  1798 
  1799 #bigHorizontalFixPartLayout
  1800 'Set layout for a big fixed-height area centered vertically in the widgets container'
  1801 
  1802 #bigTopFixPartLayout
  1803 'Set layout for a big fixed area at the top of the widgets container'
  1804 
  1805 #bottomAbsolute
  1806 'Offset of the bottom edge; positive is to the bottom, negative to the top.'
  1807 
  1808 #bottomFixPartLayout
  1809 'Set layout for a small fixed area at the bottom of the widgets container'
  1810 
  1811 #bottomHalfLayout
  1812 'Set layout for the bottom half of the widgets container'
  1813 
  1814 #bottomLeftQuarterLayout
  1815 'Set layout for the bottom-left quarter of the widgets container'
  1816 
  1817 #bottomRelative
  1818 'Relative corner y of the selected widget.'
  1819 
  1820 #bottomRightQuarterLayout
  1821 'Set layout for the bottom-right quarter of the widgets container'
  1822 
  1823 #fullLayout
  1824 'Set layout to fill all of the widgets container'
  1825 
  1826 #horizontalFixPartLayout
  1827 'Set layout for a small fixed-height area centered vertically in the widgets container'
  1828 
  1829 #keepSpaceForOSXResizeHandleH
  1830 'Keep space at the right for the window resize handle under MAXOS-X; ignored when running on other systems'
  1831 
  1832 #keepSpaceForOSXResizeHandleV
  1833 'Keep space at the bottom for the window resize handle under MAXOS-X; ignored when running on other systems'
  1834 
  1835 #leftFixPartLayout
  1836 'Set layout for a small fixed area at the left of the widgets container'
  1837 
  1838 #leftHalfLayout
  1839 'Set layout for the left half of the widgets container'
  1840 
  1841 #makeBottomAbsolute
  1842 'Compute pure-absolute y.'
  1843 
  1844 #makeBottomRelative
  1845 'Compute pure-fractional y.'
  1846 
  1847 #makeBottomRelativeFromBottom
  1848 'Compute fraction+offset for y relative to containers bottom.'
  1849 
  1850 #makeRightAbsolute
  1851 'Compute pure-absolute x.'
  1852 
  1853 #makeRightRelative
  1854 'Compute pure-fractional x.'
  1855 
  1856 #makeRightRelativeFromRight
  1857 'Compute fraction+offset for x relative to containers right.'
  1858 
  1859 #rightAbsolute
  1860 'Offset of the right edge; positive is to the right, negative to the left.'
  1861 
  1862 #rightFixPartLayout
  1863 'Set layout for a small fixed area at the right of the widgets container'
  1864 
  1865 #rightHalfLayout
  1866 'Set layout for the right half of the widgets container'
  1867 
  1868 #rightRelative
  1869 'Relative corner x of the selected widget.'
  1870 
  1871 #screenFrameLayout
  1872 ''
  1873 
  1874 #useDynamicPreferredWidth
  1875 'Dynamically adapt to any change of the widget''s preferred width'
  1876 
  1877 #useDynamicPreferredHeight
  1878 'Dynamically adapt to any change of the widget''s preferred height'
  1879 
  1880 #usePreferredHeight
  1881 'Use the widget''s preferred height as initial size'
  1882 
  1883 #usePreferredWidth
  1884 'Use the widget''s preferred width as initial size'
  1885 
  1886 
  1887 #topFixPartLayout
  1888 'Set layout for a small fixed area at the top of the widgets container'
  1889 
  1890 #topHalfLayout
  1891 'Set layout for the top half of the widgets container'
  1892 
  1893 #topLeftQuarterLayout
  1894 'Set layout for the top-left quarter of the widgets container'
  1895 
  1896 #topRightQuarterLayout
  1897 'Set layout for the top-right quarter of the widgets container'
  1898 
  1899 #verticalFixPartLayout
  1900 'Set layout for a small fixed-width area centered horizontally in the widgets container'
  1901 
  1902 )
  1903 ! !
  1904 
  1905 !UILayoutTool::LayoutFrame class methodsFor:'image specs'!
  1906 
  1907 setBigBottomFixPartIcon
  1908     <resource: #image>
  1909     "This resource specification was automatically generated
  1910      by the ImageEditor of ST/X."
  1911     "Do not manually edit this!! If it is corrupted,
  1912      the ImageEditor may not be able to read the specification."
  1913     "
  1914      self setBigBottomFixPartIcon inspect
  1915      ImageEditor openOnClass:self andSelector:#setBigBottomFixPartIcon
  1916      Icon flushCachedIcons"
  1917     
  1918     ^ Icon 
  1919         constantNamed:'UILayoutTool::LayoutFrame class setBigBottomFixPartIcon'
  1920         ifAbsentPut:[
  1921             (Depth4Image new)
  1922                 width:16;
  1923                 height:16;
  1924                 photometric:(#palette);
  1925                 bitsPerSample:(#( 4 ));
  1926                 samplesPerPixel:(1);
  1927                 bits:(ByteArray 
  1928                             fromPackedString:'
  1929 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"H"H"H"H"@BDQDQDQDQH@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@HQ
  1930 DQDQDQD @!!DQDQDQDR@BDQDQDQDQH@H"H"H"H"H @@@@@@@@@@@b');
  1931                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  1932                 mask:((ImageMask new)
  1933                             width:16;
  1934                             height:16;
  1935                             bits:(ByteArray 
  1936                                         fromPackedString:'??>A XFA XFA _????????????????????????????<b');
  1937                             yourself);
  1938                 yourself
  1939         ]
  1940 !
  1941 
  1942 setBigHorizontalFixPartIcon
  1943     <resource: #image>
  1944     "This resource specification was automatically generated
  1945      by the ImageEditor of ST/X."
  1946     "Do not manually edit this!! If it is corrupted,
  1947      the ImageEditor may not be able to read the specification."
  1948     "
  1949      self setBigHorizontalFixPartIcon inspect
  1950      ImageEditor openOnClass:self andSelector:#setBigHorizontalFixPartIcon
  1951      Icon flushCachedIcons"
  1952     
  1953     ^ Icon 
  1954         constantNamed:'UILayoutTool::LayoutFrame class setBigHorizontalFixPartIcon'
  1955         ifAbsentPut:[
  1956             (Depth4Image new)
  1957                 width:16;
  1958                 height:16;
  1959                 photometric:(#palette);
  1960                 bitsPerSample:(#( 4 ));
  1961                 samplesPerPixel:(1);
  1962                 bits:(ByteArray 
  1963                             fromPackedString:'
  1964 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BH"H"H"H"H@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@H"
  1965 H"H"H"H @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b');
  1966                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  1967                 mask:((ImageMask new)
  1968                             width:16;
  1969                             height:16;
  1970                             bits:(ByteArray 
  1971                                         fromPackedString:'??>A XFA??????????????????????????>A XFA??<b');
  1972                             yourself);
  1973                 yourself
  1974         ]
  1975 !
  1976 
  1977 setBigTopFixPartIcon
  1978     <resource: #image>
  1979     "This resource specification was automatically generated
  1980      by the ImageEditor of ST/X."
  1981     "Do not manually edit this!! If it is corrupted,
  1982      the ImageEditor may not be able to read the specification."
  1983     "
  1984      self setBigTopFixPartIcon inspect
  1985      ImageEditor openOnClass:self andSelector:#setBigTopFixPartIcon
  1986      Icon flushCachedIcons"
  1987     
  1988     ^ Icon 
  1989         constantNamed:'UILayoutTool::LayoutFrame class setBigTopFixPartIcon'
  1990         ifAbsentPut:[
  1991             (Depth4Image new)
  1992                 width:16;
  1993                 height:16;
  1994                 photometric:(#palette);
  1995                 bitsPerSample:(#( 4 ));
  1996                 samplesPerPixel:(1);
  1997                 bits:(ByteArray 
  1998                             fromPackedString:'
  1999 @@@@@@@@@@@BH"H"H"H"H@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@HQDQDQDQD @"H"H"H"H"@@@@@@@@@@@@@@
  2000 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b');
  2001                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2002                 mask:((ImageMask new)
  2003                             width:16;
  2004                             height:16;
  2005                             bits:(ByteArray 
  2006                                         fromPackedString:'?????????????????????????????8FA XFA XFA??<b');
  2007                             yourself);
  2008                 yourself
  2009         ]
  2010 !
  2011 
  2012 setBottomFixPartIcon
  2013     <resource: #image>
  2014     "This resource specification was automatically generated
  2015      by the ImageEditor of ST/X."
  2016     "Do not manually edit this!! If it is corrupted,
  2017      the ImageEditor may not be able to read the specification."
  2018     "
  2019      self setBottomFixPartIcon inspect
  2020      ImageEditor openOnClass:self andSelector:#setBottomFixPartIcon
  2021      Icon flushCachedIcons"
  2022     
  2023     ^ Icon 
  2024         constantNamed:'UILayoutTool::LayoutFrame class setBottomFixPartIcon'
  2025         ifAbsentPut:[
  2026             (Depth4Image new)
  2027                 width:16;
  2028                 height:16;
  2029                 photometric:(#palette);
  2030                 bitsPerSample:(#( 4 ));
  2031                 samplesPerPixel:(1);
  2032                 bits:(ByteArray 
  2033                             fromPackedString:'
  2034 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H"
  2035 H"@BH"H @!!DQD@DQDR@BDQDP@QDQH@H"H"@BH"H @@@@@@@@@@@b');
  2036                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2037                 mask:((ImageMask new)
  2038                             width:16;
  2039                             height:16;
  2040                             bits:(ByteArray 
  2041                                         fromPackedString:'??>@@X@A @F@@X@A @F@@X@A @G???????????????<b');
  2042                             yourself);
  2043                 yourself
  2044         ]
  2045 !
  2046 
  2047 setBottomHalfIcon
  2048     <resource: #image>
  2049     "This resource specification was automatically generated
  2050      by the ImageEditor of ST/X."
  2051     "Do not manually edit this!! If it is corrupted,
  2052      the ImageEditor may not be able to read the specification."
  2053     "
  2054      self setBottomHalfIcon inspect
  2055      ImageEditor openOnClass:self andSelector:#setBottomHalfIcon
  2056      Icon flushCachedIcons"
  2057     
  2058     ^ Icon constantNamed:'UILayoutTool::LayoutFrame class setBottomHalfIcon'
  2059         ifAbsentPut:[
  2060             (Depth4Image new)
  2061                 width:16;
  2062                 height:16;
  2063                 photometric:(#palette);
  2064                 bitsPerSample:(#( 4 ));
  2065                 samplesPerPixel:(1);
  2066                 bits:(ByteArray 
  2067                             fromPackedString:'
  2068 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"H"H"H"H"@BDQDQDQDQH@HQ
  2069 DQDQDQD @!!DQDQDQDR@BDQDQDQDQH@H"H"H"H"H @@@@@@@@@@@b');
  2070                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2071                 mask:((ImageMask new)
  2072                             width:16;
  2073                             height:16;
  2074                             bits:(ByteArray 
  2075                                         fromPackedString:'??>@@X@A @F@@X@A @F@@_????????????????????<b');
  2076                             yourself);
  2077                 yourself
  2078         ]
  2079 !
  2080 
  2081 setBottomLeftQuarterIcon
  2082     <resource: #image>
  2083     "This resource specification was automatically generated
  2084      by the ImageEditor of ST/X."
  2085     "Do not manually edit this!! If it is corrupted,
  2086      the ImageEditor may not be able to read the specification."
  2087     "
  2088      self setBottomLeftQuarterIcon inspect
  2089      ImageEditor openOnClass:self andSelector:#setBottomLeftQuarterIcon
  2090      Icon flushCachedIcons"
  2091     
  2092     ^ Icon 
  2093         constantNamed:'UILayoutTool::LayoutFrame class setBottomLeftQuarterIcon'
  2094         ifAbsentPut:[
  2095             (Depth4Image new)
  2096                 width:16;
  2097                 height:16;
  2098                 photometric:(#palette);
  2099                 bitsPerSample:(#( 4 ));
  2100                 samplesPerPixel:(1);
  2101                 bits:(ByteArray 
  2102                             fromPackedString:'
  2103 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H"H"@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQ
  2104 DR@@@@@@@!!DQH@@@@@@BDQD @@@@@@H"H"@@@@@@@@@@@@@@@@@b');
  2105                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2106                 mask:((ImageMask new)
  2107                             width:16;
  2108                             height:16;
  2109                             bits:(ByteArray 
  2110                                         fromPackedString:'??>@@X@A @F@@X@A @G?@_<A?0G?@_<A?0G?@_<A??<b');
  2111                             yourself);
  2112                 yourself
  2113         ]
  2114 !
  2115 
  2116 setBottomRightQuarterIcon
  2117     <resource: #image>
  2118     "This resource specification was automatically generated
  2119      by the ImageEditor of ST/X."
  2120     "Do not manually edit this!! If it is corrupted,
  2121      the ImageEditor may not be able to read the specification."
  2122     "
  2123      self setBottomRightQuarterIcon inspect
  2124      ImageEditor openOnClass:self andSelector:#setBottomRightQuarterIcon
  2125      Icon flushCachedIcons"
  2126     
  2127     ^ Icon 
  2128         constantNamed:'UILayoutTool::LayoutFrame class setBottomRightQuarterIcon'
  2129         ifAbsentPut:[
  2130             (Depth4Image new)
  2131                 width:16;
  2132                 height:16;
  2133                 photometric:(#palette);
  2134                 bitsPerSample:(#( 4 ));
  2135                 samplesPerPixel:(1);
  2136                 bits:(ByteArray 
  2137                             fromPackedString:'
  2138 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BH"H"@@@@@@HQDQH@@@
  2139 @@@!!DQD @@@@@BDQDR@@@@@@HQDQH@@@@@@"H"H @@@@@@@@@@@b');
  2140                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2141                 mask:((ImageMask new)
  2142                             width:16;
  2143                             height:16;
  2144                             bits:(ByteArray 
  2145                                         fromPackedString:'??>@@X@A @F@@X@A @F@@XG? _>A?8G? _>A?8G???<b');
  2146                             yourself);
  2147                 yourself
  2148         ]
  2149 !
  2150 
  2151 setFullIcon
  2152     <resource: #image>
  2153     "This resource specification was automatically generated
  2154      by the ImageEditor of ST/X."
  2155     "Do not manually edit this!! If it is corrupted,
  2156      the ImageEditor may not be able to read the specification."
  2157     "
  2158      self setFullIcon inspect
  2159      ImageEditor openOnClass:self andSelector:#setFullIcon
  2160      Icon flushCachedIcons"
  2161     
  2162     ^ Icon constantNamed:'UILayoutTool::LayoutFrame class setFullIcon'
  2163         ifAbsentPut:[
  2164             (Depth4Image new)
  2165                 width:16;
  2166                 height:16;
  2167                 photometric:(#palette);
  2168                 bitsPerSample:(#( 4 ));
  2169                 samplesPerPixel:(1);
  2170                 bits:(ByteArray 
  2171                             fromPackedString:'
  2172 @@@@@@@@@@@BH"H"H"H"H@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@HQ
  2173 DQDQDQD @!!DQDQDQDR@BDQDQDQDQH@H"H"H"H"H @@@@@@@@@@@b');
  2174                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2175                 mask:((ImageMask new)
  2176                             width:16;
  2177                             height:16;
  2178                             bits:(ByteArray 
  2179                                         fromPackedString:'??????????????????????????????????????????<b');
  2180                             yourself);
  2181                 yourself
  2182         ]
  2183 !
  2184 
  2185 setHorizontalFixPartIcon
  2186     <resource: #image>
  2187     "This resource specification was automatically generated
  2188      by the ImageEditor of ST/X."
  2189     "Do not manually edit this!! If it is corrupted,
  2190      the ImageEditor may not be able to read the specification."
  2191     "
  2192      self setHorizontalFixPartIcon inspect
  2193      ImageEditor openOnClass:self andSelector:#setHorizontalFixPartIcon
  2194      Icon flushCachedIcons"
  2195     
  2196     ^ Icon 
  2197         constantNamed:'UILayoutTool::LayoutFrame class setHorizontalFixPartIcon'
  2198         ifAbsentPut:[
  2199             (Depth4Image new)
  2200                 width:16;
  2201                 height:16;
  2202                 photometric:(#palette);
  2203                 bitsPerSample:(#( 4 ));
  2204                 samplesPerPixel:(1);
  2205                 bits:(ByteArray 
  2206                             fromPackedString:'
  2207 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"H"H@H"H"@BDQDP@QDQH@HQDQ@ADQD @"H"H@H"H"@@@@@@@@@@@@@@
  2208 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b');
  2209                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2210                 mask:((ImageMask new)
  2211                             width:16;
  2212                             height:16;
  2213                             bits:(ByteArray 
  2214                                         fromPackedString:'??>@@X@A @F@@_???????????????8@A @F@@X@A??<b');
  2215                             yourself);
  2216                 yourself
  2217         ]
  2218 !
  2219 
  2220 setLeftFixPartIcon
  2221     <resource: #image>
  2222     "This resource specification was automatically generated
  2223      by the ImageEditor of ST/X."
  2224     "Do not manually edit this!! If it is corrupted,
  2225      the ImageEditor may not be able to read the specification."
  2226     "
  2227      self setLeftFixPartIcon inspect
  2228      ImageEditor openOnClass:self andSelector:#setLeftFixPartIcon
  2229      Icon flushCachedIcons"
  2230     
  2231     ^ Icon constantNamed:'UILayoutTool::LayoutFrame class setLeftFixPartIcon'
  2232         ifAbsentPut:[
  2233             (Depth4Image new)
  2234                 width:16;
  2235                 height:16;
  2236                 photometric:(#palette);
  2237                 bitsPerSample:(#( 4 ));
  2238                 samplesPerPixel:(1);
  2239                 bits:(ByteArray 
  2240                             fromPackedString:'
  2241 @@@@@@@@@@@BH"@@@@@@@@HQH@@@@@@@@!!D @@@@@@@BDR@@@@@@@@HQH@@@@@@@@!!D @@@@@@@@@@@@@@@@@@@@@@@@@@@@@!!D @@@@@@@BDR@@@@@@@@HQ
  2242 H@@@@@@@@!!D @@@@@@@BDR@@@@@@@@H"H@@@@@@@@@@@@@@@@@@b');
  2243                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2244                 mask:((ImageMask new)
  2245                             width:16;
  2246                             height:16;
  2247                             bits:(ByteArray 
  2248                                         fromPackedString:'???<@_0A?@G<@_0A?@G<@_0A?@G<@_0A?@G<@_0A??<b');
  2249                             yourself);
  2250                 yourself
  2251         ]
  2252 !
  2253 
  2254 setLeftHalfIcon
  2255     <resource: #image>
  2256     "This resource specification was automatically generated
  2257      by the ImageEditor of ST/X."
  2258     "Do not manually edit this!! If it is corrupted,
  2259      the ImageEditor may not be able to read the specification."
  2260     "
  2261      self setLeftHalfIcon inspect
  2262      ImageEditor openOnClass:self andSelector:#setLeftHalfIcon
  2263      Icon flushCachedIcons"
  2264     
  2265     ^ Icon constantNamed:'UILayoutTool::LayoutFrame class setLeftHalfIcon'
  2266         ifAbsentPut:[
  2267             (Depth4Image new)
  2268                 width:16;
  2269                 height:16;
  2270                 photometric:(#palette);
  2271                 bitsPerSample:(#( 4 ));
  2272                 samplesPerPixel:(1);
  2273                 bits:(ByteArray 
  2274                             fromPackedString:'
  2275 @@@@@@@@@@@BH"H @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQ
  2276 DR@@@@@@@!!DQH@@@@@@BDQD @@@@@@H"H"@@@@@@@@@@@@@@@@@b');
  2277                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2278                 mask:((ImageMask new)
  2279                             width:16;
  2280                             height:16;
  2281                             bits:(ByteArray 
  2282                                         fromPackedString:'????@_<A?0G?@_<A?0G?@_<A?0G?@_<A?0G?@_<A??<b');
  2283                             yourself);
  2284                 yourself
  2285         ]
  2286 !
  2287 
  2288 setRightFixPartIcon
  2289     <resource: #image>
  2290     "This resource specification was automatically generated
  2291      by the ImageEditor of ST/X."
  2292     "Do not manually edit this!! If it is corrupted,
  2293      the ImageEditor may not be able to read the specification."
  2294     "
  2295      self setRightFixPartIcon inspect
  2296      ImageEditor openOnClass:self andSelector:#setRightFixPartIcon
  2297      Icon flushCachedIcons"
  2298     
  2299     ^ Icon 
  2300         constantNamed:'UILayoutTool::LayoutFrame class setRightFixPartIcon'
  2301         ifAbsentPut:[
  2302             (Depth4Image new)
  2303                 width:16;
  2304                 height:16;
  2305                 photometric:(#palette);
  2306                 bitsPerSample:(#( 4 ));
  2307                 samplesPerPixel:(1);
  2308                 bits:(ByteArray 
  2309                             fromPackedString:'
  2310 @@@@@@@@@@@@@@@@@@H"H@@@@@@@@!!D @@@@@@@BDR@@@@@@@@HQH@@@@@@@@!!D @@@@@@@BDR@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BDR@@@@@@@@HQH@@@
  2311 @@@@@!!D @@@@@@@BDR@@@@@@@@HQH@@@@@@@@"H @@@@@@@@@@@b');
  2312                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2313                 mask:((ImageMask new)
  2314                             width:16;
  2315                             height:16;
  2316                             bits:(ByteArray 
  2317                                         fromPackedString:'??>@O8@? C>@O8@? C>@O8@? C>@O8@? C>@O8@???<b');
  2318                             yourself);
  2319                 yourself
  2320         ]
  2321 !
  2322 
  2323 setRightHalfIcon
  2324     <resource: #image>
  2325     "This resource specification was automatically generated
  2326      by the ImageEditor of ST/X."
  2327     "Do not manually edit this!! If it is corrupted,
  2328      the ImageEditor may not be able to read the specification."
  2329     "
  2330      self setRightHalfIcon inspect
  2331      ImageEditor openOnClass:self andSelector:#setRightHalfIcon
  2332      Icon flushCachedIcons"
  2333     
  2334     ^ Icon constantNamed:'UILayoutTool::LayoutFrame class setRightHalfIcon'
  2335         ifAbsentPut:[
  2336             (Depth4Image new)
  2337                 width:16;
  2338                 height:16;
  2339                 photometric:(#palette);
  2340                 bitsPerSample:(#( 4 ));
  2341                 samplesPerPixel:(1);
  2342                 bits:(ByteArray 
  2343                             fromPackedString:'
  2344 @@@@@@@@@@@@@@@@@"H"H@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@
  2345 @@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BH"H @@@@@@@@@@@b');
  2346                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2347                 mask:((ImageMask new)
  2348                             width:16;
  2349                             height:16;
  2350                             bits:(ByteArray 
  2351                                         fromPackedString:'??>@?8C? O>@?8C? O>@?8C? O>@?8C? O>@?8C???<b');
  2352                             yourself);
  2353                 yourself
  2354         ]
  2355 !
  2356 
  2357 setToRightQuarterIcon
  2358     <resource: #image>
  2359     "This resource specification was automatically generated
  2360      by the ImageEditor of ST/X."
  2361     "Do not manually edit this!! If it is corrupted,
  2362      the ImageEditor may not be able to read the specification."
  2363     "
  2364      self setToRightQuarterIcon inspect
  2365      ImageEditor openOnClass:self andSelector:#setToRightQuarterIcon
  2366      Icon flushCachedIcons"
  2367     
  2368     ^ Icon 
  2369         constantNamed:'UILayoutTool::LayoutFrame class setToRightQuarterIcon'
  2370         ifAbsentPut:[
  2371             (Depth4Image new)
  2372                 width:16;
  2373                 height:16;
  2374                 photometric:(#palette);
  2375                 bitsPerSample:(#( 4 ));
  2376                 samplesPerPixel:(1);
  2377                 bits:(ByteArray 
  2378                             fromPackedString:'
  2379 @@@@@@@@@@@@@@@@@"H"H@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  2380 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b');
  2381                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2382                 mask:((ImageMask new)
  2383                             width:16;
  2384                             height:16;
  2385                             bits:(ByteArray 
  2386                                         fromPackedString:'??>@?8C? O>@?8C? O>@?8C? @F@@X@A @F@@X@A??<b');
  2387                             yourself);
  2388                 yourself
  2389         ]
  2390 !
  2391 
  2392 setTopFixPartIcon
  2393     <resource: #image>
  2394     "This resource specification was automatically generated
  2395      by the ImageEditor of ST/X."
  2396     "Do not manually edit this!! If it is corrupted,
  2397      the ImageEditor may not be able to read the specification."
  2398     "
  2399      self setTopFixPartIcon inspect
  2400      ImageEditor openOnClass:self andSelector:#setTopFixPartIcon
  2401      Icon flushCachedIcons"
  2402     
  2403     ^ Icon constantNamed:'UILayoutTool::LayoutFrame class setTopFixPartIcon'
  2404         ifAbsentPut:[
  2405             (Depth4Image new)
  2406                 width:16;
  2407                 height:16;
  2408                 photometric:(#palette);
  2409                 bitsPerSample:(#( 4 ));
  2410                 samplesPerPixel:(1);
  2411                 bits:(ByteArray 
  2412                             fromPackedString:'
  2413 @@@@@@@@@@@BH"H @"H"H@HQDQ@ADQD @!!DQD@DQDR@BH"H @"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  2414 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b');
  2415                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2416                 mask:((ImageMask new)
  2417                             width:16;
  2418                             height:16;
  2419                             bits:(ByteArray 
  2420                                         fromPackedString:'???????????????? @F@@X@A @F@@X@A @F@@X@A??<b');
  2421                             yourself);
  2422                 yourself
  2423         ]
  2424 !
  2425 
  2426 setTopHalfIcon
  2427     <resource: #image>
  2428     "This resource specification was automatically generated
  2429      by the ImageEditor of ST/X."
  2430     "Do not manually edit this!! If it is corrupted,
  2431      the ImageEditor may not be able to read the specification."
  2432     "
  2433      self setTopHalfIcon inspect
  2434      ImageEditor openOnClass:self andSelector:#setTopHalfIcon
  2435      Icon flushCachedIcons"
  2436     
  2437     ^ Icon constantNamed:'UILayoutTool::LayoutFrame class setTopHalfIcon'
  2438         ifAbsentPut:[
  2439             (Depth4Image new)
  2440                 width:16;
  2441                 height:16;
  2442                 photometric:(#palette);
  2443                 bitsPerSample:(#( 4 ));
  2444                 samplesPerPixel:(1);
  2445                 bits:(ByteArray 
  2446                             fromPackedString:'
  2447 @@@@@@@@@@@BH"H"H"H"H@HQDQDQDQD @!!DQDQDQDR@BDQDQDQDQH@HQDQDQDQD @"H"H"H"H"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  2448 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b');
  2449                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2450                 mask:((ImageMask new)
  2451                             width:16;
  2452                             height:16;
  2453                             bits:(ByteArray 
  2454                                         fromPackedString:'?????????????????????8@A @F@@X@A @F@@X@A??<b');
  2455                             yourself);
  2456                 yourself
  2457         ]
  2458 !
  2459 
  2460 setTopLeftQuarterIcon
  2461     <resource: #image>
  2462     "This resource specification was automatically generated
  2463      by the ImageEditor of ST/X."
  2464     "Do not manually edit this!! If it is corrupted,
  2465      the ImageEditor may not be able to read the specification."
  2466     "
  2467      self setTopLeftQuarterIcon inspect
  2468      ImageEditor openOnClass:self andSelector:#setTopLeftQuarterIcon
  2469      Icon flushCachedIcons"
  2470     
  2471     ^ Icon 
  2472         constantNamed:'UILayoutTool::LayoutFrame class setTopLeftQuarterIcon'
  2473         ifAbsentPut:[
  2474             (Depth4Image new)
  2475                 width:16;
  2476                 height:16;
  2477                 photometric:(#palette);
  2478                 bitsPerSample:(#( 4 ));
  2479                 samplesPerPixel:(1);
  2480                 bits:(ByteArray 
  2481                             fromPackedString:'
  2482 @@@@@@@@@@@BH"H"@@@@@@HQDQH@@@@@@!!DQD @@@@@BDQDR@@@@@@HQDQH@@@@@@"H"H @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  2483 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b');
  2484                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2485                 mask:((ImageMask new)
  2486                             width:16;
  2487                             height:16;
  2488                             bits:(ByteArray 
  2489                                         fromPackedString:'???? _>A?8G? _>A?8G? X@A @F@@X@A @F@@X@A??<b');
  2490                             yourself);
  2491                 yourself
  2492         ]
  2493 !
  2494 
  2495 setVerticalFixPartIcon
  2496     <resource: #image>
  2497     "This resource specification was automatically generated
  2498      by the ImageEditor of ST/X."
  2499     "Do not manually edit this!! If it is corrupted,
  2500      the ImageEditor may not be able to read the specification."
  2501     "
  2502      self setVerticalFixPartIcon inspect
  2503      ImageEditor openOnClass:self andSelector:#setVerticalFixPartIcon
  2504      Icon flushCachedIcons"
  2505     
  2506     ^ Icon 
  2507         constantNamed:'UILayoutTool::LayoutFrame class setVerticalFixPartIcon'
  2508         ifAbsentPut:[
  2509             (Depth4Image new)
  2510                 width:16;
  2511                 height:16;
  2512                 photometric:(#palette);
  2513                 bitsPerSample:(#( 4 ));
  2514                 samplesPerPixel:(1);
  2515                 bits:(ByteArray 
  2516                             fromPackedString:'
  2517 @@@@@@@@@@@@@@@"H @@@@@@@BDR@@@@@@@@HQH@@@@@@@@!!D @@@@@@@BDR@@@@@@@@HQH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@HQH@@@@@@@@!!D @@@@@@
  2518 @BDR@@@@@@@@HQH@@@@@@@@!!D @@@@@@@BH"@@@@@@@@@@@@@@@b');
  2519                 colorMapFromArray:#[ 0 0 0 255 0 0 255 255 255 ];
  2520                 mask:((ImageMask new)
  2521                             width:16;
  2522                             height:16;
  2523                             bits:(ByteArray 
  2524                                         fromPackedString:'??>G8X_!!!!>FG8X_!!!!>FG8X_!!!!>FG8X_!!!!>FG8X_!!??<b');
  2525                             yourself);
  2526                 yourself
  2527         ]
  2528 ! !
  2529 
  2530 !UILayoutTool::LayoutFrame class methodsFor:'interface specs'!
  2531 
  2532 windowSpec
  2533     "This resource specification was automatically generated
  2534      by the UIPainter of ST/X."
  2535 
  2536     "Do not manually edit this!! If it is corrupted,
  2537      the UIPainter may not be able to read the specification."
  2538 
  2539     "
  2540      UIPainter new openOnClass:UILayoutTool::LayoutFrame andSelector:#windowSpec
  2541      UILayoutTool::LayoutFrame new openInterface:#windowSpec
  2542      UILayoutTool::LayoutFrame open
  2543     "
  2544 
  2545     <resource: #canvas>
  2546 
  2547     ^ 
  2548     #(FullSpec
  2549        name: windowSpec
  2550        window: 
  2551       (WindowSpec
  2552          label: 'UILayoutTool-LayoutFrame'
  2553          name: 'UILayoutTool-LayoutFrame'
  2554          min: (Point 10 10)
  2555          bounds: (Rectangle 0 0 527 393)
  2556        )
  2557        component: 
  2558       (SpecCollection
  2559          collection: (
  2560           (UISubSpecification
  2561              name: 'layoutOriginSpec'
  2562              layout: (LayoutFrame 1 0.0 6 0 0 1.0 112 0)
  2563              majorKey: UILayoutTool
  2564              minorKey: layoutOriginSpec
  2565            )
  2566           (FramedBoxSpec
  2567              label: 'Corner'
  2568              name: 'FramedBox'
  2569              layout: (LayoutFrame 1 0.0 113 0 0 1.0 266 0)
  2570              labelPosition: topLeft
  2571              translateLabel: true
  2572              component: 
  2573             (SpecCollection
  2574                collection: (
  2575                 (LabelSpec
  2576                    label: 'Right:'
  2577                    name: 'labelRight'
  2578                    layout: (AlignmentOrigin 68 0 16 0 1 0)
  2579                    translateLabel: true
  2580                  )
  2581                 (ActionButtonSpec
  2582                    label: 'imageFractX'
  2583                    name: 'actionRelativeRight'
  2584                    layout: (LayoutFrame 78 0 14 0 100 0 36 0)
  2585                    activeHelpKey: makeRightRelative
  2586                    hasCharacterOrientedLabel: false
  2587                    translateLabel: true
  2588                    tabable: true
  2589                    model: relativeRight
  2590                  )
  2591                 (InputFieldSpec
  2592                    name: 'fieldRightFraction'
  2593                    layout: (LayoutFrame 103 0 14 0 153 0 36 0)
  2594                    activeHelpKey: rightRelative
  2595                    tabable: true
  2596                    model: rightFraction
  2597                    group: inputGroup
  2598                    type: numberOrNil
  2599                    acceptOnLostFocus: true
  2600                    acceptChannel: acceptChannel
  2601                    modifiedChannel: modifiedChannel
  2602                    acceptOnPointerLeave: true
  2603                  )
  2604                 (ActionButtonSpec
  2605                    label: 'imageAbsX'
  2606                    name: 'actionAbsoluteRight'
  2607                    layout: (LayoutFrame 178 0 14 0 200 0 36 0)
  2608                    activeHelpKey: makeRightAbsolute
  2609                    hasCharacterOrientedLabel: false
  2610                    translateLabel: true
  2611                    tabable: true
  2612                    model: absoluteRight
  2613                  )
  2614                 (InputFieldSpec
  2615                    name: 'fieldRightOffset'
  2616                    layout: (LayoutFrame 203 0 14 0 253 0 36 0)
  2617                    activeHelpKey: rightAbsolute
  2618                    tabable: true
  2619                    model: rightOffset
  2620                    group: inputGroup
  2621                    type: numberOrNil
  2622                    acceptOnLostFocus: true
  2623                    acceptChannel: acceptChannel
  2624                    modifiedChannel: modifiedChannel
  2625                    acceptOnPointerLeave: true
  2626                  )
  2627                 (ActionButtonSpec
  2628                    label: 'imageAbsXFromRight'
  2629                    name: 'actionRightRelativeRight'
  2630                    layout: (LayoutFrame 257 0 14 0 279 0 36 0)
  2631                    activeHelpKey: makeRightRelativeFromRight
  2632                    hasCharacterOrientedLabel: false
  2633                    translateLabel: true
  2634                    tabable: true
  2635                    model: rightRelativeRight
  2636                  )
  2637                 (LabelSpec
  2638                    label: 'Bottom:'
  2639                    name: 'labelBottom'
  2640                    layout: (AlignmentOrigin 68 0 44 0 1 0)
  2641                    translateLabel: true
  2642                  )
  2643                 (ActionButtonSpec
  2644                    label: 'imageFractY'
  2645                    name: 'actionRelativeBottom'
  2646                    layout: (LayoutFrame 78 0 42 0 100 0 64 0)
  2647                    activeHelpKey: makeBottomRelative
  2648                    hasCharacterOrientedLabel: false
  2649                    translateLabel: true
  2650                    tabable: true
  2651                    model: relativeBottom
  2652                  )
  2653                 (InputFieldSpec
  2654                    name: 'fieldBottomFraction'
  2655                    layout: (LayoutFrame 103 0 42 0 153 0 64 0)
  2656                    activeHelpKey: bottomRelative
  2657                    tabable: true
  2658                    model: bottomFraction
  2659                    group: inputGroup
  2660                    type: numberOrNil
  2661                    acceptOnLostFocus: true
  2662                    acceptChannel: acceptChannel
  2663                    modifiedChannel: modifiedChannel
  2664                    acceptOnPointerLeave: true
  2665                  )
  2666                 (ActionButtonSpec
  2667                    label: 'imageAbsY'
  2668                    name: 'actionAbsoluteBottom'
  2669                    layout: (LayoutFrame 178 0 42 0 200 0 64 0)
  2670                    activeHelpKey: makeBottomAbsolute
  2671                    hasCharacterOrientedLabel: false
  2672                    translateLabel: true
  2673                    tabable: true
  2674                    model: absoluteBottom
  2675                  )
  2676                 (InputFieldSpec
  2677                    name: 'fieldBottomOffset'
  2678                    layout: (LayoutFrame 203 0 42 0 253 0 64 0)
  2679                    activeHelpKey: bottomAbsolute
  2680                    tabable: true
  2681                    model: bottomOffset
  2682                    group: inputGroup
  2683                    type: numberOrNil
  2684                    acceptOnLostFocus: true
  2685                    acceptChannel: acceptChannel
  2686                    modifiedChannel: modifiedChannel
  2687                    acceptOnPointerLeave: true
  2688                  )
  2689                 (ActionButtonSpec
  2690                    label: 'imageAbsYFromBottom'
  2691                    name: 'actionBottomRelativeBottom'
  2692                    layout: (LayoutFrame 257 0 42 0 279 0 64 0)
  2693                    activeHelpKey: makeBottomRelativeFromBottom
  2694                    hasCharacterOrientedLabel: false
  2695                    translateLabel: true
  2696                    tabable: true
  2697                    model: bottomRelativeBottom
  2698                  )
  2699                 (CheckBoxSpec
  2700                    label: 'Preferred'
  2701                    name: 'CheckBox1'
  2702                    layout: (LayoutFrame 287 0 14 0 393 0 36 0)
  2703                    activeHelpKey: usePreferredWidth
  2704                    model: usePreferredWidth
  2705                    translateLabel: true
  2706                  )
  2707                 (CheckBoxSpec
  2708                    label: 'Dynamic'
  2709                    name: 'CheckBox3'
  2710                    layout: (LayoutFrame 394 0 14 0 481 0 36 0)
  2711                    activeHelpKey: useDynamicPreferredWidth
  2712                    model: useDynamicPreferredWidth
  2713                    translateLabel: true
  2714                  )
  2715                 (CheckBoxSpec
  2716                    label: 'Preferred'
  2717                    name: 'CheckBox2'
  2718                    layout: (LayoutFrame 287 0 40 0 393 0 62 0)
  2719                    activeHelpKey: usePreferredHeight
  2720                    model: usePreferredHeight
  2721                    translateLabel: true
  2722                  )
  2723                 (CheckBoxSpec
  2724                    label: 'Dynamic'
  2725                    name: 'CheckBox4'
  2726                    layout: (LayoutFrame 394 0 40 0 481 0 62 0)
  2727                    activeHelpKey: useDynamicPreferredWidth
  2728                    model: useDynamicPreferredHeight
  2729                    translateLabel: true
  2730                  )
  2731                 (CheckBoxSpec
  2732                    label: 'OSX-ResizeH'
  2733                    name: 'OSXResizeH Checkbox'
  2734                    layout: (LayoutFrame 287 0 70 0 480 0 92 0)
  2735                    activeHelpKey: keepSpaceForOSXResizeHandleH
  2736                    model: keepSpaceForOSXResizeHandleH
  2737                    translateLabel: true
  2738                  )
  2739                 (CheckBoxSpec
  2740                    label: 'OSX-ResizeV'
  2741                    name: 'OSXResizeV Checkbox'
  2742                    layout: (LayoutFrame 287 0 96 0 480 0 118 0)
  2743                    activeHelpKey: keepSpaceForOSXResizeHandleV
  2744                    model: keepSpaceForOSXResizeHandleV
  2745                    translateLabel: true
  2746                  )
  2747                 )
  2748               
  2749              )
  2750            )
  2751           (MenuPanelSpec
  2752              name: 'commonLayoutToolBar1'
  2753              layout: (LayoutFrame 6 0.0 267 0 -4 1.0 299 0)
  2754              level: 0
  2755              tabable: true
  2756              menu: commonFrameLayoutsMenu1
  2757              textDefault: true
  2758            )
  2759           (MenuPanelSpec
  2760              name: 'commonLayoutToolBar2'
  2761              layout: (LayoutFrame 6 0.0 299 0 -4 1.0 331 0)
  2762              level: 0
  2763              tabable: true
  2764              menu: commonFrameLayoutsMenu2
  2765              textDefault: true
  2766            )
  2767           (MenuPanelSpec
  2768              name: 'commonLayoutToolBar3'
  2769              layout: (LayoutFrame 6 0.0 323 0 -4 1.0 355 0)
  2770              level: 0
  2771              tabable: true
  2772              menu: commonFrameLayoutsMenu3
  2773              textDefault: true
  2774            )
  2775           )
  2776         
  2777        )
  2778      )
  2779 ! !
  2780 
  2781 !UILayoutTool::LayoutFrame class methodsFor:'menu specs'!
  2782 
  2783 commonFrameLayoutsMenu1
  2784     "This resource specification was automatically generated
  2785      by the MenuEditor of ST/X."
  2786 
  2787     "Do not manually edit this!! If it is corrupted,
  2788      the MenuEditor may not be able to read the specification."
  2789 
  2790     "
  2791      MenuEditor new openOnClass:UILayoutTool::LayoutFrame andSelector:#commonFrameLayoutsMenu1
  2792      (Menu new fromLiteralArrayEncoding:(UILayoutTool::LayoutFrame commonFrameLayoutsMenu1)) startUp
  2793     "
  2794 
  2795     <resource: #menu>
  2796 
  2797     ^ 
  2798      #(#Menu
  2799         #(
  2800          #(#MenuItem
  2801             #activeHelpKey: #fullLayout
  2802             #label: 'setFullFrame'
  2803             #itemValue: #setFullFrame
  2804             #nameKey: #setFullFrame
  2805             #translateLabel: true
  2806             #isButton: true
  2807             #labelImage: #(#ResourceRetriever #'UILayoutTool::LayoutFrame' #setFullIcon)
  2808           )
  2809          #(#MenuItem
  2810             #label: ''
  2811           )
  2812          #(#MenuItem
  2813             #activeHelpKey: #topHalfLayout
  2814             #label: 'setTopHalfFrame'
  2815             #itemValue: #setTopHalfFrame
  2816             #nameKey: #setTopHalfFrame
  2817             #translateLabel: true
  2818             #isButton: true
  2819             #labelImage: #(#ResourceRetriever #'UILayoutTool::LayoutFrame' #setTopHalfIcon)
  2820           )
  2821          #(#MenuItem
  2822             #activeHelpKey: #bottomHalfLayout
  2823             #label: 'setBottomHalfFrame'
  2824             #itemValue: #setBottomHalfFrame
  2825             #nameKey: #setBottomHalfFrame
  2826             #translateLabel: true
  2827             #isButton: true
  2828             #labelImage: #(#ResourceRetriever nil #setBottomHalfIcon)
  2829           )
  2830          #(#MenuItem
  2831             #activeHelpKey: #leftHalfLayout
  2832             #label: 'setLeftHalfFrame'
  2833             #itemValue: #setLeftHalfFrame
  2834             #nameKey: #setLeftHalfFrame
  2835             #translateLabel: true
  2836             #isButton: true
  2837             #labelImage: #(#ResourceRetriever nil #setLeftHalfIcon)
  2838           )
  2839          #(#MenuItem
  2840             #activeHelpKey: #rightHalfLayout
  2841             #label: 'setRightHalfFrame'
  2842             #itemValue: #setRightHalfFrame
  2843             #nameKey: #setRightHalfFrame
  2844             #translateLabel: true
  2845             #isButton: true
  2846             #labelImage: #(#ResourceRetriever nil #setRightHalfIcon)
  2847           )
  2848          #(#MenuItem
  2849             #label: ''
  2850           )
  2851          #(#MenuItem
  2852             #activeHelpKey: #topLeftQuarterLayout
  2853             #label: 'setTopLeftQuarterFrame'
  2854             #itemValue: #setTopLeftQuarterFrame
  2855             #nameKey: #setTopLeftQuarterFrame
  2856             #translateLabel: true
  2857             #isButton: true
  2858             #labelImage: #(#ResourceRetriever nil #setTopLeftQuarterIcon)
  2859           )
  2860          #(#MenuItem
  2861             #activeHelpKey: #topRightQuarterLayout
  2862             #label: 'setTopRightQuarterFrame'
  2863             #itemValue: #setTopRightQuarterFrame
  2864             #nameKey: #setTopRightQuarterFrame
  2865             #translateLabel: true
  2866             #isButton: true
  2867             #labelImage: #(#ResourceRetriever nil #setToRightQuarterIcon)
  2868           )
  2869          #(#MenuItem
  2870             #activeHelpKey: #bottomRightQuarterLayout
  2871             #label: 'setBottomRightQuarterFrame'
  2872             #itemValue: #setBottomRightQuarterFrame
  2873             #nameKey: #setBottomRightQuarterFrame
  2874             #translateLabel: true
  2875             #isButton: true
  2876             #labelImage: #(#ResourceRetriever nil #setBottomRightQuarterIcon)
  2877           )
  2878          #(#MenuItem
  2879             #activeHelpKey: #bottomLeftQuarterLayout
  2880             #label: 'setBottomLeftQuarterFrame'
  2881             #itemValue: #setBottomLeftQuarterFrame
  2882             #nameKey: #setBottomLeftQuarterFrame
  2883             #translateLabel: true
  2884             #isButton: true
  2885             #labelImage: #(#ResourceRetriever nil #setBottomLeftQuarterIcon)
  2886           )
  2887          )
  2888         nil
  2889         nil
  2890       )
  2891 !
  2892 
  2893 commonFrameLayoutsMenu2
  2894     "This resource specification was automatically generated
  2895      by the MenuEditor of ST/X."
  2896 
  2897     "Do not manually edit this!! If it is corrupted,
  2898      the MenuEditor may not be able to read the specification."
  2899 
  2900     "
  2901      MenuEditor new openOnClass:UILayoutTool::LayoutFrame andSelector:#commonFrameLayoutsMenu2
  2902      (Menu new fromLiteralArrayEncoding:(UILayoutTool::LayoutFrame commonFrameLayoutsMenu2)) startUp
  2903     "
  2904 
  2905     <resource: #menu>
  2906 
  2907     ^ 
  2908      #(#Menu
  2909         #(
  2910          #(#MenuItem
  2911             #activeHelpKey: #topFixPartLayout
  2912             #label: 'setTopFixPartFrame'
  2913             #itemValue: #setTopFixPartFrame
  2914             #nameKey: #setTopFixPartFrame
  2915             #translateLabel: true
  2916             #isButton: true
  2917             #labelImage: #(#ResourceRetriever nil #setTopFixPartIcon)
  2918           )
  2919          #(#MenuItem
  2920             #activeHelpKey: #horizontalFixPartLayout
  2921             #label: 'setHorizontalFixPartFrame'
  2922             #itemValue: #setHorizontalFixPartFrame
  2923             #nameKey: #setHorizontalFixPartFrame
  2924             #translateLabel: true
  2925             #isButton: true
  2926             #labelImage: #(#ResourceRetriever nil #setHorizontalFixPartIcon)
  2927           )
  2928          #(#MenuItem
  2929             #activeHelpKey: #bottomFixPartLayout
  2930             #label: 'setBottomFixPartFrame'
  2931             #itemValue: #setBottomFixPartFrame
  2932             #nameKey: #setBottomFixPartFrame
  2933             #translateLabel: true
  2934             #isButton: true
  2935             #labelImage: #(#ResourceRetriever nil #setBottomFixPartIcon)
  2936           )
  2937          #(#MenuItem
  2938             #label: ''
  2939           )
  2940          #(#MenuItem
  2941             #activeHelpKey: #leftFixPartLayout
  2942             #label: 'setLeftFixPartFrame'
  2943             #itemValue: #setLeftFixPartFrame
  2944             #nameKey: #setLeftFixPartFrame
  2945             #translateLabel: true
  2946             #isButton: true
  2947             #labelImage: #(#ResourceRetriever nil #setLeftFixPartIcon)
  2948           )
  2949          #(#MenuItem
  2950             #activeHelpKey: #verticalFixPartLayout
  2951             #label: 'setVerticalFixPartFrame'
  2952             #itemValue: #setVerticalFixPartFrame
  2953             #nameKey: #setVerticalFixPartFrame
  2954             #translateLabel: true
  2955             #isButton: true
  2956             #labelImage: #(#ResourceRetriever nil #setVerticalFixPartIcon)
  2957           )
  2958          #(#MenuItem
  2959             #activeHelpKey: #rightFixPartLayout
  2960             #label: 'setRightFixPartFrame'
  2961             #itemValue: #setRightFixPartFrame
  2962             #nameKey: #setRightFixPartFrame
  2963             #translateLabel: true
  2964             #isButton: true
  2965             #labelImage: #(#ResourceRetriever nil #setRightFixPartIcon)
  2966           )
  2967          #(#MenuItem
  2968             #label: ''
  2969           )
  2970          #(#MenuItem
  2971             #activeHelpKey: #bigTopFixPartLayout
  2972             #label: 'setBigTopFixPartFrame'
  2973             #itemValue: #setBigTopFixPartFrame
  2974             #nameKey: #setBigTopFixPartFrame
  2975             #translateLabel: true
  2976             #isButton: true
  2977             #labelImage: #(#ResourceRetriever nil #setBigTopFixPartIcon)
  2978           )
  2979          #(#MenuItem
  2980             #activeHelpKey: #bigHorizontalFixPartLayout
  2981             #label: 'setBigHorizontalFixPartFrame'
  2982             #itemValue: #setBigHorizontalFixPartFrame
  2983             #nameKey: #setBigHorizontalFixPartFrame
  2984             #translateLabel: true
  2985             #isButton: true
  2986             #labelImage: #(#ResourceRetriever nil #setBigHorizontalFixPartIcon)
  2987           )
  2988          #(#MenuItem
  2989             #activeHelpKey: #bigBottomFixPartLayout
  2990             #label: 'setBigBottomFixPartFrame'
  2991             #itemValue: #setBigBottomFixPartFrame
  2992             #nameKey: #setBigBottomFixPartFrame
  2993             #translateLabel: true
  2994             #isButton: true
  2995             #labelImage: #(#ResourceRetriever nil #setBigBottomFixPartIcon)
  2996           )
  2997          )
  2998         nil
  2999         nil
  3000       )
  3001 !
  3002 
  3003 commonFrameLayoutsMenu3
  3004     "This resource specification was automatically generated
  3005      by the MenuEditor of ST/X."
  3006 
  3007     "Do not manually edit this!! If it is corrupted,
  3008      the MenuEditor may not be able to read the specification."
  3009 
  3010     "
  3011      MenuEditor new openOnClass:UILayoutTool::LayoutFrame andSelector:#commonFrameLayoutsMenu3
  3012      (Menu new fromLiteralArrayEncoding:(UILayoutTool::LayoutFrame commonFrameLayoutsMenu3)) startUp
  3013     "
  3014 
  3015     <resource: #menu>
  3016 
  3017     ^ 
  3018      #(Menu
  3019         (
  3020          (MenuItem
  3021             activeHelpKey: screenFrameLayout
  3022             label: 'setScreenFrame'
  3023             itemValue: setScreenFrame
  3024             nameKey: setScreenFrame
  3025             translateLabel: true
  3026             isButton: true
  3027             isVisible: false
  3028             labelImage: (ResourceRetriever #'UILayoutTool::LayoutFrame' setScreenIcon)
  3029           )
  3030          )
  3031         nil
  3032         nil
  3033       )
  3034 ! !
  3035 
  3036 !UILayoutTool::LayoutFrame methodsFor:'accessing'!
  3037 
  3038 fetch:aView spec:aSpec
  3039     |layout|
  3040 
  3041     aSpec class == WindowSpec ifTrue:[
  3042          (layout := aSpec layout) isNil ifTrue:[
  3043              layout := aSpec bounds asLayout.
  3044          ] 
  3045     ] ifFalse: [
  3046          layout  := UIPainterView asLayoutFrameFromView:aView.
  3047     ].
  3048     (self aspectFor:#leftOffset)     value:(layout leftOffset).
  3049     (self aspectFor:#leftFraction)   value:(layout leftFraction).
  3050     (self aspectFor:#topOffset)      value:(layout topOffset).
  3051     (self aspectFor:#topFraction)    value:(layout topFraction).
  3052     (self aspectFor:#rightOffset)    value:(layout rightOffset value).  "take care of blocks"
  3053     (self aspectFor:#bottomOffset)   value:(layout bottomOffset value). "take care of blocks"
  3054     (self aspectFor:#rightFraction)  value:(layout rightFraction).
  3055     (self aspectFor:#bottomFraction) value:(layout bottomFraction).
  3056 
  3057     (self aspectFor:#usePreferredWidth) value:(aSpec usePreferredWidth).
  3058     (self aspectFor:#usePreferredHeight) value:(aSpec usePreferredHeight).
  3059     (self aspectFor:#useDynamicPreferredWidth) value:(aSpec useDynamicPreferredWidth).
  3060     (self aspectFor:#useDynamicPreferredHeight) value:(aSpec useDynamicPreferredHeight).
  3061 
  3062     (self aspectFor:#keepSpaceForOSXResizeHandleV) value:(aSpec keepSpaceForOSXResizeHandleV).
  3063     (self aspectFor:#keepSpaceForOSXResizeHandleH) value:(aSpec keepSpaceForOSXResizeHandleH).
  3064 !
  3065 
  3066 layout
  3067     "returns the current layout as layoutFrame
  3068     "
  3069     |layout|
  3070 
  3071     layout  := (Smalltalk at:#LayoutFrame) new.
  3072 
  3073     layout 
  3074         leftFraction:(self aspectValueOr0For:#leftFraction)
  3075             offset:(self aspectValueOr0For:#leftOffset)
  3076         rightFraction:(self aspectValueOr0For:#rightFraction)
  3077             offset:(self aspectValueOr0For:#rightOffset)
  3078         topFraction:(self aspectValueOr0For:#topFraction)
  3079             offset:(self aspectValueOr0For:#topOffset)
  3080         bottomFraction:(self aspectValueOr0For:#bottomFraction)
  3081             offset:(self aspectValueOr0For:#bottomOffset).
  3082 
  3083   ^ layout
  3084 ! !
  3085 
  3086 !UILayoutTool::LayoutFrame methodsFor:'common frames'!
  3087 
  3088 setBigBottomFixPartFrame
  3089     self
  3090         setFrameLeft:0   offset:0 
  3091         right:1          offset:0 
  3092         top:0            offset:(self class defaultFixPartHeight) 
  3093         bottom:1         offset:0
  3094 !
  3095 
  3096 setBigHorizontalFixPartFrame
  3097     self
  3098         setFrameLeft:0   offset:0 
  3099         right:1          offset:0 
  3100         top:0            offset:(self class defaultFixPartHeight) 
  3101         bottom:1         offset:(self class defaultFixPartHeight negated)
  3102 !
  3103 
  3104 setBigTopFixPartFrame
  3105     self
  3106         setFrameLeft:0   offset:0 
  3107         right:1          offset:0 
  3108         top:0            offset:0 
  3109         bottom:1         offset:(self class defaultFixPartHeight negated)
  3110 !
  3111 
  3112 setBottomFixPartFrame
  3113     self
  3114         setFrameLeft:0   offset:0 
  3115         right:1          offset:0 
  3116         top:1            offset:(self class defaultFixPartHeight negated) 
  3117         bottom:1         offset:0
  3118 !
  3119 
  3120 setBottomHalfFrame
  3121     self
  3122         setFrameLeft:0  offset:0 
  3123         right:1         offset:0 
  3124         top:0.5         offset:0 
  3125         bottom:1        offset:0
  3126 !
  3127 
  3128 setBottomLeftQuarterFrame
  3129     self
  3130         setFrameLeft:0   offset:0 
  3131         right:0.5        offset:0 
  3132         top:0.5          offset:0 
  3133         bottom:1         offset:0
  3134 !
  3135 
  3136 setBottomRightQuarterFrame
  3137     self
  3138         setFrameLeft:0.5 offset:0 
  3139         right:1          offset:0 
  3140         top:0.5          offset:0 
  3141         bottom:1         offset:0
  3142 !
  3143 
  3144 setFrameLeft:lF offset:lO right:rF offset:rO top:tF offset:tO bottom:bF offset:bO
  3145     (self aspectFor:#leftOffset)     value:lO.
  3146     (self aspectFor:#rightOffset)    value:rO value.
  3147     (self aspectFor:#topOffset)      value:tO.
  3148     (self aspectFor:#bottomOffset)   value:bO value.
  3149 
  3150     (self aspectFor:#leftFraction)   value:lF.
  3151     (self aspectFor:#rightFraction)  value:rF.
  3152     (self aspectFor:#topFraction)    value:tF.
  3153     (self aspectFor:#bottomFraction) value:bF.
  3154 !
  3155 
  3156 setFullFrame
  3157     self
  3158         setFrameLeft:0   offset:0 
  3159         right:1          offset:0 
  3160         top:0            offset:0 
  3161         bottom:1         offset:0
  3162 !
  3163 
  3164 setHorizontalFixPartFrame
  3165     self
  3166         setFrameLeft:0   offset:0 
  3167         right:1          offset:0 
  3168         top:0.5          offset:(self class defaultFixPartHeight negated // 2) 
  3169         bottom:0.5       offset:(self class defaultFixPartHeight // 2)
  3170 !
  3171 
  3172 setLeftFixPartFrame
  3173     self
  3174         setFrameLeft:0   offset:0 
  3175         right:0          offset:(self class defaultFixPartHeight) 
  3176         top:0            offset:0 
  3177         bottom:1         offset:0
  3178 !
  3179 
  3180 setLeftHalfFrame
  3181     self
  3182         setFrameLeft:0  offset:0 
  3183         right:0.5       offset:0 
  3184         top:0           offset:0 
  3185         bottom:1        offset:0
  3186 !
  3187 
  3188 setRightFixPartFrame
  3189     self
  3190         setFrameLeft:1   offset:(self class defaultFixPartHeight negated) 
  3191         right:1          offset:0 
  3192         top:0            offset:0 
  3193         bottom:1         offset:0
  3194 !
  3195 
  3196 setRightHalfFrame
  3197     self
  3198         setFrameLeft:0.5 offset:0 
  3199         right:1          offset:0 
  3200         top:0            offset:0 
  3201         bottom:1         offset:0
  3202 !
  3203 
  3204 setTopFixPartFrame
  3205     self
  3206         setFrameLeft:0   offset:0 
  3207         right:1          offset:0 
  3208         top:0            offset:0 
  3209         bottom:0         offset:(self class defaultFixPartHeight)
  3210 !
  3211 
  3212 setTopHalfFrame
  3213     self
  3214         setFrameLeft:0   offset:0 
  3215         right:1          offset:0 
  3216         top:0            offset:0 
  3217         bottom:0.5       offset:0
  3218 !
  3219 
  3220 setTopLeftQuarterFrame
  3221     self
  3222         setFrameLeft:0   offset:0 
  3223         right:0.5        offset:0 
  3224         top:0            offset:0 
  3225         bottom:0.5       offset:0
  3226 !
  3227 
  3228 setTopRightQuarterFrame
  3229     self
  3230         setFrameLeft:0.5 offset:0 
  3231         right:1          offset:0 
  3232         top:0            offset:0 
  3233         bottom:0.5       offset:0
  3234 !
  3235 
  3236 setVerticalFixPartFrame
  3237     self
  3238         setFrameLeft:0.5   offset:(self class defaultFixPartHeight negated // 2 )
  3239         right:0.5          offset:(self class defaultFixPartHeight // 2 ) 
  3240         top:0          offset:0 
  3241         bottom:1       offset:0
  3242 ! !
  3243 
  3244 !UILayoutTool::LayoutOrigin class methodsFor:'interface specs'!
  3245 
  3246 windowSpec
  3247     "This resource specification was automatically generated
  3248      by the UIPainter of ST/X."
  3249 
  3250     "Do not manually edit this!! If it is corrupted,
  3251      the UIPainter may not be able to read the specification."
  3252 
  3253     "
  3254      UIPainter new openOnClass:UILayoutTool::LayoutOrigin andSelector:#windowSpec
  3255      UILayoutTool::LayoutOrigin new openInterface:#windowSpec
  3256      UILayoutTool::LayoutOrigin open
  3257     "
  3258 
  3259     <resource: #canvas>
  3260 
  3261     ^ 
  3262      #(FullSpec
  3263         name: windowSpec
  3264         window: 
  3265        (WindowSpec
  3266           label: 'UILayoutTool-LayoutOrigin'
  3267           name: 'UILayoutTool-LayoutOrigin'
  3268           min: (Point 10 10)
  3269           bounds: (Rectangle 14 46 372 192)
  3270         )
  3271         component: 
  3272        (SpecCollection
  3273           collection: (
  3274            (UISubSpecification
  3275               name: 'layoutOriginSpec'
  3276               layout: (LayoutFrame 1 0.0 6 0 0 1.0 110 0)
  3277               majorKey: UILayoutTool
  3278               minorKey: layoutOriginSpec
  3279             )
  3280            )
  3281          
  3282         )
  3283       )
  3284 ! !
  3285 
  3286 !UILayoutTool::LayoutOrigin methodsFor:'accessing'!
  3287 
  3288 fetch:aView spec:aSpec
  3289     "fetch layoutOrigin
  3290     "
  3291     |layout|
  3292 
  3293     layout  := UIPainterView asLayoutFrameFromView:aView.
  3294 
  3295     (self aspectFor:#leftOffset)   value:(layout leftOffset).
  3296     (self aspectFor:#leftFraction) value:(layout leftFraction).
  3297     (self aspectFor:#topOffset)    value:(layout topOffset).
  3298     (self aspectFor:#topFraction)  value:(layout topFraction).
  3299 
  3300 
  3301 !
  3302 
  3303 layout
  3304     "returns current layout as layoutOrigin
  3305     "
  3306     |layout|
  3307 
  3308     layout  := (Smalltalk at:#LayoutOrigin) new.
  3309 
  3310     layout 
  3311         leftFraction:(self aspectValueOr0For:#leftFraction)
  3312             offset:(self aspectValueOr0For:#leftOffset)
  3313         topFraction:(self aspectValueOr0For:#topFraction)
  3314             offset:(self aspectValueOr0For:#topOffset).
  3315 
  3316   ^ layout
  3317 ! !
  3318 
  3319 !UILayoutTool::Point class methodsFor:'interface specs'!
  3320 
  3321 windowSpec
  3322     "This resource specification was automatically generated
  3323      by the UIPainter of ST/X."
  3324 
  3325     "Do not manually edit this!! If it is corrupted,
  3326      the UIPainter may not be able to read the specification."
  3327 
  3328     "
  3329      UIPainter new openOnClass:UILayoutTool::Point andSelector:#windowSpec
  3330      UILayoutTool::Point new openInterface:#windowSpec
  3331      UILayoutTool::Point open
  3332     "
  3333 
  3334     <resource: #canvas>
  3335 
  3336     ^ 
  3337      #(FullSpec
  3338         name: windowSpec
  3339         window: 
  3340        (WindowSpec
  3341           label: 'UILayoutTool-Point'
  3342           name: 'UILayoutTool-Point'
  3343           min: (Point 10 10)
  3344           bounds: (Rectangle 14 46 309 184)
  3345         )
  3346         component: 
  3347        (SpecCollection
  3348           collection: (
  3349            (UISubSpecification
  3350               name: 'layoutPointSpec'
  3351               layout: (LayoutFrame 1 0.0 6 0 0 1.0 100 0)
  3352               majorKey: UILayoutTool
  3353               minorKey: layoutPointSpec
  3354             )
  3355            )
  3356          
  3357         )
  3358       )
  3359 ! !
  3360 
  3361 !UILayoutTool::Point methodsFor:'accessing'!
  3362 
  3363 fetch:aView spec:aSpec
  3364     "fetch point
  3365     "
  3366     |origin|
  3367 
  3368     origin  := aView computeOrigin.
  3369 
  3370     (self aspectFor:#leftOffset) value:(origin x).
  3371     (self aspectFor:#topOffset)  value:(origin y).
  3372 
  3373 
  3374 !
  3375 
  3376 layout
  3377     "returns current layout as point
  3378     "
  3379   ^ (self aspectValueOr0For:#leftOffset) @ (self aspectValueOr0For:#topOffset)
  3380 ! !
  3381 
  3382 !UILayoutTool::Rectangle class methodsFor:'interface specs'!
  3383 
  3384 windowSpec
  3385     "This resource specification was automatically generated
  3386      by the UIPainter of ST/X."
  3387 
  3388     "Do not manually edit this!! If it is corrupted,
  3389      the UIPainter may not be able to read the specification."
  3390 
  3391     "
  3392      UIPainter new openOnClass:UILayoutTool::Rectangle andSelector:#windowSpec
  3393      UILayoutTool::Rectangle new openInterface:#windowSpec
  3394      UILayoutTool::Rectangle open
  3395     "
  3396 
  3397     <resource: #canvas>
  3398 
  3399     ^ 
  3400     #(FullSpec
  3401        name: windowSpec
  3402        window: 
  3403       (WindowSpec
  3404          label: 'UILayoutTool-Rectangle'
  3405          name: 'UILayoutTool-Rectangle'
  3406          min: (Point 10 10)
  3407          bounds: (Rectangle 0 0 342 199)
  3408        )
  3409        component: 
  3410       (SpecCollection
  3411          collection: (
  3412           (UISubSpecification
  3413              name: 'subSpecification'
  3414              layout: (LayoutFrame 1 0.0 6 0 0 1.0 96 0)
  3415              majorKey: UILayoutTool
  3416              minorKey: layoutPointSpec
  3417            )
  3418           (FramedBoxSpec
  3419              label: 'Corner'
  3420              name: 'FramedBox'
  3421              layout: (LayoutFrame 1 0.0 99 0 0 1.0 194 0)
  3422              labelPosition: topLeft
  3423              translateLabel: true
  3424              component: 
  3425             (SpecCollection
  3426                collection: (
  3427                 (LabelSpec
  3428                    label: 'Right:'
  3429                    name: 'labelCornerY'
  3430                    layout: (AlignmentOrigin 83 0 12 0 1 0)
  3431                    translateLabel: true
  3432                    adjust: left
  3433                  )
  3434                 (InputFieldSpec
  3435                    name: 'fieldCornerX'
  3436                    layout: (LayoutFrame 85 0 9 0 135 0 31 0)
  3437                    activeHelpKey: cornerX
  3438                    tabable: true
  3439                    model: rightOffset
  3440                    group: inputGroup
  3441                    type: numberOrNil
  3442                    acceptOnLostFocus: true
  3443                    acceptChannel: acceptChannel
  3444                    modifiedChannel: modifiedChannel
  3445                    acceptOnPointerLeave: true
  3446                  )
  3447                 (LabelSpec
  3448                    label: 'Bottom:'
  3449                    name: 'labelCornerX'
  3450                    layout: (AlignmentOrigin 83 0 37 0 1 0)
  3451                    translateLabel: true
  3452                    adjust: left
  3453                  )
  3454                 (InputFieldSpec
  3455                    name: 'fieldCornerY'
  3456                    layout: (LayoutFrame 85 0 34 0 135 0 56 0)
  3457                    activeHelpKey: cornerY
  3458                    tabable: true
  3459                    model: bottomOffset
  3460                    group: inputGroup
  3461                    type: numberOrNil
  3462                    acceptOnLostFocus: true
  3463                    acceptChannel: acceptChannel
  3464                    modifiedChannel: modifiedChannel
  3465                    acceptOnPointerLeave: true
  3466                  )
  3467                 )
  3468               
  3469              )
  3470            )
  3471           )
  3472         
  3473        )
  3474      )
  3475 ! !
  3476 
  3477 !UILayoutTool::Rectangle methodsFor:'accessing'!
  3478 
  3479 fetch:aView spec:aSpec
  3480     "fetch rectangle
  3481     "
  3482     |origin corner|
  3483 
  3484     origin := aView computeOrigin.
  3485     corner := aView computeCorner.
  3486 
  3487     (self aspectFor:#leftOffset)   value:(origin x).
  3488     (self aspectFor:#rightOffset)  value:(corner x).
  3489     (self aspectFor:#topOffset)    value:(origin y).
  3490     (self aspectFor:#bottomOffset) value:(corner y).
  3491 
  3492 
  3493 !
  3494 
  3495 layout
  3496     "returns current layout as rectangle"
  3497 
  3498     ^ (Smalltalk at:#Rectangle) 
  3499         left:(self aspectValueOr0For:#leftOffset)
  3500         top:(self aspectValueOr0For:#topOffset)
  3501         right:(self aspectValueOr0For:#rightOffset)
  3502         bottom:(self aspectValueOr0For:#bottomOffset)
  3503 ! !
  3504 
  3505 !UILayoutTool class methodsFor:'documentation'!
  3506 
  3507 version
  3508     ^ '$Header$'
  3509 !
  3510 
  3511 version_CVS
  3512     ^ '$Header$'
  3513 ! !
  3514