UIPropertyView.st
author ca
Mon, 03 Mar 1997 11:08:15 +0100
changeset 77 0d3cc25662d6
parent 74 dfa8644e0287
child 78 a0a00603a8b6
permissions -rw-r--r--
super initialize removed in openInterface()

ApplicationModel subclass:#UIPropertyView
	instanceVariableNames:'builderView modified currentView shownSpec propertyAspects
		layoutAspects layoutType specBeingEdited specChannel
		propertySelection'
	classVariableNames:''
	poolDictionaries:''
	category:'Interface-UIPainter'
!


!UIPropertyView class methodsFor:'instance creation'!

in:aTopView builder:aBuilderView
    |application|

    application := self new.
    application in:aTopView builder:aBuilderView.
  ^ application
! !

!UIPropertyView class methodsFor:'constants'!

titleOfLayoutMenu
    ^ 'Dimension'
! !

!UIPropertyView class methodsFor:'interface specs'!

specificationAlignmentOrigin
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

    "
     UIPainter new openOnClass:UIPropertyView andSelector:#specificationAlignmentOrigin
     UIPropertyView new openInterface:#specificationAlignmentOrigin
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'name:' 'uIPainterView'
          #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
          #'window:' 
           #(#WindowSpec
              #'name:' 'uIPainterView'
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
              #'label:' 'unnamed'
              #'bounds:' #(#Rectangle 0 0 356 379)
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#LabelSpec
                    #'name:' 'label9'
                    #'layout:' #(#AlignmentOrigin 76 0 7 0 1 0)
                    #'label:' 'Layout:'
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#PopUpListSpec
                    #'name:' 'popUpList1'
                    #'layout:' #(#LayoutFrame 79 0.0 7 0 -6 1.0 30 0)
                    #'label:' 'popup'
                    #'initiallyInvisible:' false
                    #'model:' #layoutType
                    #'menu:' #layoutTypeList
                )
                 #(#LabelSpec
                    #'name:' 'label2'
                    #'layout:' #(#AlignmentOrigin 49 0 103 0 1 0)
                    #'label:' 'top'
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #right
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label3'
                    #'layout:' #(#Point 58 48)
                    #'label:' 'relative'
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label4'
                    #'layout:' #(#Point 154 49)
                    #'label:' 'offset'
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label5'
                    #'layout:' #(#AlignmentOrigin 63 0 175 0 1 0)
                    #'label:' 'align H'
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #right
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label6'
                    #'layout:' #(#AlignmentOrigin 63 0 201 0 1 0)
                    #'label:' 'align V'
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #right
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#InputFieldSpec
                    #'name:' 'editField1'
                    #'layout:' #(#LayoutFrame 58 0 76 0 115 0 94 0)
                    #'model:' #leftFraction
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'editField2'
                    #'layout:' #(#LayoutFrame 58 0 103 0 115 0 121 0)
                    #'model:' #topFraction
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'editField5'
                    #'layout:' #(#LayoutFrame 68 0 175 0 125 0 193 0)
                    #'model:' #leftAlignmentFraction
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'editField6'
                    #'layout:' #(#LayoutFrame 68 0 201 0 125 0 219 0)
                    #'model:' #topAlignmentFraction
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'editField3'
                    #'layout:' #(#LayoutFrame 154 0 76 0 212 0 94 0)
                    #'model:' #leftOffset
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'editField4'
                    #'layout:' #(#LayoutFrame 154 0 103 0 212 0 121 0)
                    #'model:' #topOffset
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#ActionButtonSpec
                    #'name:' 'button1'
                    #'layout:' #(#LayoutFrame 119 0 76 0 138 0 94 0)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeRelativeLeft
                )
                 #(#ActionButtonSpec
                    #'name:' 'button2'
                    #'layout:' #(#LayoutFrame 119 0 103 0 138 0 121 0)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeRelativeTop
                )
                 #(#ActionButtonSpec
                    #'name:' 'button3'
                    #'layout:' #(#LayoutFrame 217 0 76 0 236 0 94 0)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeOffsetLeft
                )
                 #(#ActionButtonSpec
                    #'name:' 'button4'
                    #'layout:' #(#LayoutFrame 217 0 103 0 236 0 121 0)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeOffsetTop
                )
                 #(#ActionButtonSpec
                    #'name:' 'button8'
                    #'layout:' #(#LayoutFrame 119 0 137 0 138 0 155 0)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeRelativeLeftTop
                )
                 #(#ActionButtonSpec
                    #'name:' 'button9'
                    #'layout:' #(#LayoutFrame 217 0 137 0 236 0 155 0)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeOffsetLeftTop
                )
                 #(#LabelSpec
                    #'name:' 'label7'
                    #'layout:' #(#AlignmentOrigin 49 0 137 0 1 0)
                    #'label:' 'all'
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #right
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label1'
                    #'layout:' #(#AlignmentOrigin 49 0 76 0 1 0)
                    #'label:' 'left'
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #right
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#DividerSpec
                    #'name:' 'separator1'
                    #'layout:' #(#Rectangle 154 177 203 188)
                )
                 #(#DividerSpec
                    #'name:' 'separator2'
                    #'layout:' #(#Rectangle 154 208 203 219)
                )
                 #(#DividerSpec
                    #'name:' 'separator3'
                    #'layout:' #(#Rectangle 145 187 155 208)
                    #'orientation:' #vertical
                )
                 #(#DividerSpec
                    #'name:' 'separator4'
                    #'layout:' #(#Rectangle 203 187 213 208)
                    #'orientation:' #vertical
                )
                 #(#ActionButtonSpec
                    #'name:' 'alignBR'
                    #'layout:' #(#Rectangle 201 207 213 219)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeAlignBottomRight
                )
                 #(#ActionButtonSpec
                    #'name:' 'alignTL'
                    #'layout:' #(#Rectangle 145 176 157 188)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeAlignTopLeft
                )
                 #(#ActionButtonSpec
                    #'name:' 'alignTR'
                    #'layout:' #(#Rectangle 201 176 213 188)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeAlignTopRight
                )
                 #(#ActionButtonSpec
                    #'name:' 'alignBL'
                    #'layout:' #(#Rectangle 145 206 157 218)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeAlignBottomLeft
                )
                 #(#ActionButtonSpec
                    #'name:' 'alignTC'
                    #'layout:' #(#Rectangle 173 176 185 188)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeAlignTopCenter
                )
                 #(#ActionButtonSpec
                    #'name:' 'alignBC'
                    #'layout:' #(#Rectangle 173 207 185 219)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeAlignBottomCenter
                )
                 #(#ActionButtonSpec
                    #'name:' 'alignLC'
                    #'layout:' #(#Rectangle 145 191 157 203)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeAlignLeftCenter
                )
                 #(#ActionButtonSpec
                    #'name:' 'alignRC'
                    #'layout:' #(#Rectangle 201 191 213 203)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeAlignRightCenter
                )
                 #(#ActionButtonSpec
                    #'name:' 'alignC'
                    #'layout:' #(#Rectangle 173 191 185 203)
                    #'label:' ''
                    #'tabable:' false
                    #'model:' #makeAlignCenter
                )
              )
          )
      )
!

specificationExtent
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

    "
     UIPainter new openOnClass:UIPropertyView andSelector:#specificationExtent
     UIPropertyView new openInterface:#specificationExtent
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'name:' 'uIPainterView'
          #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
          #'window:' 
           #(#WindowSpec
              #'name:' 'uIPainterView'
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
              #'label:' 'unnamed'
              #'bounds:' #(#Rectangle 0 0 238 303)
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#LabelSpec
                    #'name:' 'label1'
                    #'layout:' #(#AlignmentOrigin 99 0 62 0 1 0)
                    #'label:' 'horizontal:'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #left
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label2'
                    #'layout:' #(#AlignmentOrigin 99 0 89 0 1 0)
                    #'label:' 'vertical:'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #left
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#InputFieldSpec
                    #'name:' 'editField1'
                    #'layout:' #(#LayoutFrame 104 0 62 0 197 0 80 0)
                    #'model:' #leftOffset
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'editField2'
                    #'layout:' #(#LayoutFrame 104 0 89 0 197 0 107 0)
                    #'model:' #rightOffset
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#LabelSpec
                    #'name:' 'label0'
                    #'layout:' #(#Point 16 15)
                    #'label:' 'Extent:'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #left
                    #'hasCharacterOrientedLabel:' true
                )
              )
          )
      )

    "Modified: 28.2.1997 / 13:15:05 / cg"
!

specificationLayoutFrame
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

    "
     UIPainter new openOnClass:UIPropertyView andSelector:#specificationLayoutFrame
     UIPropertyView new openInterface:#specificationLayoutFrame
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'name:' 'uIPainterView'
          #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
          #'window:' 
           #(#WindowSpec
              #'name:' 'uIPainterView'
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
              #'label:' 'unnamed'
              #'bounds:' #(#Rectangle 0 0 238 291)
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#LabelSpec
                    #'name:' 'label0'
                    #'layout:' #(#AlignmentOrigin 71 0 7 0 1 0)
                    #'label:' 'Layout:'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#PopUpListSpec
                    #'name:' 'popUpList1'
                    #'layout:' #(#LayoutFrame 74 0.0 7 0 -4 1.0 30 0)
                    #'label:' 'popup'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'model:' #layoutType
                    #'menu:' #layoutTypeList
                )
                 #(#LabelSpec
                    #'name:' 'label left'
                    #'layout:' #(#AlignmentOrigin 60 0 79 0 1 0)
                    #'label:' 'left'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label top'
                    #'layout:' #(#AlignmentOrigin 60 0 107 0 1 0)
                    #'label:' 'top'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label right'
                    #'layout:' #(#AlignmentOrigin 60 0 135 0 1 0)
                    #'label:' 'right'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label bottom'
                    #'layout:' #(#AlignmentOrigin 60 0 163 0 1 0)
                    #'label:' 'bottom'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label relative'
                    #'layout:' #(#Point 65 50)
                    #'label:' 'relative'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label offset'
                    #'layout:' #(#Point 159 50)
                    #'label:' 'offset'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label all relative'
                    #'layout:' #(#AlignmentOrigin 60 0 197 0 1 0)
                    #'label:' 'all'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#InputFieldSpec
                    #'name:' 'relative E1'
                    #'layout:' #(#LayoutFrame 65 0 79 0 113 0 97 0)
                    #'model:' #leftFraction
                    #'tabable:' false
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'relative E2'
                    #'layout:' #(#LayoutFrame 65 0 107 0 113 0 125 0)
                    #'model:' #topFraction
                    #'tabable:' false
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'relative E3'
                    #'layout:' #(#LayoutFrame 65 0 135 0 113 0 153 0)
                    #'model:' #rightFraction
                    #'tabable:' false
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'relative E4'
                    #'layout:' #(#LayoutFrame 65 0 163 0 113 0 181 0)
                    #'model:' #bottomFraction
                    #'tabable:' false
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'offset E1'
                    #'layout:' #(#LayoutFrame 159 0 79 0 210 0 97 0)
                    #'model:' #leftOffset
                    #'tabable:' false
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'offset E2'
                    #'layout:' #(#LayoutFrame 159 0 107 0 210 0 125 0)
                    #'model:' #topOffset
                    #'tabable:' false
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'offset E3'
                    #'layout:' #(#LayoutFrame 159 0 135 0 210 0 153 0)
                    #'model:' #rightOffset
                    #'tabable:' false
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'offset E4'
                    #'layout:' #(#LayoutFrame 159 0 163 0 210 0 181 0)
                    #'model:' #bottomOffset
                    #'tabable:' false
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#ActionButtonSpec
                    #'name:' 'relative B1'
                    #'layout:' #(#LayoutFrame 117 0 79 0 136 0 97 0)
                    #'label:' ' '
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeRelativeLeft
                )
                 #(#ActionButtonSpec
                    #'name:' 'relative B2'
                    #'layout:' #(#LayoutFrame 117 0 107 0 136 0 125 0)
                    #'label:' ' '
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeRelativeTop
                )
                 #(#ActionButtonSpec
                    #'name:' 'relative B3'
                    #'layout:' #(#LayoutFrame 117 0 135 0 136 0 153 0)
                    #'label:' ' '
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeRelativeRight
                )
                 #(#ActionButtonSpec
                    #'name:' 'relative B4'
                    #'layout:' #(#LayoutFrame 117 0 163 0 136 0 181 0)
                    #'label:' ' '
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeRelativeBottom
                )
                 #(#ActionButtonSpec
                    #'name:' 'relative BAll'
                    #'layout:' #(#LayoutFrame 117 0 197 0 136 0 215 0)
                    #'label:' ' '
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeRelativeAll
                )
                 #(#ActionButtonSpec
                    #'name:' 'offset B1'
                    #'layout:' #(#LayoutFrame 214 0 79 0 233 0 97 0)
                    #'label:' ''
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeOffsetLeft
                )
                 #(#ActionButtonSpec
                    #'name:' 'offset B2'
                    #'layout:' #(#LayoutFrame 214 0 107 0 233 0 125 0)
                    #'label:' ''
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeOffsetTop
                )
                 #(#ActionButtonSpec
                    #'name:' 'offset B3'
                    #'layout:' #(#LayoutFrame 214 0 135 0 233 0 153 0)
                    #'label:' ''
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeOffsetRight
                )
                 #(#ActionButtonSpec
                    #'name:' 'offset B4'
                    #'layout:' #(#LayoutFrame 214 0 163 0 233 0 181 0)
                    #'label:' ''
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeOffsetBottom
                )
                 #(#ActionButtonSpec
                    #'name:' 'offset BAll'
                    #'layout:' #(#LayoutFrame 214 0 197 0 233 0 215 0)
                    #'label:' ' '
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeOffsetAll
                )
              )
          )
      )

    "Modified: 28.2.1997 / 13:19:49 / cg"
!

specificationLayoutOrigin
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

    "
     UIPainter new openOnClass:UIPropertyView andSelector:#specificationLayoutOrigin
     UIPropertyView new openInterface:#specificationLayoutOrigin
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'name:' 'uIPainterView'
          #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
          #'window:' 
           #(#WindowSpec
              #'name:' 'uIPainterView'
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
              #'label:' 'unnamed'
              #'bounds:' #(#Rectangle 0 0 238 303)
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#LabelSpec
                    #'name:' 'label0'
                    #'layout:' #(#AlignmentOrigin 71 0 7 0 1 0)
                    #'label:' 'Layout:'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#PopUpListSpec
                    #'name:' 'popUpList1'
                    #'layout:' #(#LayoutFrame 75 0.0 9 0 -5 1.0 32 0)
                    #'label:' 'popup'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'model:' #layoutType
                    #'menu:' #layoutTypeList
                )
                 #(#LabelSpec
                    #'name:' 'label1'
                    #'layout:' #(#AlignmentOrigin 52 0 82 0 1 0)
                    #'label:' 'left'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label2'
                    #'layout:' #(#AlignmentOrigin 52 0 109 0 1 0)
                    #'label:' 'top'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label3'
                    #'layout:' #(#Point 57 50)
                    #'label:' 'relative'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label4'
                    #'layout:' #(#Point 154 51)
                    #'label:' 'offset'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#InputFieldSpec
                    #'name:' 'editField1'
                    #'layout:' #(#LayoutFrame 57 0 82 0 114 0 100 0)
                    #'model:' #leftFraction
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'editField2'
                    #'layout:' #(#LayoutFrame 57 0 109 0 114 0 127 0)
                    #'model:' #topFraction
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'editField3'
                    #'layout:' #(#LayoutFrame 154 0 82 0 212 0 100 0)
                    #'model:' #leftOffset
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'editField4'
                    #'layout:' #(#LayoutFrame 154 0 109 0 212 0 127 0)
                    #'model:' #topOffset
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#ActionButtonSpec
                    #'name:' 'button1'
                    #'layout:' #(#LayoutFrame 119 0 82 0 138 0 100 0)
                    #'label:' ''
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeRelativeLeft
                )
                 #(#ActionButtonSpec
                    #'name:' 'button2'
                    #'layout:' #(#LayoutFrame 119 0 109 0 138 0 127 0)
                    #'label:' ''
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeRelativeTop
                )
                 #(#ActionButtonSpec
                    #'name:' 'button3'
                    #'layout:' #(#LayoutFrame 216 0 82 0 235 0 100 0)
                    #'label:' ''
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeOffsetLeft
                )
                 #(#ActionButtonSpec
                    #'name:' 'button4'
                    #'layout:' #(#LayoutFrame 216 0 109 0 235 0 127 0)
                    #'label:' ''
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeOffsetTop
                )
                 #(#ActionButtonSpec
                    #'name:' 'button8'
                    #'layout:' #(#LayoutFrame 119 0 141 0 138 0 159 0)
                    #'label:' ''
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeRelativeLeftTop
                )
                 #(#ActionButtonSpec
                    #'name:' 'button9'
                    #'layout:' #(#LayoutFrame 216 0 141 0 235 0 159 0)
                    #'label:' ''
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'tabable:' false
                    #'model:' #makeOffsetLeftTop
                )
                 #(#LabelSpec
                    #'name:' 'label5'
                    #'layout:' #(#AlignmentOrigin 52 0 141 0 1 0)
                    #'label:' 'all'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
              )
          )
      )
!

specificationPoint
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

    "
     UIPainter new openOnClass:UIPropertyView andSelector:#specificationPoint
     UIPropertyView new openInterface:#specificationPoint
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'name:' 'uIPainterView'
          #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
          #'window:' 
           #(#WindowSpec
              #'name:' 'uIPainterView'
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
              #'label:' 'unnamed'
              #'bounds:' #(#Rectangle 0 0 238 303)
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#LabelSpec
                    #'name:' 'label0'
                    #'layout:' #(#AlignmentOrigin 84 0 7 0 1 0)
                    #'label:' 'Layout:'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#PopUpListSpec
                    #'name:' 'popUpList1'
                    #'layout:' #(#LayoutFrame 93 0.0 7 0 -4 1.0 30 0)
                    #'label:' 'popup'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'model:' #layoutType
                    #'menu:' #layoutTypeList
                )
                 #(#LabelSpec
                    #'name:' 'label1'
                    #'layout:' #(#AlignmentOrigin 75 0 62 0 1 0)
                    #'label:' 'origin x:'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label2'
                    #'layout:' #(#AlignmentOrigin 75 0 89 0 1 0)
                    #'label:' 'origin y:'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#InputFieldSpec
                    #'name:' 'editField1'
                    #'layout:' #(#LayoutFrame 77 0 62 0 170 0 80 0)
                    #'model:' #absLeft
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'editField2'
                    #'layout:' #(#LayoutFrame 77 0 89 0 170 0 107 0)
                    #'model:' #absTop
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
              )
          )
      )

    "Modified: 28.2.1997 / 13:22:31 / cg"
!

specificationRectangle
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

    "
     UIPainter new openOnClass:UIPropertyView andSelector:#specificationRectangle
     UIPropertyView new openInterface:#specificationRectangle
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'name:' 'uIPainterView'
          #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
          #'window:' 
           #(#WindowSpec
              #'name:' 'uIPainterView'
              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
              #'label:' 'unnamed'
              #'bounds:' #(#Rectangle 0 0 238 303)
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#LabelSpec
                    #'name:' 'label0'
                    #'layout:' #(#AlignmentOrigin 90 0 7 0 1 0)
                    #'label:' 'Layout:'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #center
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#PopUpListSpec
                    #'name:' 'popUpList1'
                    #'layout:' #(#LayoutFrame 95 0.0 7 0 -6 1.0 30 0)
                    #'label:' 'popup'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'model:' #layoutType
                    #'menu:' #layoutTypeList
                )
                 #(#LabelSpec
                    #'name:' 'label1'
                    #'layout:' #(#AlignmentOrigin 80 0 62 0 1 0)
                    #'label:' 'origin x:'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #left
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label2'
                    #'layout:' #(#AlignmentOrigin 80 0 89 0 1 0)
                    #'label:' 'origin y:'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #left
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#InputFieldSpec
                    #'name:' 'editField1'
                    #'layout:' #(#LayoutFrame 81 0 62 0 174 0 80 0)
                    #'model:' #leftOffset
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'editField2'
                    #'layout:' #(#LayoutFrame 81 0 89 0 174 0 107 0)
                    #'model:' #topOffset
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#LabelSpec
                    #'name:' 'label4'
                    #'layout:' #(#AlignmentOrigin 80 0 117 0 1 0)
                    #'label:' 'corner x:'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #left
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#LabelSpec
                    #'name:' 'label5'
                    #'layout:' #(#AlignmentOrigin 80 0 144 0 1 0)
                    #'label:' 'corner y:'
                    #'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
                    #'initiallyInvisible:' false
                    #'level:' 0
                    #'adjust:' #left
                    #'hasCharacterOrientedLabel:' true
                )
                 #(#InputFieldSpec
                    #'name:' 'editField3'
                    #'layout:' #(#LayoutFrame 81 0 117 0 174 0 135 0)
                    #'model:' #rightOffset
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
                 #(#InputFieldSpec
                    #'name:' 'editField4'
                    #'layout:' #(#LayoutFrame 81 0 144 0 174 0 162 0)
                    #'model:' #bottomOffset
                    #'tabable:' true
                    #'type:' #numberOrNil
                    #'immediateAccept:' false
                    #'acceptOnLeave:' true
                    #'acceptOnReturn:' true
                    #'acceptOnTab:' true
                    #'acceptOnLostFocus:' true
                    #'hasBorder:' false
                )
              )
          )
      )

    "Modified: 28.2.1997 / 13:23:57 / cg"
! !

!UIPropertyView methodsFor:'event handling'!

builderViewChanged:what
    "something changed in the builder view
    "
    |slices list prevSpecClass|

    (what == #selection or:[what == #tree]) ifFalse:[
        what == #layout ifTrue:[
            self updateLayout
        ].
        ^ self
    ].
    currentView     := builderView singleSelection.
    propertyAspects := nil.

    currentView isNil ifTrue:[
        specChannel := nil.
      ^ self propertyList:nil
    ].

    prevSpecClass   := specBeingEdited class.
    specBeingEdited := (builderView generateSpecFor:currentView) first.

    (    (specBeingEdited class == prevSpecClass)
     and:[specChannel notNil]
    ) ifTrue:[
        "can keep current specifications plus current property selection
        "
      ^ self reload.
    ].

    propertyAspects := IdentityDictionary new.
    slices          := currentView specClass slices.

    list := slices collect:[:slice|
        slice first asString
    ].
    list := list, (Array with:(self class titleOfLayoutMenu)).

    specChannel := specBeingEdited asValue.
    specBeingEdited class addBindingsTo:propertyAspects
                                    for:specBeingEdited
                                channel:specChannel.
    propertyAspects do:[:anAspect | anAspect addDependent:self ].
    self propertyList:list.



!

modified:aState
     "change state of modification flag
     "
     aState ~~ modified ifTrue:[
        (modified := aState) ifTrue:[
            (builder componentAt:#cancelButton) enable.
            (builder componentAt:#applyButton) enable.
        ] ifFalse:[
            (builder componentAt:#cancelButton) disable.
            (builder componentAt:#applyButton) disable.
        ].
    ]
!

propertySelectionChanged
    "property selection changed; switch to new property selection
    "
    |plist|

    self modified:false.
    plist := self propertyList.

    (plist selection isNil) ifTrue:[
        ^ self showSpec:nil
    ].
    propertySelection := plist selection.

    currentView specClass slices do:[:slice|
        slice first = propertySelection ifTrue:[
            ^ self showSpec:(currentView specClass perform:(slice last))
        ]
    ].
    ^ self showAndFetchLayout   "/ layout specifications
!

update:something with:someArgument from:someone
    "any attribute changed its state in the current specification
    "
    self modified:true


! !

!UIPropertyView methodsFor:'initialization'!

in:aTopView builder:aBuilderView
    "setup property view in topview and that the builder view
    "
    |menu y cancelButton applyButton panel propertyFrame propertyList|

    super initialize.
    self initializeLayoutAspects.

    builderView := aBuilderView.

    menu := PopUpList label:'properties' in:aTopView.
    menu defaultLabel:'properties'.
    propertyFrame := View in:aTopView.
    panel := HorizontalPanelView in:aTopView.
    panel horizontalLayout:#fitSpace.

    cancelButton := Button abortButtonIn:panel.
    applyButton  := Button okButtonIn:panel.

    propertyList := SelectionInList new.
    propertyList list:#( ).
    propertyList selectionIndexHolder onChangeSend:#propertySelectionChanged
                                                to:self.
    menu model:propertyList.

    y := menu preferredExtent y.
    menu  origin:0.0@0.0 corner:1.0@y.
    propertyFrame origin:0.0@y   corner:1.0@1.0.
    panel origin:0.0@1.0 corner:1.0@1.0.

    y := panel preferredExtent y.
    propertyFrame bottomInset:y.
    panel topInset:(y negated).

    builder componentAt:#propertyFrame put:propertyFrame.
    builder componentAt:#cancelButton  put:cancelButton.
    builder componentAt:#applyButton   put:applyButton.
    builder componentAt:#propertyList  put:propertyList.

    cancelButton action:[ self cancel ].
    applyButton  action:[ self apply ].

    modified := true.
    self modified:false.
!

initializeLayoutAspects
    "initialize all layout aspects
    "
    layoutAspects := IdentityDictionary new.

    #(  bottomFraction          bottomOffset
        leftFraction            leftOffset
        topFraction             topOffset
        rightFraction           rightOffset
        leftAlignmentFraction   topAlignmentFraction
        absLeft                 absTop               
    )
    do:[:aChannel|
        layoutAspects at:aChannel put:(ValueHolder new).
    ].

    layoutAspects do:[:anAspect | anAspect addDependent:self ].

    layoutAspects at:#layoutType put:(
        AspectAdaptor new
                subject:self;
                accessWith:#layoutType
                assignWith:#layoutType:
    ).

    "Modified: 28.2.1997 / 12:57:51 / cg"
! !

!UIPropertyView methodsFor:'layout'!

layoutType
    ^ layoutType
!

layoutType:something
    |spec|

    layoutType ~~ something ifTrue:[
        layoutType := something.

        layoutType notNil ifTrue:[
            self modified:true.
            self perform:(('fetch',  layoutType asString) asSymbol).
            spec := ('specification', layoutType asString) asSymbol.
            spec := self class perform:spec.
        ].
        self showSpec:spec.
        self changed:#layoutType.
    ].
!

layoutTypeList
    ^ #( #LayoutFrame #AlignmentOrigin #LayoutOrigin #Point #Rectangle )

!

showAndFetchLayout
    "fetch and show layout specification assigned to current view
    "
    |type spec|

    self modified:false.
    modified := true.
    type     := builderView class layoutType:currentView.

    type notNil ifTrue:[
        self perform:(('fetch', type asString) asSymbol).
        spec := self class perform:(('specification', type asString) asSymbol).
    ].

    type ~~ layoutType ifTrue:[
        layoutType := type.
        self changed:#layoutType
    ].
    self showSpec:spec.
    modified := false.

!

updateLayout
    "layout changed but not selection
    "
    (modified not and:[self isLayoutSpec]) ifTrue:[
        (builderView class layoutType:currentView) == layoutType ifTrue:[
            modified := true.
            self perform:(('fetch', layoutType asString) asSymbol).
            modified := false.
        ] ifFalse:[    
            self showAndFetchLayout
        ]
    ]
! !

!UIPropertyView methodsFor:'layout fetch/write'!

fetchAlignmentOrigin
    "fetch alignmentOrigin
    "
    |layout type extent|

    type   := builderView class layoutType:currentView.
    layout := currentView geometryLayout.

    layout isLayout ifTrue:[
        (layoutAspects at:#leftOffset)   value:(layout leftOffset).
        (layoutAspects at:#leftFraction) value:(layout leftFraction).
        (layoutAspects at:#topOffset)    value:(layout topOffset).
        (layoutAspects at:#topFraction)  value:(layout topFraction).

        type == #AlignmentOrigin ifTrue:[
            (layoutAspects at:#leftAlignmentFraction) value:(layout leftAlignmentFraction).
            (layoutAspects at:#topAlignmentFraction)  value:(layout topAlignmentFraction).
          ^ self
        ]
    ] ifFalse:[
        layout := currentView computeOrigin.

        (layoutAspects at:#leftOffset)   value:(layout x).
        (layoutAspects at:#leftFraction) value:0.
        (layoutAspects at:#topOffset)    value:(layout y).
        (layoutAspects at:#topFraction)  value:0.
    ].
    (layoutAspects at:#leftAlignmentFraction) value:0.
    (layoutAspects at:#topAlignmentFraction)  value:0.


!

fetchExtent
    |extent|

    extent := currentView computeExtent.
    (layoutAspects at:#leftOffset)  value:(extent x).
    (layoutAspects at:#rightOffset) value:(extent y).
!

fetchLayoutFrame
    "fetch layoutFrame
    "
    |layout|

    layout := builderView class asLayoutFrameFromView:currentView.

    (layoutAspects at:#leftOffset)     value:(layout leftOffset).
    (layoutAspects at:#leftFraction)   value:(layout leftFraction).
    (layoutAspects at:#topOffset)      value:(layout topOffset).
    (layoutAspects at:#topFraction)    value:(layout topFraction).
    (layoutAspects at:#rightOffset)    value:(layout rightOffset).
    (layoutAspects at:#bottomOffset)   value:(layout bottomOffset).
    (layoutAspects at:#rightFraction)  value:(layout rightFraction).
    (layoutAspects at:#bottomFraction) value:(layout bottomFraction).
!

fetchLayoutOrigin
    "fetch layoutOrigin
    "
    |layout|

    layout := builderView class asLayoutFrameFromView:currentView.

    (layoutAspects at:#leftOffset)   value:(layout leftOffset).
    (layoutAspects at:#leftFraction) value:(layout leftFraction).
    (layoutAspects at:#topOffset)    value:(layout topOffset).
    (layoutAspects at:#topFraction)  value:(layout topFraction).

!

fetchPoint
    "fetch point
    "
    |origin|

    origin := currentView computeOrigin.
    (layoutAspects at:#absLeft) value:(origin x).
    (layoutAspects at:#absTop)  value:(origin y).
!

fetchRectangle
    "fetch rectangle
    "
    |origin corner|

    origin := currentView computeOrigin.
    corner := currentView computeCorner.

    (layoutAspects at:#leftOffset)   value:(origin x).
    (layoutAspects at:#rightOffset)  value:(corner x).
    (layoutAspects at:#topOffset)    value:(origin y).
    (layoutAspects at:#bottomOffset) value:(corner y).
!

writeAlignmentOrigin
    "write back as alignmentOrigin
    "
    |layout|

    layout := AlignmentOrigin new.

    layout   leftOffset:((layoutAspects at:#leftOffset)   value) ? 0.
    layout    topOffset:((layoutAspects at:#topOffset)    value) ? 0.
    layout leftFraction:((layoutAspects at:#leftFraction) value) ? 0.
    layout  topFraction:((layoutAspects at:#topFraction)  value) ? 0.

    layout leftAlignmentFraction:((layoutAspects at:#leftAlignmentFraction) value) ? 0.
    layout  topAlignmentFraction:((layoutAspects at:#topAlignmentFraction)  value) ? 0.

    builderView setDimension:layout.
!

writeExtent
    |extent|

    extent := Point x:(((layoutAspects at:#leftOffset)   value) ? 0)
                    y:(((layoutAspects at:#rightOffset)  value) ? 0).

    builderView setExtent:extent
!

writeLayoutFrame
    "write back as layoutFrame
    "
    |layout|

    layout := LayoutFrame new.

    layout     leftOffset:((layoutAspects at:#leftOffset)     value) ? 0.
    layout    rightOffset:((layoutAspects at:#rightOffset)    value) ? 0.
    layout      topOffset:((layoutAspects at:#topOffset)      value) ? 0.
    layout   bottomOffset:((layoutAspects at:#bottomOffset)   value) ? 0.
    layout   leftFraction:((layoutAspects at:#leftFraction)   value) ? 0.
    layout  rightFraction:((layoutAspects at:#rightFraction)  value) ? 0.
    layout    topFraction:((layoutAspects at:#topFraction)    value) ? 0.
    layout bottomFraction:((layoutAspects at:#bottomFraction) value) ? 0.

    builderView setDimension:layout
!

writeLayoutOrigin
    "write back as layoutOrigin
    "
    |layout|

    layout := LayoutOrigin new.

    layout   leftOffset:((layoutAspects at:#leftOffset)   value) ? 0.
    layout    topOffset:((layoutAspects at:#topOffset)    value) ? 0.
    layout leftFraction:((layoutAspects at:#leftFraction) value) ? 0.
    layout  topFraction:((layoutAspects at:#topFraction)  value) ? 0.

    builderView setDimension:layout.

!

writePoint
    "write back as point
    "
    |point|

"/    point := Point x:(((layoutAspects at:#leftOffset) value) ? 0)
"/                   y:(((layoutAspects at:#topOffset)  value) ? 0).

    point := Point x:(((layoutAspects at:#absLeft) value) ? 0)
                   y:(((layoutAspects at:#absTop)  value) ? 0).

    builderView setDimension:point

    "Modified: 28.2.1997 / 13:00:03 / cg"
!

writeRectangle
    "write back as rectangle
    "
    |rectangle|

    rectangle := Rectangle left:(((layoutAspects at:#leftOffset)   value) ? 0)
                            top:(((layoutAspects at:#topOffset)    value) ? 0)
                          right:(((layoutAspects at:#rightOffset)  value) ? 0)
                         bottom:(((layoutAspects at:#bottomOffset) value) ? 0).

    builderView setDimension:rectangle
! !

!UIPropertyView methodsFor:'layout relative/absolut'!

makeAlignBottomCenter
    self makeAlignLeft:0.5 top:1

!

makeAlignBottomLeft
    self makeAlignLeft:0 top:1

!

makeAlignBottomRight
    self makeAlignLeft:1 top:1

!

makeAlignCenter
    self makeAlignLeft:0.5 top:0.5

!

makeAlignLeft:leftAlignmentFraction top:topAlignmentFraction
    |lAF tAF lO tO ext|

    lAF := (layoutAspects at:#leftAlignmentFraction) value ? 0.
    tAF := (layoutAspects at:#topAlignmentFraction)  value ? 0.
    ext := currentView computeExtent.

    (layoutAspects at:#leftAlignmentFraction) value:leftAlignmentFraction.
    (layoutAspects at:#topAlignmentFraction)  value:topAlignmentFraction.

    lO := (layoutAspects at:#leftOffset) value ? 0.
    tO := (layoutAspects at:#topOffset)  value ? 0.

    lO := lO + (ext x * (leftAlignmentFraction - lAF)).
    tO := tO + (ext y * (topAlignmentFraction  - tAF)).

    (layoutAspects at:#leftOffset) value:(lO rounded).
    (layoutAspects at:#topOffset)  value:(tO rounded).
!

makeAlignLeftCenter
    self makeAlignLeft:0 top:0.5

!

makeAlignRightCenter
    self makeAlignLeft:1 top:0.5

!

makeAlignTopCenter
    self makeAlignLeft:0.5 top:0

!

makeAlignTopLeft
    self makeAlignLeft:0 top:0

!

makeAlignTopRight
    self makeAlignLeft:1 top:0

!

makeLayout:what xOrY:xOrY offset:aBool
    |extent fraction offset fractSymb offsetSymb|

    extent     := (currentView superView computeExtent) perform:xOrY.
    fractSymb  := (what, 'Fraction') asSymbol.
    offsetSymb := (what,   'Offset') asSymbol.

    fraction := (layoutAspects at:fractSymb)  value.
    offset   := (layoutAspects at:offsetSymb) value.

    aBool ifTrue:[
        offset   := offset + ((fraction * extent) asInteger).
        fraction := 0.
    ] ifFalse:[
        fraction   := (fraction + (offset / extent)) asFloat.

        (fraction > 1.0) ifTrue:[ fraction := 1.0 ].
        (fraction < 0.0) ifTrue:[ fraction := 0 ].
        offset := 0.
    ].
    (layoutAspects at:offsetSymb) value:offset.
    (layoutAspects at:fractSymb)  value:fraction.


!

makeOffsetAll
    self makeOffsetLeft.
    self makeOffsetTop.
    self makeOffsetRight.
    self makeOffsetBottom.

!

makeOffsetBottom
    self makeLayout:'bottom' xOrY:#y offset:true.

!

makeOffsetLeft
    self makeLayout:'left' xOrY:#x offset:true.

!

makeOffsetLeftTop
    self makeOffsetLeft.
    self makeOffsetTop.
!

makeOffsetRight
    self makeLayout:'right' xOrY:#x offset:true.

!

makeOffsetTop
    self makeLayout:'top' xOrY:#y offset:true.

!

makeRelativeAll
    self makeRelativeLeft.
    self makeRelativeTop.
    self makeRelativeRight.
    self makeRelativeBottom.

!

makeRelativeBottom
    self makeLayout:'bottom' xOrY:#y offset:false.

!

makeRelativeLeft
    self makeLayout:'left' xOrY:#x offset:false.

!

makeRelativeLeftTop
    self makeRelativeLeft.
    self makeRelativeTop.
!

makeRelativeRight
    self makeLayout:'right' xOrY:#x offset:false.

!

makeRelativeTop
    self makeLayout:'top' xOrY:#y offset:false.

! !

!UIPropertyView methodsFor:'private'!

apply
    "apply current changes and write back to current view
    "
    modified ifTrue:[
        self modified:false.

        self isSingleSelection ifTrue:[
            self isLayoutSpec ifFalse:[
                builderView updateFromSpec:specBeingEdited
            ] ifTrue:[
                layoutType notNil ifTrue:[
                    self perform:(('write', layoutType asString) asSymbol)
                ]
            ]
        ]
    ]

!

aspectFor:aKey
    "returns aspect for a key
    "
    |aspect|

    propertyAspects notNil ifTrue:[
        aspect := propertyAspects at:aKey ifAbsent:nil.
        aspect notNil ifTrue:[
            ^ aspect
        ]
    ].

    ^ layoutAspects at:aKey ifAbsent:[super aspectFor:aKey]
!

cancel
    "cancel all changes and read back attributes from current view
    "
    modified ifTrue:[
        specBeingEdited := (builderView generateSpecFor:currentView) first.
        self reload
    ].
!

propertyList
    "returns property list
    "
    ^ builder componentAt:#propertyList
!

propertyList:aList
    "property list changed
    "
    |sel list plist|

    aList notNil ifTrue:[
        sel  := propertySelection.
        list := aList
    ] ifFalse:[
        list := #()
    ].

    plist := self propertyList.
    plist list:list.
    plist selection:sel.
    self modified:false.

!

reload
    "relaod all attributes from current specification and update values
    "
    self modified:false.

    self isSingleSelection ifTrue:[
        modified := true.                               "/ disable notifications"
        specChannel value:specBeingEdited.

        self isLayoutSpec ifTrue:[
            self showAndFetchLayout.
        ].
        modified := false.                              "/ enable notifications
    ].

!

showSpec:aSpec
    "switch to specification
    "
    |frame|

    shownSpec ~= aSpec ifTrue:[
        frame := builder componentAt:#propertyFrame.
        frame destroySubViews.

        aSpec notNil ifTrue:[
            builder buildFromSpec:aSpec in:frame.
            frame realizeAllSubViews
        ]
    ].
    shownSpec := aSpec.
! !

!UIPropertyView methodsFor:'queries'!

isLayoutSpec
    "returns true if current menu is a layout specification
    "
    |selection|

    self isSingleSelection ifTrue:[
        ^ propertySelection == self class titleOfLayoutMenu
    ].
    ^ false
!

isMultiSelection
    "returns true in case of a multiple selection
    "
    ^ (currentView isNil and:[builderView numberOfSelections > 1])
!

isSingleSelection
    "returns true in case of a single selection
    "
    ^ currentView notNil
! !

!UIPropertyView class methodsFor:'documentation'!

version
    ^ '$Header$'
! !