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