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