--- a/UIPropertyView.st Wed May 21 12:40:05 1997 +0200
+++ b/UIPropertyView.st Wed May 21 12:41:01 1997 +0200
@@ -1,30 +1,200 @@
ApplicationModel subclass:#UIPropertyView
- instanceVariableNames:'builderView modified currentView shownSpec propertyAspects
- layoutAspects layoutType specBeingEdited specChannel
- propertySelection'
+ instanceVariableNames:'window specClass aspects modified modifiedHolder'
classVariableNames:''
poolDictionaries:''
category:'Interface-UIPainter'
!
+UIPropertyView subclass:#Dimension
+ instanceVariableNames:'noteBook forView selection layoutTypes'
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:UIPropertyView
+!
+
+UIPropertyView subclass:#Specification
+ instanceVariableNames:'specEdited specChannel'
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:UIPropertyView
+!
+
+!UIPropertyView class methodsFor:'documentation'!
+
+documentation
+"
+ provides tools to the UIPainter accessing and manipulation
+ properties and/or layouts.
+"
+
+! !
!UIPropertyView class methodsFor:'instance creation'!
-in:aTopView builder:aBuilderView
- |application|
+for:aTool in:aTopview
+ |cls appl|
+
+ cls := Smalltalk classNamed:(self name asString, '::', aTool asString).
+ appl := cls new.
+ appl origin:0.0@0.0 corner:1.0@1.0 in:aTopview.
+ ^ appl
+!
+
+in:aTopview
+ |appl|
+
+ appl := self new.
+ appl origin:0.0@0.0 corner:1.0@1.0 in:aTopview.
+ ^ appl
+! !
+
+!UIPropertyView methodsFor:'accessing'!
+
+buildFromSpec:aSpec
+ |state subViews backGroundColor|
+
+ aSpec ~= specClass ifTrue:[
+ window destroySubViews.
+
+ aSpec notNil ifTrue:[
+ builder buildFromSpec:aSpec in:window.
+ window allViewBackground:(self viewBackground).
+ window realizeAllSubViews
+ ]
+ ].
+ specClass := aSpec.
+ self modified:false
+
+!
- application := self new.
- application in:aTopView builder:aBuilderView.
- ^ application
+modified
+ "returns modifying state
+ "
+ ^ modified
+!
+
+modified:aState
+ "set modifying state
+ "
+ modified := aState.
+
+ modifiedHolder notNil ifTrue:[
+ modifiedHolder value ~~ modified ifTrue:[
+ modifiedHolder value:modified
+ ]
+ ]
+!
+
+modifiedHolder
+ "returns the value holder set to true in case of modifying attributes
+ "
+ ^ modifiedHolder
+!
+
+modifiedHolder:aValueHolder
+ "set the value holder set to true in case of modifying attributes
+ "
+ modifiedHolder notNil ifTrue:[
+ modifiedHolder removeDependent:self.
+ ].
+
+ (modifiedHolder := aValueHolder) notNil ifTrue:[
+ modifiedHolder addDependent:self.
+ modifiedHolder setValue:modified.
+ ].
! !
-!UIPropertyView class methodsFor:'constants'!
+!UIPropertyView methodsFor:'accessing hierarchy'!
+
+lower
+ "bring window to back
+ "
+ self window back
+!
-titleOfLayoutMenu
- ^ 'Dimension'
+raise
+ "bring window to front
+ "
+ self window raise
+!
+
+viewBackground
+ ^ window viewBackground
+!
+
+viewBackground:aColor
+ window viewBackground:aColor
+!
+
+window
+ "returns window application is running in
+ "
+ ^ window
! !
-!UIPropertyView class methodsFor:'interface specs'!
+!UIPropertyView methodsFor:'bindings'!
+
+aspectFor:aKey
+ "returns aspect for a key or nil
+ "
+ aspects notNil ifTrue:[
+ ^ aspects at:aKey ifAbsent:nil
+ ].
+ ^ super aspectFor:aKey
+
+!
+
+aspects
+ "returned monitored aspects
+ "
+ ^ aspects
+!
+
+aspects:aListOfAspects
+ "set aspects to be monitored
+ "
+ (aspects := aListOfAspects) notNil ifTrue:[
+ aspects do:[:el | el addDependent:self ].
+ ].
+ self modified:false.
+! !
+
+!UIPropertyView methodsFor:'change & update'!
+
+update:something with:someArgument from:someone
+ "any attribute changed its state in the current specification
+ "
+ someone == modifiedHolder ifTrue:[
+ modified := modifiedHolder value
+ ] ifFalse:[
+ self modified:true
+ ]
+! !
+
+!UIPropertyView methodsFor:'initialization'!
+
+closeRequest
+ modifiedHolder notNil ifTrue:[
+ modifiedHolder removeDependent:self.
+ modifiedHolder := nil.
+ ].
+
+ super closeRequest
+
+
+!
+
+initialize
+ super initialize.
+ modified := false.
+!
+
+origin:anOrigin corner:aCorner in:aTopview
+ window := SimpleView origin:anOrigin corner:aCorner in:aTopview
+
+! !
+
+!UIPropertyView::Dimension class methodsFor:'interface specs'!
specificationAlignmentOrigin
"this window spec was automatically generated by the ST/X UIPainter"
@@ -33,14 +203,14 @@
handle the specification if its corrupted."
"
- UIPainter new openOnClass:UIPropertyView andSelector:#specificationAlignmentOrigin
- UIPropertyView new openInterface:#specificationAlignmentOrigin
+ UIPainter new openOnClass:UIPropertyView::Dimension andSelector:#specificationAlignmentOrigin
+ UIPropertyView::Dimension new openInterface:#specificationAlignmentOrigin
"
<resource: #canvas>
^
-
+
#(#FullSpec
#'window:'
#(#WindowSpec
@@ -54,81 +224,52 @@
#'collection:'
#(
#(#LabelSpec
- #'name:' 'label9'
- #'layout:' #(#AlignmentOrigin 76 0 7 0 1 0)
- #'label:' 'Layout:'
- #'initiallyInvisible:' false
- #'translateLabel:' 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
- #'translateLabel:' false
- #'model:' #layoutType
- #'menu:' #layoutTypeList
- )
- #(#LabelSpec
#'name:' 'label2'
- #'layout:' #(#AlignmentOrigin 49 0 103 0 1 0)
+ #'layout:' #(#AlignmentOrigin 49 0 68 0 1 0)
#'label:' 'top'
- #'initiallyInvisible:' false
- #'translateLabel:' false
#'level:' 0
#'adjust:' #right
#'hasCharacterOrientedLabel:' true
)
#(#LabelSpec
#'name:' 'label3'
- #'layout:' #(#Point 58 48)
+ #'layout:' #(#Point 58 13)
#'label:' 'relative'
- #'initiallyInvisible:' false
- #'translateLabel:' false
#'level:' 0
#'adjust:' #center
#'hasCharacterOrientedLabel:' true
)
#(#LabelSpec
#'name:' 'label4'
- #'layout:' #(#Point 154 49)
+ #'layout:' #(#Point 154 14)
#'label:' 'offset'
- #'initiallyInvisible:' false
- #'translateLabel:' false
#'level:' 0
#'adjust:' #center
#'hasCharacterOrientedLabel:' true
)
#(#LabelSpec
#'name:' 'label5'
- #'layout:' #(#AlignmentOrigin 63 0 175 0 1 0)
+ #'layout:' #(#AlignmentOrigin 63 0 140 0 1 0)
#'label:' 'align H'
- #'initiallyInvisible:' false
- #'translateLabel:' false
#'level:' 0
#'adjust:' #right
#'hasCharacterOrientedLabel:' true
)
#(#LabelSpec
#'name:' 'label6'
- #'layout:' #(#AlignmentOrigin 63 0 201 0 1 0)
+ #'layout:' #(#AlignmentOrigin 63 0 166 0 1 0)
#'label:' 'align V'
- #'initiallyInvisible:' false
- #'translateLabel:' false
#'level:' 0
#'adjust:' #right
#'hasCharacterOrientedLabel:' true
)
#(#InputFieldSpec
#'name:' 'editField1'
- #'layout:' #(#LayoutFrame 58 0 76 0 115 0 94 0)
+ #'layout:' #(#LayoutFrame 58 0 41 0 115 0 59 0)
#'model:' #leftFraction
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -137,11 +278,11 @@
)
#(#InputFieldSpec
#'name:' 'editField2'
- #'layout:' #(#LayoutFrame 58 0 103 0 115 0 121 0)
+ #'layout:' #(#LayoutFrame 58 0 68 0 115 0 86 0)
#'model:' #topFraction
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -150,11 +291,11 @@
)
#(#InputFieldSpec
#'name:' 'editField5'
- #'layout:' #(#LayoutFrame 68 0 175 0 125 0 193 0)
+ #'layout:' #(#LayoutFrame 68 0 140 0 125 0 158 0)
#'model:' #leftAlignmentFraction
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -163,11 +304,11 @@
)
#(#InputFieldSpec
#'name:' 'editField6'
- #'layout:' #(#LayoutFrame 68 0 201 0 125 0 219 0)
+ #'layout:' #(#LayoutFrame 68 0 166 0 125 0 184 0)
#'model:' #topAlignmentFraction
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -176,11 +317,11 @@
)
#(#InputFieldSpec
#'name:' 'editField3'
- #'layout:' #(#LayoutFrame 154 0 76 0 212 0 94 0)
+ #'layout:' #(#LayoutFrame 154 0 41 0 212 0 59 0)
#'model:' #leftOffset
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -189,11 +330,11 @@
)
#(#InputFieldSpec
#'name:' 'editField4'
- #'layout:' #(#LayoutFrame 154 0 103 0 212 0 121 0)
+ #'layout:' #(#LayoutFrame 154 0 68 0 212 0 86 0)
#'model:' #topOffset
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -202,167 +343,165 @@
)
#(#ActionButtonSpec
#'name:' 'button1'
- #'layout:' #(#LayoutFrame 119 0 76 0 138 0 94 0)
+ #'layout:' #(#LayoutFrame 119 0 41 0 138 0 59 0)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeRelativeLeft
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'button2'
- #'layout:' #(#LayoutFrame 119 0 103 0 138 0 121 0)
+ #'layout:' #(#LayoutFrame 119 0 68 0 138 0 86 0)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeRelativeTop
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'button3'
- #'layout:' #(#LayoutFrame 217 0 76 0 236 0 94 0)
+ #'layout:' #(#LayoutFrame 217 0 41 0 236 0 59 0)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeOffsetLeft
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'button4'
- #'layout:' #(#LayoutFrame 217 0 103 0 236 0 121 0)
+ #'layout:' #(#LayoutFrame 217 0 68 0 236 0 86 0)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeOffsetTop
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'button8'
- #'layout:' #(#LayoutFrame 119 0 137 0 138 0 155 0)
+ #'layout:' #(#LayoutFrame 119 0 102 0 138 0 120 0)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeRelativeLeftTop
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'button9'
- #'layout:' #(#LayoutFrame 217 0 137 0 236 0 155 0)
+ #'layout:' #(#LayoutFrame 217 0 102 0 236 0 120 0)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeOffsetLeftTop
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#LabelSpec
#'name:' 'label7'
- #'layout:' #(#AlignmentOrigin 49 0 137 0 1 0)
+ #'layout:' #(#AlignmentOrigin 49 0 102 0 1 0)
#'label:' 'all'
- #'initiallyInvisible:' false
- #'translateLabel:' false
#'level:' 0
#'adjust:' #right
#'hasCharacterOrientedLabel:' true
)
#(#LabelSpec
#'name:' 'label1'
- #'layout:' #(#AlignmentOrigin 49 0 76 0 1 0)
+ #'layout:' #(#AlignmentOrigin 49 0 41 0 1 0)
#'label:' 'left'
- #'initiallyInvisible:' false
- #'translateLabel:' false
#'level:' 0
#'adjust:' #right
#'hasCharacterOrientedLabel:' true
)
#(#DividerSpec
#'name:' 'separator1'
- #'layout:' #(#Rectangle 154 177 203 188)
+ #'layout:' #(#Rectangle 154 142 203 153)
#'orientation:' #horizontal
)
#(#DividerSpec
#'name:' 'separator2'
- #'layout:' #(#Rectangle 154 208 203 219)
+ #'layout:' #(#Rectangle 154 173 203 184)
#'orientation:' #horizontal
)
#(#DividerSpec
#'name:' 'separator3'
- #'layout:' #(#Rectangle 145 187 155 208)
+ #'layout:' #(#Rectangle 145 152 155 173)
#'orientation:' #vertical
)
#(#DividerSpec
#'name:' 'separator4'
- #'layout:' #(#Rectangle 203 187 213 208)
+ #'layout:' #(#Rectangle 203 152 213 173)
#'orientation:' #vertical
)
#(#ActionButtonSpec
#'name:' 'alignBR'
- #'layout:' #(#Rectangle 201 207 213 219)
+ #'layout:' #(#Rectangle 201 172 213 184)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeAlignBottomRight
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'alignTL'
- #'layout:' #(#Rectangle 145 176 157 188)
+ #'layout:' #(#Rectangle 145 141 157 153)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeAlignTopLeft
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'alignTR'
- #'layout:' #(#Rectangle 201 176 213 188)
+ #'layout:' #(#Rectangle 201 141 213 153)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeAlignTopRight
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'alignBL'
- #'layout:' #(#Rectangle 145 206 157 218)
+ #'layout:' #(#Rectangle 145 171 157 183)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeAlignBottomLeft
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'alignTC'
- #'layout:' #(#Rectangle 173 176 185 188)
+ #'layout:' #(#Rectangle 173 141 185 153)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeAlignTopCenter
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'alignBC'
- #'layout:' #(#Rectangle 173 207 185 219)
+ #'layout:' #(#Rectangle 173 172 185 184)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeAlignBottomCenter
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'alignLC'
- #'layout:' #(#Rectangle 145 191 157 203)
+ #'layout:' #(#Rectangle 145 156 157 168)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeAlignLeftCenter
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'alignRC'
- #'layout:' #(#Rectangle 201 191 213 203)
+ #'layout:' #(#Rectangle 201 156 213 168)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeAlignRightCenter
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'alignC'
- #'layout:' #(#Rectangle 173 191 185 203)
+ #'layout:' #(#Rectangle 173 156 185 168)
#'label:' ''
- #'translateLabel:' false
- #'tabable:' false
#'model:' #makeAlignCenter
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
)
)
)
+
+
!
specificationExtent
@@ -372,74 +511,51 @@
handle the specification if its corrupted."
"
- UIPainter new openOnClass:UIPropertyView andSelector:#specificationExtent
- UIPropertyView new openInterface:#specificationExtent
+ UIPainter new openOnClass:UIPropertyView::Dimension andSelector:#specificationExtent
+ UIPropertyView::Dimension 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)
+ #'bounds:' #(#Rectangle 0 0 224 251)
)
#'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:' 'label1'
- #'layout:' #(#AlignmentOrigin 99 0 62 0 1 0)
+ #'layout:' #(#AlignmentOrigin 99 0 45 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)
+ #'layout:' #(#AlignmentOrigin 99 0 72 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)
+ #'layout:' #(#LayoutFrame 104 0 45 0 197 0 63 0)
#'model:' #leftOffset
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -448,32 +564,29 @@
)
#(#InputFieldSpec
#'name:' 'editField2'
- #'layout:' #(#LayoutFrame 104 0 89 0 197 0 107 0)
+ #'layout:' #(#LayoutFrame 104 0 72 0 197 0 90 0)
#'model:' #rightOffset
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'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
-"/ )
+ #(#LabelSpec
+ #'name:' 'extentLabel'
+ #'layout:' #(#LayoutFrame 9 0 20 0 63 0 37 0)
+ #'label:' 'Extent:'
+ #'level:' 0
+ #'adjust:' #center
+ #'hasCharacterOrientedLabel:' true
+ )
)
)
)
- "Modified: 28.3.1997 / 19:46:27 / cg"
!
specificationLayoutFrame
@@ -483,17 +596,15 @@
handle the specification if its corrupted."
"
- UIPainter new openOnClass:UIPropertyView andSelector:#specificationLayoutFrame
- UIPropertyView new openInterface:#specificationLayoutFrame
+ UIPainter new openOnClass:UIPropertyView::Dimension andSelector:#specificationLayoutFrame
+ UIPropertyView::Dimension 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'
@@ -506,101 +617,74 @@
#'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)
+ #'layout:' #(#AlignmentOrigin 60 0 43 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)
+ #'layout:' #(#AlignmentOrigin 60 0 71 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)
+ #'layout:' #(#AlignmentOrigin 60 0 99 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)
+ #'layout:' #(#AlignmentOrigin 60 0 127 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)
+ #'layout:' #(#Point 65 14)
#'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)
+ #'layout:' #(#Point 159 14)
#'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)
+ #'layout:' #(#AlignmentOrigin 60 0 161 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)
+ #'layout:' #(#LayoutFrame 65 0 43 0 113 0 61 0)
#'model:' #leftFraction
- #'tabable:' false
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -609,11 +693,10 @@
)
#(#InputFieldSpec
#'name:' 'relative E2'
- #'layout:' #(#LayoutFrame 65 0 107 0 113 0 125 0)
+ #'layout:' #(#LayoutFrame 65 0 71 0 113 0 89 0)
#'model:' #topFraction
- #'tabable:' false
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -622,11 +705,10 @@
)
#(#InputFieldSpec
#'name:' 'relative E3'
- #'layout:' #(#LayoutFrame 65 0 135 0 113 0 153 0)
+ #'layout:' #(#LayoutFrame 65 0 99 0 113 0 117 0)
#'model:' #rightFraction
- #'tabable:' false
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -635,11 +717,10 @@
)
#(#InputFieldSpec
#'name:' 'relative E4'
- #'layout:' #(#LayoutFrame 65 0 163 0 113 0 181 0)
+ #'layout:' #(#LayoutFrame 65 0 127 0 113 0 145 0)
#'model:' #bottomFraction
- #'tabable:' false
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -648,11 +729,10 @@
)
#(#InputFieldSpec
#'name:' 'offset E1'
- #'layout:' #(#LayoutFrame 159 0 79 0 210 0 97 0)
+ #'layout:' #(#LayoutFrame 159 0 43 0 210 0 61 0)
#'model:' #leftOffset
- #'tabable:' false
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -661,11 +741,10 @@
)
#(#InputFieldSpec
#'name:' 'offset E2'
- #'layout:' #(#LayoutFrame 159 0 107 0 210 0 125 0)
+ #'layout:' #(#LayoutFrame 159 0 71 0 210 0 89 0)
#'model:' #topOffset
- #'tabable:' false
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -674,11 +753,10 @@
)
#(#InputFieldSpec
#'name:' 'offset E3'
- #'layout:' #(#LayoutFrame 159 0 135 0 210 0 153 0)
+ #'layout:' #(#LayoutFrame 159 0 99 0 210 0 117 0)
#'model:' #rightOffset
- #'tabable:' false
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -687,11 +765,10 @@
)
#(#InputFieldSpec
#'name:' 'offset E4'
- #'layout:' #(#LayoutFrame 159 0 163 0 210 0 181 0)
+ #'layout:' #(#LayoutFrame 159 0 127 0 210 0 145 0)
#'model:' #bottomOffset
- #'tabable:' false
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -700,89 +777,98 @@
)
#(#ActionButtonSpec
#'name:' 'relative B1'
- #'layout:' #(#LayoutFrame 117 0 79 0 136 0 97 0)
+ #'layout:' #(#LayoutFrame 117 0 43 0 136 0 61 0)
#'label:' ' '
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeRelativeLeft
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'relative B2'
- #'layout:' #(#LayoutFrame 117 0 107 0 136 0 125 0)
+ #'layout:' #(#LayoutFrame 117 0 71 0 136 0 89 0)
#'label:' ' '
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeRelativeTop
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'relative B3'
- #'layout:' #(#LayoutFrame 117 0 135 0 136 0 153 0)
+ #'layout:' #(#LayoutFrame 117 0 99 0 136 0 117 0)
#'label:' ' '
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeRelativeRight
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'relative B4'
- #'layout:' #(#LayoutFrame 117 0 163 0 136 0 181 0)
+ #'layout:' #(#LayoutFrame 117 0 127 0 136 0 145 0)
#'label:' ' '
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeRelativeBottom
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'relative BAll'
- #'layout:' #(#LayoutFrame 117 0 197 0 136 0 215 0)
+ #'layout:' #(#LayoutFrame 117 0 161 0 136 0 179 0)
#'label:' ' '
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeRelativeAll
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'offset B1'
- #'layout:' #(#LayoutFrame 214 0 79 0 233 0 97 0)
+ #'layout:' #(#LayoutFrame 214 0 43 0 233 0 61 0)
#'label:' ''
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeOffsetLeft
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'offset B2'
- #'layout:' #(#LayoutFrame 214 0 107 0 233 0 125 0)
+ #'layout:' #(#LayoutFrame 214 0 71 0 233 0 89 0)
#'label:' ''
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeOffsetTop
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'offset B3'
- #'layout:' #(#LayoutFrame 214 0 135 0 233 0 153 0)
+ #'layout:' #(#LayoutFrame 214 0 99 0 233 0 117 0)
#'label:' ''
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeOffsetRight
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'offset B4'
- #'layout:' #(#LayoutFrame 214 0 163 0 233 0 181 0)
+ #'layout:' #(#LayoutFrame 214 0 127 0 233 0 145 0)
#'label:' ''
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeOffsetBottom
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'offset BAll'
- #'layout:' #(#LayoutFrame 214 0 197 0 233 0 215 0)
+ #'layout:' #(#LayoutFrame 214 0 161 0 233 0 179 0)
#'label:' ' '
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeOffsetAll
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
)
)
)
- "Modified: 28.2.1997 / 13:19:49 / cg"
!
specificationLayoutOrigin
@@ -792,17 +878,15 @@
handle the specification if its corrupted."
"
- UIPainter new openOnClass:UIPropertyView andSelector:#specificationLayoutOrigin
- UIPropertyView new openInterface:#specificationLayoutOrigin
+ UIPainter new openOnClass:UIPropertyView::Dimension andSelector:#specificationLayoutOrigin
+ UIPropertyView::Dimension 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'
@@ -815,71 +899,48 @@
#'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)
+ #'layout:' #(#AlignmentOrigin 52 0 44 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)
+ #'layout:' #(#AlignmentOrigin 52 0 71 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)
+ #'layout:' #(#Point 57 12)
#'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)
+ #'layout:' #(#Point 154 13)
#'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)
+ #'layout:' #(#LayoutFrame 57 0 44 0 114 0 62 0)
#'model:' #leftFraction
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -888,11 +949,11 @@
)
#(#InputFieldSpec
#'name:' 'editField2'
- #'layout:' #(#LayoutFrame 57 0 109 0 114 0 127 0)
+ #'layout:' #(#LayoutFrame 57 0 71 0 114 0 89 0)
#'model:' #topFraction
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -901,11 +962,11 @@
)
#(#InputFieldSpec
#'name:' 'editField3'
- #'layout:' #(#LayoutFrame 154 0 82 0 212 0 100 0)
+ #'layout:' #(#LayoutFrame 154 0 44 0 212 0 62 0)
#'model:' #leftOffset
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -914,11 +975,11 @@
)
#(#InputFieldSpec
#'name:' 'editField4'
- #'layout:' #(#LayoutFrame 154 0 109 0 212 0 127 0)
+ #'layout:' #(#LayoutFrame 154 0 71 0 212 0 89 0)
#'model:' #topOffset
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -927,58 +988,63 @@
)
#(#ActionButtonSpec
#'name:' 'button1'
- #'layout:' #(#LayoutFrame 119 0 82 0 138 0 100 0)
+ #'layout:' #(#LayoutFrame 119 0 44 0 138 0 62 0)
#'label:' ''
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeRelativeLeft
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'button2'
- #'layout:' #(#LayoutFrame 119 0 109 0 138 0 127 0)
+ #'layout:' #(#LayoutFrame 119 0 71 0 138 0 89 0)
#'label:' ''
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeRelativeTop
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'button3'
- #'layout:' #(#LayoutFrame 216 0 82 0 235 0 100 0)
+ #'layout:' #(#LayoutFrame 216 0 44 0 235 0 62 0)
#'label:' ''
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeOffsetLeft
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'button4'
- #'layout:' #(#LayoutFrame 216 0 109 0 235 0 127 0)
+ #'layout:' #(#LayoutFrame 216 0 71 0 235 0 89 0)
#'label:' ''
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeOffsetTop
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'button8'
- #'layout:' #(#LayoutFrame 119 0 141 0 138 0 159 0)
+ #'layout:' #(#LayoutFrame 119 0 103 0 138 0 121 0)
#'label:' ''
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeRelativeLeftTop
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#ActionButtonSpec
#'name:' 'button9'
- #'layout:' #(#LayoutFrame 216 0 141 0 235 0 159 0)
+ #'layout:' #(#LayoutFrame 216 0 103 0 235 0 121 0)
#'label:' ''
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'tabable:' false
#'model:' #makeOffsetLeftTop
+ #'isTriggerOnDown:' false
+ #'autoRepeat:' false
)
#(#LabelSpec
#'name:' 'label5'
- #'layout:' #(#AlignmentOrigin 52 0 141 0 1 0)
+ #'layout:' #(#AlignmentOrigin 52 0 103 0 1 0)
#'label:' 'all'
#'backgroundColor:' #(#Color 66.9993 66.9993 66.9993)
- #'initiallyInvisible:' false
#'level:' 0
#'adjust:' #center
#'hasCharacterOrientedLabel:' true
@@ -986,6 +1052,7 @@
)
)
)
+
!
specificationPoint
@@ -995,17 +1062,15 @@
handle the specification if its corrupted."
"
- UIPainter new openOnClass:UIPropertyView andSelector:#specificationPoint
- UIPropertyView new openInterface:#specificationPoint
+ UIPainter new openOnClass:UIPropertyView::Dimension andSelector:#specificationPoint
+ UIPropertyView::Dimension 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'
@@ -1018,51 +1083,30 @@
#'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)
+ #'layout:' #(#AlignmentOrigin 75 0 19 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)
+ #'layout:' #(#AlignmentOrigin 75 0 46 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)
+ #'layout:' #(#LayoutFrame 77 0 19 0 170 0 37 0)
#'model:' #absLeft
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -1071,11 +1115,11 @@
)
#(#InputFieldSpec
#'name:' 'editField2'
- #'layout:' #(#LayoutFrame 77 0 89 0 170 0 107 0)
+ #'layout:' #(#LayoutFrame 77 0 46 0 170 0 64 0)
#'model:' #absTop
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -1086,7 +1130,6 @@
)
)
- "Modified: 28.2.1997 / 13:22:31 / cg"
!
specificationRectangle
@@ -1096,17 +1139,15 @@
handle the specification if its corrupted."
"
- UIPainter new openOnClass:UIPropertyView andSelector:#specificationRectangle
- UIPropertyView new openInterface:#specificationRectangle
+ UIPainter new openOnClass:UIPropertyView::Dimension andSelector:#specificationRectangle
+ UIPropertyView::Dimension 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'
@@ -1119,51 +1160,30 @@
#'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)
+ #'layout:' #(#AlignmentOrigin 80 0 19 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)
+ #'layout:' #(#AlignmentOrigin 80 0 46 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)
+ #'layout:' #(#LayoutFrame 81 0 19 0 174 0 37 0)
#'model:' #leftOffset
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -1172,11 +1192,11 @@
)
#(#InputFieldSpec
#'name:' 'editField2'
- #'layout:' #(#LayoutFrame 81 0 89 0 174 0 107 0)
+ #'layout:' #(#LayoutFrame 81 0 46 0 174 0 64 0)
#'model:' #topOffset
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -1185,31 +1205,29 @@
)
#(#LabelSpec
#'name:' 'label4'
- #'layout:' #(#AlignmentOrigin 80 0 117 0 1 0)
+ #'layout:' #(#AlignmentOrigin 80 0 74 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)
+ #'layout:' #(#AlignmentOrigin 80 0 101 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)
+ #'layout:' #(#LayoutFrame 81 0 74 0 174 0 92 0)
#'model:' #rightOffset
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -1218,11 +1236,11 @@
)
#(#InputFieldSpec
#'name:' 'editField4'
- #'layout:' #(#LayoutFrame 81 0 144 0 174 0 162 0)
+ #'layout:' #(#LayoutFrame 81 0 101 0 174 0 119 0)
#'model:' #bottomOffset
#'tabable:' true
#'type:' #numberOrNil
- #'immediateAccept:' false
+ #'immediateAccept:' true
#'acceptOnLeave:' true
#'acceptOnReturn:' true
#'acceptOnTab:' true
@@ -1233,156 +1251,54 @@
)
)
- "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.
-
- currentView isNil ifTrue:[
- propertyAspects := nil.
- specChannel := nil.
- ^ self propertyList:nil
- ].
-
- prevSpecClass := specBeingEdited class.
- specBeingEdited := builderView specFor:currentView.
+!UIPropertyView::Dimension methodsFor:'accessing'!
- ( (specBeingEdited class == prevSpecClass)
- and:[specChannel notNil]
- ) ifTrue:[
- "can keep current specifications plus current property selection
- "
- ^ self reload.
- ].
-
- propertyAspects := IdentityDictionary new.
- slices := specBeingEdited class 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.
-
+forView:aView
+ "set the view the layout derives from
+ "
+ forView := aView.
+ selection := nil.
+ self selection:(UIPainterView layoutType:forView)
!
-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.
- ].
- ]
+layout
+ "returns current layout
+ "
+ |layout|
+
+ selection notNil ifTrue:[
+ layout := self perform:(('get', selection asString) asSymbol).
+ ].
+ ^ layout
!
-propertySelectionChanged
- "property selection changed; switch to new property selection
+layoutType
+ "returns current layoutType
"
- |plist specClass|
-
- self modified:false.
-
- specClass := specBeingEdited class.
- plist := self propertyList.
+ ^ selection
+! !
- (plist selection isNil) ifTrue:[
- ^ self showSpec:nil
- ].
- propertySelection := plist selection.
+!UIPropertyView::Dimension methodsFor:'accessing hierarchy'!
- specClass slices do:[:slice|
- slice first = propertySelection ifTrue:[
- ^ self showSpec:(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
+window
+ ^ noteBook
! !
-!UIPropertyView methodsFor:'initialization'!
+!UIPropertyView::Dimension methodsFor:'initialization'!
-in:aTopView builder:aBuilderView
- "setup property view in topview and that the builder view
+initialize
+ "initialize channels
"
- |menu y cancelButton applyButton panel propertyFrame propertyList|
+ |layoutAspects|
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
@@ -1392,129 +1308,151 @@
leftAlignmentFraction topAlignmentFraction
absLeft absTop
)
- do:[:aChannel|
- layoutAspects at:aChannel put:(ValueHolder new).
+ do:[:aKey|
+ layoutAspects at:aKey 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'!
+ self aspects:layoutAspects.
-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
+origin:anOrigin corner:aCorner in:aTopView
+ "set dimensions
"
- |type spec|
+ noteBook := NoteBookView origin:anOrigin corner:aCorner in:aTopView.
+ window := noteBook canvas.
- self modified:false.
- modified := true.
- type := builderView class layoutType:currentView.
+ noteBook direction:#bottom.
+ noteBook useIndex:true.
+ layoutTypes := #( #LayoutFrame #AlignmentOrigin #LayoutOrigin #Point #Rectangle ).
+ noteBook list:#( 'Frame' 'Alig.Origin' 'LayoutOrigin' 'Point' 'Rectangle' ).
- type notNil ifTrue:[
- self perform:(('fetch', type asString) asSymbol).
- spec := self class perform:(('specification', type asString) asSymbol).
+ noteBook action:[:anIndex|
+ anIndex notNil ifTrue:[self selection:(layoutTypes at:anIndex)].
].
- type ~~ layoutType ifTrue:[
- layoutType := type.
- self changed:#layoutType
- ].
- self showSpec:spec.
- modified := false.
+! !
+
+!UIPropertyView::Dimension methodsFor:'layout access'!
+
+getAlignmentOrigin
+ "returns current layout as alignmentOrigin
+ "
+ |layout|
+
+ layout := AlignmentOrigin new.
- "Modified: 28.3.1997 / 19:46:32 / cg"
+ layout leftOffset:((aspects at:#leftOffset) value) ? 0.
+ layout topOffset:((aspects at:#topOffset) value) ? 0.
+ layout leftFraction:((aspects at:#leftFraction) value) ? 0.
+ layout topFraction:((aspects at:#topFraction) value) ? 0.
+
+ layout leftAlignmentFraction:((aspects at:#leftAlignmentFraction) value) ? 0.
+ layout topAlignmentFraction:((aspects at:#topAlignmentFraction) value) ? 0.
+
+ ^ layout
+!
+
+getExtent
+ "returns current extent
+ "
+ ^ Point x:(((aspects at:#leftOffset) value) ? 0)
+ y:(((aspects at:#rightOffset) value) ? 0)
!
-updateLayout
- "layout changed but not selection
+getLayoutFrame
+ "returns current layout as layoutFrame
+ "
+ |layout|
+
+ layout := LayoutFrame new.
+
+ layout leftOffset:((aspects at:#leftOffset) value) ? 0.
+ layout rightOffset:((aspects at:#rightOffset) value) ? 0.
+ layout topOffset:((aspects at:#topOffset) value) ? 0.
+ layout bottomOffset:((aspects at:#bottomOffset) value) ? 0.
+ layout leftFraction:((aspects at:#leftFraction) value) ? 0.
+ layout rightFraction:((aspects at:#rightFraction) value) ? 0.
+ layout topFraction:((aspects at:#topFraction) value) ? 0.
+ layout bottomFraction:((aspects at:#bottomFraction) value) ? 0.
+
+ ^ layout
+!
+
+getLayoutOrigin
+ "returns current layout as layoutOrigin
"
- (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
- ]
- ]
+ |layout|
+
+ layout := LayoutOrigin new.
+
+ layout leftOffset:((aspects at:#leftOffset) value) ? 0.
+ layout topOffset:((aspects at:#topOffset) value) ? 0.
+ layout leftFraction:((aspects at:#leftFraction) value) ? 0.
+ layout topFraction:((aspects at:#topFraction) value) ? 0.
+
+ ^ layout
+!
+
+getPoint
+ "returns current layout as point
+ "
+ ^ Point x:(((aspects at:#absLeft) value) ? 0)
+ y:(((aspects at:#absTop) value) ? 0)
+!
+
+getRectangle
+ "returns current layout as rectangle
+ "
+ ^ Rectangle left:(((aspects at:#leftOffset) value) ? 0)
+ top:(((aspects at:#topOffset) value) ? 0)
+ right:(((aspects at:#rightOffset) value) ? 0)
+ bottom:(((aspects at:#bottomOffset) value) ? 0)
! !
-!UIPropertyView methodsFor:'layout fetch/write'!
+!UIPropertyView::Dimension methodsFor:'layout fetch'!
fetchAlignmentOrigin
"fetch alignmentOrigin
"
|layout type extent|
- type := builderView class layoutType:currentView.
- layout := currentView geometryLayout.
+ type := UIPainterView layoutType:forView.
+ layout := forView 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).
+ (aspects at:#leftOffset) value:(layout leftOffset).
+ (aspects at:#leftFraction) value:(layout leftFraction).
+ (aspects at:#topOffset) value:(layout topOffset).
+ (aspects at:#topFraction) value:(layout topFraction).
type == #AlignmentOrigin ifTrue:[
- (layoutAspects at:#leftAlignmentFraction) value:(layout leftAlignmentFraction).
- (layoutAspects at:#topAlignmentFraction) value:(layout topAlignmentFraction).
+ (aspects at:#leftAlignmentFraction) value:(layout leftAlignmentFraction).
+ (aspects at:#topAlignmentFraction) value:(layout topAlignmentFraction).
^ self
]
] ifFalse:[
- layout := currentView computeOrigin.
+ layout := forView computeOrigin.
- (layoutAspects at:#leftOffset) value:(layout x).
- (layoutAspects at:#leftFraction) value:0.
- (layoutAspects at:#topOffset) value:(layout y).
- (layoutAspects at:#topFraction) value:0.
+ (aspects at:#leftOffset) value:(layout x).
+ (aspects at:#leftFraction) value:0.
+ (aspects at:#topOffset) value:(layout y).
+ (aspects at:#topFraction) value:0.
].
- (layoutAspects at:#leftAlignmentFraction) value:0.
- (layoutAspects at:#topAlignmentFraction) value:0.
-
-
+ (aspects at:#leftAlignmentFraction) value:0.
+ (aspects at:#topAlignmentFraction) value:0.
!
fetchExtent
+ "fetch extent
+ "
|extent|
- extent := currentView computeExtent.
- (layoutAspects at:#leftOffset) value:(extent x).
- (layoutAspects at:#rightOffset) value:(extent y).
+ extent := forView computeExtent.
+
+ (aspects at:#leftOffset) value:(extent x).
+ (aspects at:#rightOffset) value:(extent y).
+
!
fetchLayoutFrame
@@ -1522,16 +1460,16 @@
"
|layout|
- layout := builderView class asLayoutFrameFromView:currentView.
+ layout := UIPainterView asLayoutFrameFromView:forView.
- (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).
+ (aspects at:#leftOffset) value:(layout leftOffset).
+ (aspects at:#leftFraction) value:(layout leftFraction).
+ (aspects at:#topOffset) value:(layout topOffset).
+ (aspects at:#topFraction) value:(layout topFraction).
+ (aspects at:#rightOffset) value:(layout rightOffset).
+ (aspects at:#bottomOffset) value:(layout bottomOffset).
+ (aspects at:#rightFraction) value:(layout rightFraction).
+ (aspects at:#bottomFraction) value:(layout bottomFraction).
!
fetchLayoutOrigin
@@ -1539,13 +1477,12 @@
"
|layout|
- layout := builderView class asLayoutFrameFromView:currentView.
+ layout := UIPainterView asLayoutFrameFromView:forView.
- (layoutAspects at:#leftOffset) value:(layout leftOffset).
- (layoutAspects at:#leftFraction) value:(layout leftFraction).
- (layoutAspects at:#topOffset) value:(layout topOffset).
- (layoutAspects at:#topFraction) value:(layout topFraction).
-
+ (aspects at:#leftOffset) value:(layout leftOffset).
+ (aspects at:#leftFraction) value:(layout leftFraction).
+ (aspects at:#topOffset) value:(layout topOffset).
+ (aspects at:#topFraction) value:(layout topFraction).
!
fetchPoint
@@ -1553,9 +1490,11 @@
"
|origin|
- origin := currentView computeOrigin.
- (layoutAspects at:#absLeft) value:(origin x).
- (layoutAspects at:#absTop) value:(origin y).
+ origin := forView computeOrigin.
+
+ (aspects at:#absLeft) value:(origin x).
+ (aspects at:#absTop) value:(origin y).
+
!
fetchRectangle
@@ -1563,121 +1502,34 @@
"
|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.
+ origin := forView computeOrigin.
+ corner := forView computeCorner.
- 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.
-
-!
+ (aspects at:#leftOffset) value:(origin x).
+ (aspects at:#rightOffset) value:(corner x).
+ (aspects at:#topOffset) value:(origin y).
+ (aspects at:#bottomOffset) value:(corner y).
-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'!
+!UIPropertyView::Dimension methodsFor:'layout make align'!
makeAlignBottomCenter
self makeAlignLeft:0.5 top:1
+
!
makeAlignBottomLeft
self makeAlignLeft:0 top:1
+
!
makeAlignBottomRight
self makeAlignLeft:1 top:1
+
!
makeAlignCenter
@@ -1688,21 +1540,21 @@
makeAlignLeft:leftAlignmentFraction top:topAlignmentFraction
|lAF tAF lO tO ext|
- lAF := (layoutAspects at:#leftAlignmentFraction) value ? 0.
- tAF := (layoutAspects at:#topAlignmentFraction) value ? 0.
- ext := currentView computeExtent.
+ lAF := (aspects at:#leftAlignmentFraction) value ? 0.
+ tAF := (aspects at:#topAlignmentFraction) value ? 0.
+ ext := forView computeExtent.
- (layoutAspects at:#leftAlignmentFraction) value:leftAlignmentFraction.
- (layoutAspects at:#topAlignmentFraction) value:topAlignmentFraction.
+ (aspects at:#leftAlignmentFraction) value:leftAlignmentFraction.
+ (aspects at:#topAlignmentFraction) value:topAlignmentFraction.
- lO := (layoutAspects at:#leftOffset) value ? 0.
- tO := (layoutAspects at:#topOffset) value ? 0.
+ lO := (aspects at:#leftOffset) value ? 0.
+ tO := (aspects 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).
+ (aspects at:#leftOffset) value:(lO rounded).
+ (aspects at:#topOffset) value:(tO rounded).
!
makeAlignLeftCenter
@@ -1728,17 +1580,20 @@
makeAlignTopRight
self makeAlignLeft:1 top:0
-!
+
+! !
+
+!UIPropertyView::Dimension methodsFor:'layout make relative/absolute'!
makeLayout:what xOrY:xOrY offset:aBool
|extent fraction offset fractSymb offsetSymb|
- extent := (currentView superView computeExtent) perform:xOrY.
+ extent := (forView superView computeExtent) perform:xOrY.
fractSymb := (what, 'Fraction') asSymbol.
offsetSymb := (what, 'Offset') asSymbol.
- fraction := (layoutAspects at:fractSymb) value.
- offset := (layoutAspects at:offsetSymb) value.
+ fraction := (aspects at:fractSymb) value.
+ offset := (aspects at:offsetSymb) value.
aBool ifTrue:[
offset := offset + ((fraction * extent) asInteger).
@@ -1750,10 +1605,8 @@
(fraction < 0.0) ifTrue:[ fraction := 0 ].
offset := 0.
].
- (layoutAspects at:offsetSymb) value:offset.
- (layoutAspects at:fractSymb) value:fraction.
-
-
+ (aspects at:offsetSymb) value:offset.
+ (aspects at:fractSymb) value:fraction.
!
makeOffsetAll
@@ -1762,11 +1615,13 @@
self makeOffsetRight.
self makeOffsetBottom.
+
!
makeOffsetBottom
self makeLayout:'bottom' xOrY:#y offset:true.
+
!
makeOffsetLeft
@@ -1777,6 +1632,7 @@
makeOffsetLeftTop
self makeOffsetLeft.
self makeOffsetTop.
+
!
makeOffsetRight
@@ -1795,11 +1651,13 @@
self makeRelativeRight.
self makeRelativeBottom.
+
!
makeRelativeBottom
self makeLayout:'bottom' xOrY:#y offset:false.
+
!
makeRelativeLeft
@@ -1810,6 +1668,7 @@
makeRelativeLeftTop
self makeRelativeLeft.
self makeRelativeTop.
+
!
makeRelativeRight
@@ -1822,137 +1681,82 @@
! !
-!UIPropertyView methodsFor:'private'!
+!UIPropertyView::Dimension methodsFor:'selection'!
+
+selection
+ ^ selection
-apply
- "apply current changes and write back to current view
- "
- modified ifTrue:[
- self modified:false.
+!
+
+selection:aLayoutType
+ |spec idx|
- self isSingleSelection ifTrue:[
- self isLayoutSpec ifFalse:[
- builderView updateFromSpec:specBeingEdited
- ] ifTrue:[
- layoutType notNil ifTrue:[
- self perform:(('write', layoutType asString) asSymbol)
- ]
- ]
- ]
- ]
+ selection == aLayoutType ifFalse:[
+ (selection := aLayoutType) notNil ifTrue:[
+ self perform:(('fetch', selection asString) asSymbol).
+ spec := ('specification', selection asString) asSymbol.
+ spec := self class perform:spec.
+ ].
+ self buildFromSpec:spec.
+ ].
+ idx := layoutTypes findFirst:[:type| type == aLayoutType ].
+ noteBook setSelection:idx.
+! !
+
+!UIPropertyView::Specification methodsFor:'accessing'!
+
+specEdited
+ "gets current edit specification
+ "
+ ^ specEdited
+
!
-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
+specEdited:aSpec
+ "sets current edit specification
"
- modified ifTrue:[
- specBeingEdited := builderView specFor:currentView.
- self reload
- ].
-!
-
-propertyList
- "returns property list
- "
- ^ builder componentAt:#propertyList
-!
+ |aspects|
-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.
-!
+ aSpec isNil ifTrue:[
+ specChannel := nil.
+ specEdited := nil.
+ ] ifFalse:[
+ specEdited class == aSpec class ifTrue:[
+ specEdited := aSpec.
+ specChannel value:specEdited.
+ ^ self modified:false.
+ ].
+ specEdited := aSpec.
+ aspects := IdentityDictionary new.
+ specChannel := specEdited asValue.
+ specEdited class addBindingsTo:aspects for:specEdited channel:specChannel
+ ].
+ self aspects:aspects.
+ self buildFromSpec:nil.
+
+
+! !
+
+!UIPropertyView::Specification methodsFor:'action'!
reload
- "relaod all attributes from current specification and update values
+ "reload specification
"
- 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.
+ specChannel notNil ifTrue:[
+ specChannel value:specEdited.
+ self modified:false.
+ ]
- 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$'
+
+
! !