diff --git a/src/BaselineOfPyramid/BaselineOfPyramid.class.st b/src/BaselineOfPyramid/BaselineOfPyramid.class.st index 6c5b12c2..63610d20 100644 --- a/src/BaselineOfPyramid/BaselineOfPyramid.class.st +++ b/src/BaselineOfPyramid/BaselineOfPyramid.class.st @@ -8,32 +8,62 @@ Class { BaselineOfPyramid >> baseline: spec [ - spec for: #common do: [ - spec postLoadDoIt: #postload:package:. - self dependencies: spec. - spec - package: #Pyramid; - package: #'Pyramid-IDE' with: [ spec requires: #( #Pyramid ) ]; - package: #'Pyramid-Bloc' - with: [ spec requires: #( #Pyramid #Bloc #BlocSerialization ) ]; - package: #'Pyramid-Tests' - with: [ spec requires: #( #Pyramid #'Pyramid-Bloc' ) ]; - package: #'Pyramid-Examples' - with: [ spec requires: #( #Pyramid ) ]; - package: #'Pyramid-IDE' with: [ spec requires: #( #Pyramid ) ] ] + "Common baseline for all Pharo versions" + spec for: #common do: [ self baselineForCommon: spec ] ] { #category : #baselines } -BaselineOfPyramid >> dependencies: spec [ +BaselineOfPyramid >> baselineForCommon: spec [ - spec - baseline: #Bloc - with: [ - spec repository: 'github://pharo-graphics/Bloc:master/src' ]. - spec - baseline: #BlocSerialization - with: [ - spec repository: 'github://OpenSmock/Bloc-Serialization:main/src' ]. + + spec preLoadDoIt: #preload:package:. + spec postLoadDoIt: #postload:package:. + + "Dependencies" + self blocDependencies: spec. + self toploDependencies: spec. + + "Packages" + self pyramidPackages: spec. + self blocPackages: spec. + self toploPackages: spec. + + "Groups" + spec group: 'default' with: #( 'BlocUI' 'ToploUI' ). "complete version" + spec group: 'BlocUI' with: self blocPackagesNames. "only Bloc" + spec group: 'ToploUI' with: self toploPackagesNames "only Bloc and Toplo" +] + +{ #category : #dependencies } +BaselineOfPyramid >> blocDependencies: spec [ + + spec + baseline: 'Bloc' + with: [ spec repository: 'github://pharo-graphics/Bloc:master/src' ]. + spec + baseline: 'BlocSerialization' + with: [ + spec repository: 'github://OpenSmock/Bloc-Serialization:main/src' ] +] + +{ #category : #packages } +BaselineOfPyramid >> blocPackages: spec [ + + spec + package: 'Pyramid-Bloc' + with: [ spec requires: #( 'Pyramid' 'Bloc' ) ]. + spec + package: 'Pyramid-Tests' + with: [ spec requires: #( 'Pyramid-Bloc' ) ]. + spec + package: 'Pyramid-Examples' + with: [ spec requires: #( 'Pyramid-Bloc' ) ] +] + +{ #category : #packages } +BaselineOfPyramid >> blocPackagesNames [ + + ^ #( 'Pyramid' 'Pyramid-Bloc' 'Pyramid-Tests' 'Pyramid-IDE' 'Pyramid-Examples' ) ] { #category : #actions } @@ -41,3 +71,52 @@ BaselineOfPyramid >> postload: loader package: packageSpec [ PyramidPluginManager reset ] + +{ #category : #actions } +BaselineOfPyramid >> preload: loader package: packageSpec [ + +] + +{ #category : #packages } +BaselineOfPyramid >> pyramidPackages: spec [ + + spec package: 'Pyramid'. + spec + package: 'Pyramid-IDE' + with: [ spec requires: #( 'Pyramid' ) ]. + +] + +{ #category : #dependencies } +BaselineOfPyramid >> toploDependencies: spec [ + + spec + baseline: 'Toplo' + with: [ spec repository: 'github://pharo-graphics/Toplo:master/src' ]. + spec + baseline: 'ToploSerialization' + with: [ spec repository: 'github://OpenSmock/Toplo-Serialization:main/src' ] +] + +{ #category : #packages } +BaselineOfPyramid >> toploPackages: spec [ + + spec + package: 'Pyramid-Toplo' + with: [ spec requires: #( 'Toplo' 'ToploSerialization') ]. + spec + package: 'Pyramid-Toplo-Tests' + with: [ spec requires: #( 'Pyramid-Toplo' ) ]. + spec + package: 'Pyramid-Toplo-Examples' + with: [ spec requires: #( 'Pyramid-Toplo' ) ] +] + +{ #category : #packages } +BaselineOfPyramid >> toploPackagesNames [ + + | packages | + packages := self blocPackagesNames asOrderedCollection. + packages addAll: #( 'Pyramid-Toplo' 'Pyramid-Toplo-Tests' 'Pyramid-Toplo-Examples' ). + ^ packages asArray +] diff --git a/src/Pyramid-Bloc/BlBackground.extension.st b/src/Pyramid-Bloc/BlBackground.extension.st index b114506e..5ac1c292 100644 --- a/src/Pyramid-Bloc/BlBackground.extension.st +++ b/src/Pyramid-Bloc/BlBackground.extension.st @@ -1,12 +1,5 @@ Extension { #name : #BlBackground } -{ #category : #'*Pyramid-Bloc' } -BlBackground >> = aBlBackground [ - - aBlBackground == self ifTrue: [ ^ true ]. - ^ aBlBackground class = self class -] - { #category : #'*Pyramid-Bloc' } BlBackground >> asForm [ diff --git a/src/Pyramid-Bloc/BlEllipseGeometry.extension.st b/src/Pyramid-Bloc/BlEllipseGeometry.extension.st deleted file mode 100644 index c3401b9b..00000000 --- a/src/Pyramid-Bloc/BlEllipseGeometry.extension.st +++ /dev/null @@ -1,8 +0,0 @@ -Extension { #name : #BlEllipseGeometry } - -{ #category : #'*Pyramid-Bloc' } -BlEllipseGeometry >> = anObject [ - - self == anObject ifTrue: [ ^ true ]. - ^ self class = anObject class -] diff --git a/src/Pyramid-Bloc/BlFlowLayout.extension.st b/src/Pyramid-Bloc/BlFlowLayout.extension.st index fd33d9ab..49929bdb 100644 --- a/src/Pyramid-Bloc/BlFlowLayout.extension.st +++ b/src/Pyramid-Bloc/BlFlowLayout.extension.st @@ -1,16 +1,5 @@ Extension { #name : #BlFlowLayout } -{ #category : #'*Pyramid-Bloc' } -BlFlowLayout >> = anObject [ - - self == anObject ifTrue: [ ^ true ]. - self class = anObject class ifFalse: [ ^ false ]. - self orientation = anObject orientation ifFalse: [ ^ false ]. - self horizontalAlignment = anObject horizontalAlignment ifFalse: [ ^ false ]. - self verticalAlignment = anObject verticalAlignment ifFalse: [ ^ false ]. - ^ true -] - { #category : #'*Pyramid-Bloc' } BlFlowLayout >> asIcon [ diff --git a/src/Pyramid-Bloc/BlGradientPaint.extension.st b/src/Pyramid-Bloc/BlGradientPaint.extension.st index 4ccffa85..82500ced 100644 --- a/src/Pyramid-Bloc/BlGradientPaint.extension.st +++ b/src/Pyramid-Bloc/BlGradientPaint.extension.st @@ -1,13 +1,5 @@ Extension { #name : #BlGradientPaint } -{ #category : #'*Pyramid-Bloc' } -BlGradientPaint >> = aBlPaint [ - - self == aBlPaint ifTrue: [ ^ true ]. - self class == aBlPaint class ifFalse: [ ^ false ]. - ^ self stops = aBlPaint stops -] - { #category : #'*Pyramid-Bloc' } BlGradientPaint >> asForm [ diff --git a/src/Pyramid-Bloc/BlImageBackground.extension.st b/src/Pyramid-Bloc/BlImageBackground.extension.st index 39db9c67..7211fa2b 100644 --- a/src/Pyramid-Bloc/BlImageBackground.extension.st +++ b/src/Pyramid-Bloc/BlImageBackground.extension.st @@ -1,12 +1,5 @@ Extension { #name : #BlImageBackground } -{ #category : #'*Pyramid-Bloc' } -BlImageBackground >> = aBlBackground [ - - super = aBlBackground ifFalse: [ ^ false ]. - ^ self image = aBlBackground image -] - { #category : #'*Pyramid-Bloc' } BlImageBackground >> asForm [ diff --git a/src/Pyramid-Bloc/BlLayout.extension.st b/src/Pyramid-Bloc/BlLayout.extension.st index ef45ada7..5225f479 100644 --- a/src/Pyramid-Bloc/BlLayout.extension.st +++ b/src/Pyramid-Bloc/BlLayout.extension.st @@ -1,12 +1,5 @@ Extension { #name : #BlLayout } -{ #category : #'*Pyramid-Bloc' } -BlLayout >> = anObject [ - - self == anObject ifTrue: [ ^ true ]. - ^ self class = anObject class -] - { #category : #'*Pyramid-Bloc' } BlLayout >> asIcon [ diff --git a/src/Pyramid-Bloc/BlLinearGradientPaint.extension.st b/src/Pyramid-Bloc/BlLinearGradientPaint.extension.st index 80fcf976..f09ee7b5 100644 --- a/src/Pyramid-Bloc/BlLinearGradientPaint.extension.st +++ b/src/Pyramid-Bloc/BlLinearGradientPaint.extension.st @@ -1,12 +1,5 @@ Extension { #name : #BlLinearGradientPaint } -{ #category : #'*Pyramid-Bloc' } -BlLinearGradientPaint >> = aBlPaint [ - - super = aBlPaint ifFalse: [ ^ false ]. - ^ self end = aBlPaint end and: [ self start = aBlPaint start ] -] - { #category : #'*Pyramid-Bloc' } BlLinearGradientPaint >> selectOnGradientPaintInput: aPyramidGradientPaintInputPresenter [ diff --git a/src/Pyramid-Bloc/BlRadialGradientPaint.extension.st b/src/Pyramid-Bloc/BlRadialGradientPaint.extension.st index 03af8766..b1c14f3f 100644 --- a/src/Pyramid-Bloc/BlRadialGradientPaint.extension.st +++ b/src/Pyramid-Bloc/BlRadialGradientPaint.extension.st @@ -1,12 +1,5 @@ Extension { #name : #BlRadialGradientPaint } -{ #category : #'*Pyramid-Bloc' } -BlRadialGradientPaint >> = aBlPaint [ - - super = aBlPaint ifFalse: [ ^ false ]. - ^ self innerCenter = aBlPaint innerCenter and: [ self innerRadius = aBlPaint innerRadius and: [ self outerCenter = aBlPaint outerCenter and: [ self outerRadius = aBlPaint outerRadius ] ] ] -] - { #category : #'*Pyramid-Bloc' } BlRadialGradientPaint >> selectOnGradientPaintInput: aPyramidGradientPaintInputPresenter [ diff --git a/src/Pyramid-Bloc/BlRectangleGeometry.extension.st b/src/Pyramid-Bloc/BlRectangleGeometry.extension.st deleted file mode 100644 index c78cf282..00000000 --- a/src/Pyramid-Bloc/BlRectangleGeometry.extension.st +++ /dev/null @@ -1,8 +0,0 @@ -Extension { #name : #BlRectangleGeometry } - -{ #category : #'*Pyramid-Bloc' } -BlRectangleGeometry >> = anObject [ - - self == anObject ifTrue: [ ^ true ]. - ^ self class = anObject class -] diff --git a/src/Pyramid-Bloc/BlRoundedRectangleGeometry.extension.st b/src/Pyramid-Bloc/BlRoundedRectangleGeometry.extension.st deleted file mode 100644 index e762b5ec..00000000 --- a/src/Pyramid-Bloc/BlRoundedRectangleGeometry.extension.st +++ /dev/null @@ -1,8 +0,0 @@ -Extension { #name : #BlRoundedRectangleGeometry } - -{ #category : #'*Pyramid-Bloc' } -BlRoundedRectangleGeometry >> = anObject [ - - self == anObject ifTrue: [ ^ true ]. - ^ self class = anObject class and: [ self cornerRadii = anObject cornerRadii ] -] diff --git a/src/Pyramid-Bloc/PyramidOpenFromSpacePlugin.class.st b/src/Pyramid-Bloc/PyramidOpenFromSpacePlugin.class.st new file mode 100644 index 00000000..60b1fd5a --- /dev/null +++ b/src/Pyramid-Bloc/PyramidOpenFromSpacePlugin.class.st @@ -0,0 +1,34 @@ +Class { + #name : #PyramidOpenFromSpacePlugin, + #superclass : #Object, + #traits : 'TPyramidPlugin', + #classTraits : 'TPyramidPlugin classTrait', + #instVars : [ + 'extensions' + ], + #category : #'Pyramid-Bloc-plugin-edit-on-running' +} + +{ #category : #adding } +PyramidOpenFromSpacePlugin >> addExtension: anExtension [ + + self extensions add: anExtension +] + +{ #category : #accessing } +PyramidOpenFromSpacePlugin >> extensions [ + + ^ extensions +] + +{ #category : #accessing } +PyramidOpenFromSpacePlugin >> initialize [ + + extensions := OrderedCollection new. +] + +{ #category : #adding } +PyramidOpenFromSpacePlugin >> removeExetension: anExtension [ + + self extensions remove: anExtension +] diff --git a/src/Pyramid-Bloc/PyramidPluginEditOnRunning.class.st b/src/Pyramid-Bloc/PyramidPluginEditOnRunning.class.st index a2d5baa1..0200d305 100644 --- a/src/Pyramid-Bloc/PyramidPluginEditOnRunning.class.st +++ b/src/Pyramid-Bloc/PyramidPluginEditOnRunning.class.st @@ -48,22 +48,20 @@ PyramidPluginEditOnRunning class >> cleanUp: anObject [ PyramidPluginEditOnRunning class >> doShortcutAction: anEvent [ | space editor whenClosedDo | - - self flag:'labordep: this is a temporary processing because this fork is due to a Bloc opened issue'. - (shortcutFork notNil and:[ shortcutFork isTerminated not ]) ifTrue:[ ^ self ]. - - shortcutFork := [ - - self editOnRunning ifTrue:[ - space := anEvent source space. - (self canEditSpace: space) ifTrue:[ - editor := space editWithPyramid. - whenClosedDo := editor window whenClosedDo. - editor window whenClosedDo: [ whenClosedDo value ]. - ]. - ]. - - ] forkAt: Processor userBackgroundPriority named: 'Pyramid edit-on-running plugin shortcut' + self flag: + 'labordep: this is a temporary processing because this fork is due to a Bloc opened issue'. + (shortcutFork notNil and: [ shortcutFork isTerminated not ]) ifTrue: [ + ^ self ]. + + shortcutFork := [ + self editOnRunning ifTrue: [ + space := anEvent source space. + (self canEditSpace: space) ifTrue: [ + editor := space editWithPyramid. + whenClosedDo := editor window whenClosedDo. + editor window whenClosedDo: [ whenClosedDo value ] ] ] ] + forkAt: Processor userBackgroundPriority + named: 'Pyramid edit-on-running plugin shortcut' ] { #category : #accessing } @@ -151,21 +149,3 @@ PyramidPluginEditOnRunning class >> uninstallBlUniverseListeners [ Beacon instance unsubscribe: self ] - -{ #category : #adding } -PyramidPluginEditOnRunning >> addPanelsOn: aPyramidSimpleWindow [ - - "do nothing" -] - -{ #category : #actions } -PyramidPluginEditOnRunning >> configureBuilder: aPyramidEditorBuilder [ - - "do nothing" -] - -{ #category : #connecting } -PyramidPluginEditOnRunning >> connectOn: aPyramidEditor [ - - "do nothing" -] diff --git a/src/Pyramid-Bloc/PyramidSpaceBuilder.class.st b/src/Pyramid-Bloc/PyramidSpaceBuilder.class.st index fe49da82..9e3ed14f 100644 --- a/src/Pyramid-Bloc/PyramidSpaceBuilder.class.st +++ b/src/Pyramid-Bloc/PyramidSpaceBuilder.class.st @@ -1,8 +1,8 @@ Class { #name : #PyramidSpaceBuilder, #superclass : #Object, - #traits : 'TPyramidEditorTransformation', - #classTraits : 'TPyramidEditorTransformation classTrait', + #traits : 'TPyramidEditorTransformation + TPyramidEditorSpaceIsReady', + #classTraits : 'TPyramidEditorTransformation classTrait + TPyramidEditorSpaceIsReady classTrait', #instVars : [ 'topMostOverlay', 'overlays', @@ -103,6 +103,7 @@ PyramidSpaceBuilder >> build [ self signalTransformationChanged. self topMostOverlay buildOn: self space root. + self signalSpaceIsReady. ^ self space ] @@ -111,8 +112,7 @@ PyramidSpaceBuilder >> editor: aPyramidEditor [ self extensions do: [ :each | each editor: aPyramidEditor ]. self extensions do: [ :each | - each projectModel: aPyramidEditor projectModel ]. - + each projectModel: aPyramidEditor projectModel ] ] { #category : #accessing } diff --git a/src/Pyramid-Bloc/PyramidSpacePlugin.class.st b/src/Pyramid-Bloc/PyramidSpacePlugin.class.st index 13307fd3..71abc227 100644 --- a/src/Pyramid-Bloc/PyramidSpacePlugin.class.st +++ b/src/Pyramid-Bloc/PyramidSpacePlugin.class.st @@ -62,7 +62,8 @@ PyramidSpacePlugin >> makePresenterWithBlSpace: aBlSpace [ aBlSpace host: host. aBlSpace addEventHandler: (BlEventHandler on: BlSpaceDestroyedEvent - do: [ :evt | self updateMorphInCaseOfFaillure: morph ]). + do: [ :evt | + self updateMorphInCaseOfFaillure: morph ]). self morphicPresenter morph: morph. self morphicPresenter whenDisplayDo: [ aBlSpace show ] diff --git a/src/Pyramid-Bloc/PyramidSwitchInputPresenter.class.st b/src/Pyramid-Bloc/PyramidSwitchInputPresenter.class.st index 7ad83d54..e60c6867 100644 --- a/src/Pyramid-Bloc/PyramidSwitchInputPresenter.class.st +++ b/src/Pyramid-Bloc/PyramidSwitchInputPresenter.class.st @@ -18,12 +18,11 @@ PyramidSwitchInputPresenter class >> blocToggleOff [ "This class has been generated using Pyramid. By: YannLEGOFF - 2023-07-19 09:03:05" + 2024-01-22 13:50:13" ^ '[ BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -42,11 +41,11 @@ PyramidSwitchInputPresenter class >> blocToggleOff [ #bottom : 0.0, #right : 0.0 }, - #padding : @10, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, #maxHeight : Float [ #infinity ], - #maxWidth : @11, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -54,13 +53,7 @@ PyramidSwitchInputPresenter class >> blocToggleOff [ #geometry : BlRoundedRectangleGeometry { #extent : Point [ 32.0, 16.0 ], #pathCache : BlPathCache { - #geometry : @13, - #strokedBounds : BlBounds { - #left : 0.0, - #top : 0.0, - #right : 32.0, - #bottom : 16.0 - } + #geometry : @12 }, #cornerRadii : BlCornerRadii { #topLeft : 8.5, @@ -111,14 +104,9 @@ PyramidSwitchInputPresenter class >> blocToggleOff [ #type : ''RECTANGLE'' } }, - #layout : BlBasicLayout { }, - #eventDispatcher : BlElementEventDispatcher { - #owner : @2, - #handlers : [ ] - } + #layout : BlBasicLayout { } }, BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -131,12 +119,12 @@ PyramidSwitchInputPresenter class >> blocToggleOff [ } }, #position : Point [ 2, 2.0 ], - #margin : @10, - #padding : @10, + #margin : @9, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, - #maxHeight : @11, - #maxWidth : @11, + #maxHeight : @10, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -144,13 +132,7 @@ PyramidSwitchInputPresenter class >> blocToggleOff [ #geometry : BlEllipseGeometry { #extent : Point [ 12.0, 12.0 ], #pathCache : BlPathCache { - #geometry : @44, - #strokedBounds : BlBounds { - #left : 0.0, - #top : 0.0, - #right : 12.0, - #bottom : 12.0 - } + #geometry : @39 } }, #background : BlPaintBackground { @@ -175,11 +157,7 @@ PyramidSwitchInputPresenter class >> blocToggleOff [ #type : ''ELLIPSE'' } }, - #layout : @32, - #eventDispatcher : BlElementEventDispatcher { - #owner : @35, - #handlers : [ ] - } + #layout : @30 } ]' ] @@ -189,12 +167,11 @@ PyramidSwitchInputPresenter class >> blocToggleOn [ "This class has been generated using Pyramid. By: YannLEGOFF - 2023-07-19 09:04:48" + 2024-01-22 13:50:48" ^ '[ BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -213,11 +190,11 @@ PyramidSwitchInputPresenter class >> blocToggleOn [ #bottom : 0.0, #right : 0.0 }, - #padding : @10, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, #maxHeight : Float [ #infinity ], - #maxWidth : @11, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -225,13 +202,7 @@ PyramidSwitchInputPresenter class >> blocToggleOn [ #geometry : BlRoundedRectangleGeometry { #extent : Point [ 32.0, 16.0 ], #pathCache : BlPathCache { - #geometry : @13, - #strokedBounds : BlBounds { - #left : 0.0, - #top : 0.0, - #right : 32.0, - #bottom : 16.0 - } + #geometry : @12 }, #cornerRadii : BlCornerRadii { #topLeft : 8.5, @@ -282,14 +253,9 @@ PyramidSwitchInputPresenter class >> blocToggleOn [ #type : ''RECTANGLE'' } }, - #layout : BlBasicLayout { }, - #eventDispatcher : BlElementEventDispatcher { - #owner : @2, - #handlers : [ ] - } + #layout : BlBasicLayout { } }, BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -302,12 +268,12 @@ PyramidSwitchInputPresenter class >> blocToggleOn [ } }, #position : Point [ 18, 2.0 ], - #margin : @10, - #padding : @10, + #margin : @9, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, - #maxHeight : @11, - #maxWidth : @11, + #maxHeight : @10, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -315,13 +281,7 @@ PyramidSwitchInputPresenter class >> blocToggleOn [ #geometry : BlEllipseGeometry { #extent : Point [ 12.0, 12.0 ], #pathCache : BlPathCache { - #geometry : @44, - #strokedBounds : BlBounds { - #left : 0.0, - #top : 0.0, - #right : 12.0, - #bottom : 12.0 - } + #geometry : @39 } }, #background : BlPaintBackground { @@ -346,11 +306,7 @@ PyramidSwitchInputPresenter class >> blocToggleOn [ #type : ''ELLIPSE'' } }, - #layout : @32, - #eventDispatcher : BlElementEventDispatcher { - #owner : @35, - #handlers : [ ] - } + #layout : @30 } ]' ] @@ -360,12 +316,11 @@ PyramidSwitchInputPresenter class >> blocToggleUncertain [ "This class has been generated using Pyramid. By: YannLEGOFF - 2023-07-19 10:03:54" + 2024-01-22 13:51:37" ^ '[ BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -384,11 +339,11 @@ PyramidSwitchInputPresenter class >> blocToggleUncertain [ #bottom : 0.0, #right : 0.0 }, - #padding : @10, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, #maxHeight : Float [ #infinity ], - #maxWidth : @11, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -396,13 +351,7 @@ PyramidSwitchInputPresenter class >> blocToggleUncertain [ #geometry : BlRoundedRectangleGeometry { #extent : Point [ 32.0, 16.0 ], #pathCache : BlPathCache { - #geometry : @13, - #strokedBounds : BlBounds { - #left : 0.0, - #top : 0.0, - #right : 32.0, - #bottom : 16.0 - } + #geometry : @12 }, #cornerRadii : BlCornerRadii { #topLeft : 8.5, @@ -453,14 +402,9 @@ PyramidSwitchInputPresenter class >> blocToggleUncertain [ #type : ''RECTANGLE'' } }, - #layout : BlBasicLayout { }, - #eventDispatcher : BlElementEventDispatcher { - #owner : @2, - #handlers : [ ] - } + #layout : BlBasicLayout { } }, BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -473,12 +417,12 @@ PyramidSwitchInputPresenter class >> blocToggleUncertain [ } }, #position : Point [ 10.0, 2.0 ], - #margin : @10, - #padding : @10, + #margin : @9, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, - #maxHeight : @11, - #maxWidth : @11, + #maxHeight : @10, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -486,13 +430,7 @@ PyramidSwitchInputPresenter class >> blocToggleUncertain [ #geometry : BlEllipseGeometry { #extent : Point [ 12.0, 12.0 ], #pathCache : BlPathCache { - #geometry : @44, - #strokedBounds : BlBounds { - #left : 0.0, - #top : 0.0, - #right : 12.0, - #bottom : 12.0 - } + #geometry : @39 } }, #background : BlPaintBackground { @@ -517,11 +455,7 @@ PyramidSwitchInputPresenter class >> blocToggleUncertain [ #type : ''ELLIPSE'' } }, - #layout : @32, - #eventDispatcher : BlElementEventDispatcher { - #owner : @35, - #handlers : [ ] - } + #layout : @30 } ]' ] diff --git a/src/Pyramid-Bloc/PyramidTreePresenter.class.st b/src/Pyramid-Bloc/PyramidTreePresenter.class.st index 9d3f7fcf..8cc16007 100644 --- a/src/Pyramid-Bloc/PyramidTreePresenter.class.st +++ b/src/Pyramid-Bloc/PyramidTreePresenter.class.st @@ -81,7 +81,10 @@ PyramidTreePresenter >> initializePresenters [ beMultipleSelection; beResizable; roots: { }; - children: [ :each | each children ]; + children: [ :each | + each shouldSerializedChildren not + ifTrue: [ { } ] + ifFalse: [ each children ] ]; contextMenu: [ self actionEditorMenu ]; whenSelectionChangedDo: [ :selection | self actionSelectionChanged: selection ]; @@ -90,12 +93,12 @@ PyramidTreePresenter >> initializePresenters [ columns := OrderedCollection new. buttonAddToFirstLevel := SpButtonPresenter new - label: 'Add new element'; - icon: (self iconNamed: #add); - action: [ self actionAddNewElement ]; - help: - 'Add a new element on the first level of the design.'; - yourself + label: 'Add new element'; + icon: (self iconNamed: #add); + action: [ self actionAddNewElement ]; + help: + 'Add a new element on the first level of the design.'; + yourself ] { #category : #accessing } diff --git a/src/Pyramid-Bloc/PyramidVisibilityInputPresenter.class.st b/src/Pyramid-Bloc/PyramidVisibilityInputPresenter.class.st index 800d0db4..b05f3739 100644 --- a/src/Pyramid-Bloc/PyramidVisibilityInputPresenter.class.st +++ b/src/Pyramid-Bloc/PyramidVisibilityInputPresenter.class.st @@ -15,12 +15,11 @@ PyramidVisibilityInputPresenter class >> blocGone [ "This class has been generated using Pyramid. By: YannLEGOFF - 2023-08-02 15:00:30" + 2024-01-22 12:04:35" ^ '[ BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -39,11 +38,11 @@ PyramidVisibilityInputPresenter class >> blocGone [ #bottom : 0.0, #right : 0.0 }, - #padding : @10, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, #maxHeight : Float [ #infinity ], - #maxWidth : @11, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -62,16 +61,12 @@ PyramidVisibilityInputPresenter class >> blocGone [ #userData : IdentityDictionary { #elementId : BlElementNamedId { #identifier : #C - } + }, + #shouldHandleMousePickOutsideEvent : false }, - #layout : BlBasicLayout { }, - #eventDispatcher : BlElementEventDispatcher { - #owner : @2, - #handlers : [ ] - } + #layout : BlBasicLayout { } }, BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -84,12 +79,12 @@ PyramidVisibilityInputPresenter class >> blocGone [ } }, #position : Point [ 11, 3 ], - #margin : @10, - #padding : @10, + #margin : @9, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, - #maxHeight : @11, - #maxWidth : @11, + #maxHeight : @10, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -108,13 +103,10 @@ PyramidVisibilityInputPresenter class >> blocGone [ #userData : IdentityDictionary { #elementId : BlElementNamedId { #identifier : #E - } + }, + #shouldHandleMousePickOutsideEvent : false }, - #layout : @18, - #eventDispatcher : BlElementEventDispatcher { - #owner : @21, - #handlers : [ ] - } + #layout : @17 } ]' ] @@ -124,12 +116,11 @@ PyramidVisibilityInputPresenter class >> blocHidden [ "This class has been generated using Pyramid. By: YannLEGOFF - 2023-08-02 15:00:12" + 2024-01-22 12:05:28" ^ '[ BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -148,11 +139,11 @@ PyramidVisibilityInputPresenter class >> blocHidden [ #bottom : 0.0, #right : 0.0 }, - #padding : @10, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, #maxHeight : Float [ #infinity ], - #maxWidth : @11, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -173,14 +164,9 @@ PyramidVisibilityInputPresenter class >> blocHidden [ #identifier : #C } }, - #layout : BlBasicLayout { }, - #eventDispatcher : BlElementEventDispatcher { - #owner : @2, - #handlers : [ ] - } + #layout : BlBasicLayout { } }, BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -193,12 +179,12 @@ PyramidVisibilityInputPresenter class >> blocHidden [ } }, #position : Point [ 11, 3 ], - #margin : @10, - #padding : @10, + #margin : @9, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, - #maxHeight : @11, - #maxWidth : @11, + #maxHeight : @10, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -219,14 +205,9 @@ PyramidVisibilityInputPresenter class >> blocHidden [ #identifier : #D } }, - #layout : @18, - #eventDispatcher : BlElementEventDispatcher { - #owner : @21, - #handlers : [ ] - } + #layout : @17 }, BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -239,12 +220,12 @@ PyramidVisibilityInputPresenter class >> blocHidden [ } }, #position : Point [ 22, 3 ], - #margin : @10, - #padding : @10, + #margin : @9, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, - #maxHeight : @11, - #maxWidth : @11, + #maxHeight : @10, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -265,11 +246,7 @@ PyramidVisibilityInputPresenter class >> blocHidden [ #identifier : #E } }, - #layout : @18, - #eventDispatcher : BlElementEventDispatcher { - #owner : @37, - #handlers : [ ] - } + #layout : @17 } ]' ] @@ -279,12 +256,11 @@ PyramidVisibilityInputPresenter class >> blocVisibilityUnknow [ "This class has been generated using Pyramid. By: YannLEGOFF - 2023-08-02 15:04:00" + 2024-01-22 12:06:04" ^ '[ BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -303,11 +279,11 @@ PyramidVisibilityInputPresenter class >> blocVisibilityUnknow [ #bottom : 0.0, #right : 0.0 }, - #padding : @10, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, #maxHeight : Float [ #infinity ], - #maxWidth : @11, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -338,14 +314,9 @@ PyramidVisibilityInputPresenter class >> blocVisibilityUnknow [ #identifier : #C } }, - #layout : BlBasicLayout { }, - #eventDispatcher : BlElementEventDispatcher { - #owner : @2, - #handlers : [ ] - } + #layout : BlBasicLayout { } }, BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -358,12 +329,12 @@ PyramidVisibilityInputPresenter class >> blocVisibilityUnknow [ } }, #position : Point [ 11, 3 ], - #margin : @10, - #padding : @10, + #margin : @9, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, - #maxHeight : @11, - #maxWidth : @11, + #maxHeight : @10, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -394,14 +365,9 @@ PyramidVisibilityInputPresenter class >> blocVisibilityUnknow [ #identifier : #D } }, - #layout : @22, - #eventDispatcher : BlElementEventDispatcher { - #owner : @25, - #handlers : [ ] - } + #layout : @21 }, BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -414,12 +380,12 @@ PyramidVisibilityInputPresenter class >> blocVisibilityUnknow [ } }, #position : Point [ 22, 3 ], - #margin : @10, - #padding : @10, + #margin : @9, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, - #maxHeight : @11, - #maxWidth : @11, + #maxHeight : @10, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -450,11 +416,7 @@ PyramidVisibilityInputPresenter class >> blocVisibilityUnknow [ #identifier : #E } }, - #layout : @22, - #eventDispatcher : BlElementEventDispatcher { - #owner : @45, - #handlers : [ ] - } + #layout : @21 } ]' ] @@ -464,12 +426,11 @@ PyramidVisibilityInputPresenter class >> blocVisible [ "This class has been generated using Pyramid. By: YannLEGOFF - 2023-08-02 14:59:48" + 2024-01-22 12:06:38" ^ '[ BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -488,11 +449,11 @@ PyramidVisibilityInputPresenter class >> blocVisible [ #bottom : 0.0, #right : 0.0 }, - #padding : @10, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, #maxHeight : Float [ #infinity ], - #maxWidth : @11, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -513,14 +474,9 @@ PyramidVisibilityInputPresenter class >> blocVisible [ #identifier : #C } }, - #layout : BlBasicLayout { }, - #eventDispatcher : BlElementEventDispatcher { - #owner : @2, - #handlers : [ ] - } + #layout : BlBasicLayout { } }, BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -533,12 +489,12 @@ PyramidVisibilityInputPresenter class >> blocVisible [ } }, #position : Point [ 11, 3 ], - #margin : @10, - #padding : @10, + #margin : @9, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, - #maxHeight : @11, - #maxWidth : @11, + #maxHeight : @10, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -559,14 +515,9 @@ PyramidVisibilityInputPresenter class >> blocVisible [ #identifier : #D } }, - #layout : @18, - #eventDispatcher : BlElementEventDispatcher { - #owner : @21, - #handlers : [ ] - } + #layout : @17 }, BlElement { - #children : BlChildrenArray [ ], #constraints : BlLayoutCommonConstraints { #vertical : BlLayoutCommonConstraintsAxis { #resizer : BlLayoutExactResizer { @@ -579,12 +530,12 @@ PyramidVisibilityInputPresenter class >> blocVisible [ } }, #position : Point [ 22, 3 ], - #margin : @10, - #padding : @10, + #margin : @9, + #padding : @9, #minHeight : 0.0, #minWidth : 0.0, - #maxHeight : @11, - #maxWidth : @11, + #maxHeight : @10, + #maxWidth : @10, #ignoredByLayout : false, #accountTransformation : false }, @@ -605,11 +556,7 @@ PyramidVisibilityInputPresenter class >> blocVisible [ #identifier : #E } }, - #layout : @18, - #eventDispatcher : BlElementEventDispatcher { - #owner : @37, - #handlers : [ ] - } + #layout : @17 } ]' ] diff --git a/src/Pyramid-Bloc/TPyramidEditorSpaceIsReady.trait.st b/src/Pyramid-Bloc/TPyramidEditorSpaceIsReady.trait.st new file mode 100644 index 00000000..f773eebc --- /dev/null +++ b/src/Pyramid-Bloc/TPyramidEditorSpaceIsReady.trait.st @@ -0,0 +1,32 @@ +Trait { + #name : #TPyramidEditorSpaceIsReady, + #instVars : [ + 'spaceIsReadyObservers' + ], + #category : #'Pyramid-Bloc-plugin-space-extensions' +} + +{ #category : #adding } +TPyramidEditorSpaceIsReady >> addSpaceIsReadyObserver: anObject [ + + self spaceIsReadyObservers add: anObject +] + +{ #category : #adding } +TPyramidEditorSpaceIsReady >> removeSpaceIsReadyObserver: anObject [ + + self spaceIsReadyObservers remove: anObject +] + +{ #category : #signalling } +TPyramidEditorSpaceIsReady >> signalSpaceIsReady [ + + self spaceIsReadyObservers do: [ :each | each informSpaceIsReady ] +] + +{ #category : #accessing } +TPyramidEditorSpaceIsReady >> spaceIsReadyObservers [ + + spaceIsReadyObservers ifNil: [ spaceIsReadyObservers := Set new ]. + ^ spaceIsReadyObservers +] diff --git a/src/Pyramid-Bloc/TPyramidEditorSpaceIsReadyObserver.trait.st b/src/Pyramid-Bloc/TPyramidEditorSpaceIsReadyObserver.trait.st new file mode 100644 index 00000000..657aed6b --- /dev/null +++ b/src/Pyramid-Bloc/TPyramidEditorSpaceIsReadyObserver.trait.st @@ -0,0 +1,8 @@ +Trait { + #name : #TPyramidEditorSpaceIsReadyObserver, + #category : #'Pyramid-Bloc-plugin-space-extensions' +} + +{ #category : #'as yet unclassified' } +TPyramidEditorSpaceIsReadyObserver >> informSpaceIsReady [ +] diff --git a/src/Pyramid-Bloc/TPyramidOpenFromSpacePluginExtension.trait.st b/src/Pyramid-Bloc/TPyramidOpenFromSpacePluginExtension.trait.st new file mode 100644 index 00000000..a69ff7f0 --- /dev/null +++ b/src/Pyramid-Bloc/TPyramidOpenFromSpacePluginExtension.trait.st @@ -0,0 +1,18 @@ +Trait { + #name : #TPyramidOpenFromSpacePluginExtension, + #category : #'Pyramid-Bloc-plugin-edit-on-running' +} + +{ #category : #'as yet unclassified' } +TPyramidOpenFromSpacePluginExtension >> configureCloseOnSpace: aSpace [ + "Do something with the space when you close the editor" + + +] + +{ #category : #'as yet unclassified' } +TPyramidOpenFromSpacePluginExtension >> configureOpenFromSpace: aSpace [ + "Do something with the space when you open the editor" + + +] diff --git a/src/Pyramid-Tests/PyramidPropertiesManagerTest.class.st b/src/Pyramid-Tests/PyramidPropertiesManagerTest.class.st index 379a5629..8a704bc4 100644 --- a/src/Pyramid-Tests/PyramidPropertiesManagerTest.class.st +++ b/src/Pyramid-Tests/PyramidPropertiesManagerTest.class.st @@ -5,11 +5,41 @@ Class { } { #category : #tests } -PyramidPropertiesManagerTest >> testAddProperty [ +PyramidPropertiesManagerTest >> testAddAllProperties [ + | manager prop1 prop2 prop3 | + manager := PyramidPropertiesManager new commandExecutor: Object new; yourself. + prop1 := PyramidProperty new + name: 'Porp1'; + command: PyramidSimpleMockCommand new; + pyramidInputPresenterClass: PyramidNumberInputPresenter; + yourself. + prop2 := PyramidProperty new + name: 'Porp2'; + command: PyramidSimpleMockCommand new; + pyramidInputPresenterClass: PyramidNumberInputPresenter; + yourself. + prop3 := PyramidProperty new + name: 'Porp3'; + command: PyramidSimpleMockCommand new; + pyramidInputPresenterClass: PyramidNumberInputPresenter; + yourself. - | manager prop1 prop2 prop3| - manager := PyramidPropertiesManager new. + manager addAllProperties: { prop1. prop2 . prop3 }. + self assert: (manager properties includes: prop1). + self assert: (manager properties includes: prop2). + self assert: (manager properties includes: prop3). + self assert: manager commandExecutor equals: prop1 commandExecutor. + self assert: manager commandExecutor equals: prop2 commandExecutor. + self assert: manager commandExecutor equals: prop3 commandExecutor. +] + +{ #category : #tests } +PyramidPropertiesManagerTest >> testAddProperty [ + + | manager prop1 prop2 prop3 | + manager := PyramidPropertiesManager new commandExecutor: Object new; + yourself. prop1 := PyramidProperty new name: 'Porp1'; command: PyramidSimpleMockCommand new; @@ -32,6 +62,9 @@ PyramidPropertiesManagerTest >> testAddProperty [ self assert: (manager properties includes: prop1). self assert: (manager properties includes: prop2). self assert: (manager properties includes: prop3). + self assert: manager commandExecutor equals: prop1 commandExecutor. + self assert: manager commandExecutor equals: prop2 commandExecutor. + self assert: manager commandExecutor equals: prop3 commandExecutor ] { #category : #tests } @@ -99,3 +132,98 @@ PyramidPropertiesManagerTest >> testCommandExecutor [ self assert: prop2 commandExecutor equals: fake2. self assert: prop3 commandExecutor equals: fake2 ] + +{ #category : #tests } +PyramidPropertiesManagerTest >> testRemoveAllProperties [ + + | manager prop1 prop2 prop3 | + manager := PyramidPropertiesManager new + commandExecutor: Object new; + yourself. + prop1 := PyramidProperty new + name: 'Porp1'; + command: PyramidSimpleMockCommand new; + pyramidInputPresenterClass: PyramidNumberInputPresenter; + yourself. + prop2 := PyramidProperty new + name: 'Porp2'; + command: PyramidSimpleMockCommand new; + pyramidInputPresenterClass: PyramidNumberInputPresenter; + yourself. + prop3 := PyramidProperty new + name: 'Porp3'; + command: PyramidSimpleMockCommand new; + pyramidInputPresenterClass: PyramidNumberInputPresenter; + yourself. + + manager addAllProperties: { + prop1. + prop2. + prop3 }. + self assert: (manager properties includes: prop1). + self assert: (manager properties includes: prop2). + self assert: (manager properties includes: prop3). + self assert: manager commandExecutor equals: prop1 commandExecutor. + self assert: manager commandExecutor equals: prop2 commandExecutor. + self assert: manager commandExecutor equals: prop3 commandExecutor. + manager removeAllProperties. + self deny: (manager properties includes: prop1). + self deny: (manager properties includes: prop2). + self deny: (manager properties includes: prop3). + +] + +{ #category : #tests } +PyramidPropertiesManagerTest >> testRemoveProperty [ + + | manager prop1 prop2 prop3 hasFailed | + manager := PyramidPropertiesManager new + commandExecutor: Object new; + yourself. + prop1 := PyramidProperty new + name: 'Porp1'; + command: PyramidSimpleMockCommand new; + pyramidInputPresenterClass: PyramidNumberInputPresenter; + yourself. + prop2 := PyramidProperty new + name: 'Porp2'; + command: PyramidSimpleMockCommand new; + pyramidInputPresenterClass: PyramidNumberInputPresenter; + yourself. + prop3 := PyramidProperty new + name: 'Porp3'; + command: PyramidSimpleMockCommand new; + pyramidInputPresenterClass: PyramidNumberInputPresenter; + yourself. + + manager addAllProperties: { + prop1. + prop2. + prop3 }. + self assert: (manager properties includes: prop1). + self assert: (manager properties includes: prop2). + self assert: (manager properties includes: prop3). + self assert: manager commandExecutor equals: prop1 commandExecutor. + self assert: manager commandExecutor equals: prop2 commandExecutor. + self assert: manager commandExecutor equals: prop3 commandExecutor. + manager removeProperty: prop1. + self deny: (manager properties includes: prop1). + self assert: (manager properties includes: prop2). + self assert: (manager properties includes: prop3). + manager removeProperty: prop2. + self deny: (manager properties includes: prop1). + self deny: (manager properties includes: prop2). + self assert: (manager properties includes: prop3). + manager removeProperty: prop3. + self deny: (manager properties includes: prop1). + self deny: (manager properties includes: prop2). + self deny: (manager properties includes: prop3). + hasFailed := false. + [ manager removeProperty: prop3 ] + on: PyramidPropertyNotInstalledError + do: [ :error | + self assert: error manager equals: manager. + self assert: error property equals: prop3. + hasFailed := true ]. + self assert: hasFailed +] diff --git a/src/Pyramid-Toplo-Examples/PyramidToploExamples.class.st b/src/Pyramid-Toplo-Examples/PyramidToploExamples.class.st new file mode 100644 index 00000000..3a26b2ce --- /dev/null +++ b/src/Pyramid-Toplo-Examples/PyramidToploExamples.class.st @@ -0,0 +1,4589 @@ +Class { + #name : #PyramidToploExamples, + #superclass : #Object, + #category : #'Pyramid-Toplo-Examples' +} + +{ #category : #'pyramid-serialized-bloc' } +PyramidToploExamples class >> buttons [ + "This class has been generated using Pyramid. + + By: YannLEGOFF + 2024-02-01 17:33:55" + + + ^ '[ + ToElement { + #children : BlChildrenArray [ + BlElement { + #children : BlChildrenArray [ + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutFitContentResizer { } + }, + #constraints : { + Class [ #BlLinearLayout ] : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : BlTopAlignment { } + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : BlHorizontalStartAlignment { } + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : BlInsets { + #top : 0.0, + #left : 0.0, + #bottom : 0.0, + #right : 0.0 + }, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : Float [ #infinity ], + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @14, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 107.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @24 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 53.5, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : Color { + #red : 0.08602150537634409, + #green : 0.4662756598240469, + #blue : 1.0, + #alpha : 1.0 + } + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : BlStrokeLineButtCap { }, + #lineJoin : BlStrokeLineMiterJoin { }, + #miterLimit : 4.0, + #dashArray : [ ], + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : @31 + } + } + }, + #userData : IdentityDictionary { + #elementId : BlElementNamedId { + #identifier : #buttonA + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : BlVerticalCenterAlignment { } + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : BlHorizontalCenterAlignment { } + }, + #weight : 1 + }, + Class [ #BlFrameLayout ] : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @45, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlDefaultVisuals { }, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @62, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : Color [ #white ] + } + ], + #rope : BlCollectionRope { + #collection : ''Primary Button'' + } + } + }, + #enabled : true, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : true, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : BlNullVerticalAlignment { }, + #horizontalAlignment : BlNullHorizontalAlignment { }, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @87 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : true, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + }, + #primary : ToStampProperty { + #name : #primary, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @104 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @112, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 104.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @118 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 52.0, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : Color { + #red : 0.8514173998044966, + #green : 0.8514173998044966, + #blue : 0.8514173998044966, + #alpha : 1.0 + } + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : @35, + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : Color [ #white ] + } + } + }, + #userData : IdentityDictionary { + #elementId : BlElementNamedId { + #identifier : #buttonB + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @137, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @150, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : Color [ #black ] + } + ], + #rope : BlCollectionRope { + #collection : ''Default Button'' + } + } + }, + #enabled : true, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : true, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @175 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : true, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @189 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @197, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 105.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @203 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 52.5, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : @125 + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : [ + 3, + 3 + ], + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : @129 + } + } + }, + #userData : IdentityDictionary { + #elementId : BlElementNamedId { + #identifier : #buttonC + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @221, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @234, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : @163 + } + ], + #rope : BlCollectionRope { + #collection : ''Dashed Button'' + } + } + }, + #enabled : true, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : true, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @258 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : true, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + }, + #dashed : ToStampProperty { + #name : #dashed, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @273 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @281, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 86.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @287 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 43.0, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : Color { + #red : 0.0, + #green : 0.0, + #blue : 0.0, + #alpha : 0.0 + } + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : @35, + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : @129 + } + } + }, + #userData : IdentityDictionary { + #elementId : BlElementNamedId { + #identifier : #buttonD + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @305, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @318, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : @163 + } + ], + #rope : BlCollectionRope { + #collection : ''Text Button'' + } + } + }, + #enabled : true, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : true, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @342 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : true, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + }, + #text : ToStampProperty { + #name : #text, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @357 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @365, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 85.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @371 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 42.5, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : @294 + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : @35, + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : @129 + } + } + }, + #userData : IdentityDictionary { + #elementId : BlElementNamedId { + #identifier : #buttonE + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @388, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @401, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : Color { + #red : 0.08602150537634409, + #green : 0.4662756598240469, + #blue : 1.0, + #alpha : 1.0 + } + } + ], + #rope : BlCollectionRope { + #collection : ''Link Button'' + } + } + }, + #enabled : true, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : true, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @426 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : true, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + }, + #link : ToStampProperty { + #name : #link, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @441 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + } + ], + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + Class [ #BlFlowLayout ] : BlFlowLayoutConstraints { + #vertical : BlFlowLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlFlowLayoutConstraintsHorizontal { + #alignment : @18 + }, + #newLine : false, + #weight : 0, + #display : BlFlowLayoutInline { } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 5.0, + #left : 5.0, + #bottom : 5.0, + #right : 5.0 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @448, + #previouslyAccessedConstraintsType : @447, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @455 + }, + #shouldUseLargestChild : false, + #cellSpacing : 5.0, + #interspace : 0.0 + } + }, + BlElement { + #children : BlChildrenArray [ + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @465, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 107.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @471 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 53.5, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : Color { + #red : 0.0, + #green : 0.0, + #blue : 0.0, + #alpha : 0.2 + } + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : @35, + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : Color { + #red : 0.0, + #green : 0.0, + #blue : 0.0, + #alpha : 0.0392156862745098 + } + } + } + }, + #userData : IdentityDictionary { + #elementId : BlElementNamedId { + #identifier : #buttonA + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @490, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @503, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : Color [ #lightGray ] + } + ], + #rope : BlCollectionRope { + #collection : ''Primary Button'' + } + } + }, + #enabled : false, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : false, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @528 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : false, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + }, + #primary : ToStampProperty { + #name : #primary, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @543 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @551, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 104.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @557 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 52.0, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : @478 + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : @35, + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : @482 + } + } + }, + #userData : IdentityDictionary { + #elementId : BlElementNamedId { + #identifier : #buttonB + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @574, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @587, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : @516 + } + ], + #rope : BlCollectionRope { + #collection : ''Default Button'' + } + } + }, + #enabled : false, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : false, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @611 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : false, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @625 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @633, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 105.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @639 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 52.5, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : @478 + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : @211, + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : @482 + } + } + }, + #userData : IdentityDictionary { + #elementId : BlElementNamedId { + #identifier : #buttonC + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @656, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @669, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : @516 + } + ], + #rope : BlCollectionRope { + #collection : ''Dashed Button'' + } + } + }, + #enabled : false, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : false, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @693 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : false, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + }, + #dashed : ToStampProperty { + #name : #dashed, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @708 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @716, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 86.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @722 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 43.0, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : @294 + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : @35, + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : @294 + } + } + }, + #userData : IdentityDictionary { + #elementId : BlElementNamedId { + #identifier : #buttonD + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @739, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @752, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : @516 + } + ], + #rope : BlCollectionRope { + #collection : ''Text Button'' + } + } + }, + #enabled : false, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : false, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @776 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : false, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + }, + #text : ToStampProperty { + #name : #text, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @791 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @799, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 85.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @805 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 42.5, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : @294 + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : @35, + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : @294 + } + } + }, + #userData : IdentityDictionary { + #elementId : BlElementNamedId { + #identifier : #buttonE + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @822, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @835, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : @516 + } + ], + #rope : BlCollectionRope { + #collection : ''Link Button'' + } + } + }, + #enabled : false, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : false, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @859 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : false, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + }, + #link : ToStampProperty { + #name : #link, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @874 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + } + ], + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @447 : BlFlowLayoutConstraints { + #vertical : BlFlowLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlFlowLayoutConstraintsHorizontal { + #alignment : @18 + }, + #newLine : false, + #weight : 0, + #display : @451 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 5.0, + #left : 5.0, + #bottom : 5.0, + #right : 5.0 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @880, + #previouslyAccessedConstraintsType : @447, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @886 + }, + #shouldUseLargestChild : false, + #cellSpacing : 5.0, + #interspace : 0.0 + } + }, + BlElement { + #children : BlChildrenArray [ + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @896, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 107.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @902 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 53.5, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : Color { + #red : 1.0, + #green : 0.3020527859237537, + #blue : 0.3098729227761486, + #alpha : 1.0 + } + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : @35, + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : @909 + } + } + }, + #userData : IdentityDictionary { + #elementId : BlElementNamedId { + #identifier : #buttonA + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @920, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @933, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : @75 + } + ], + #rope : BlCollectionRope { + #collection : ''Primary Button'' + } + } + }, + #enabled : true, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : true, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @957 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : true, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + }, + #danger : ToStampProperty { + #name : #danger, + #value : true + }, + #primary : ToStampProperty { + #name : #primary, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @973 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @981, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 104.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @987 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 52.0, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : @909 + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : @35, + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : @129 + } + } + }, + #userData : IdentityDictionary { + #elementId : BlElementNamedId { + #identifier : #buttonB + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @1004, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @1017, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : Color { + #red : 1.0, + #green : 0.3020527859237537, + #blue : 0.3098729227761486, + #alpha : 1.0 + } + } + ], + #rope : BlCollectionRope { + #collection : ''Default Button'' + } + } + }, + #enabled : true, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : true, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @1042 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : true, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + }, + #danger : ToStampProperty { + #name : #danger, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @1057 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @1065, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 105.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @1071 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 52.5, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : @909 + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : @211, + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : @129 + } + } + }, + #userData : IdentityDictionary { + #elementId : BlElementNamedId { + #identifier : #buttonC + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @1088, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @1101, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : @1030 + } + ], + #rope : BlCollectionRope { + #collection : ''Dashed Button'' + } + } + }, + #enabled : true, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : true, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @1125 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : true, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + }, + #dashed : ToStampProperty { + #name : #dashed, + #value : true + }, + #danger : ToStampProperty { + #name : #danger, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @1141 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @1149, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 86.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @1155 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 43.0, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : @294 + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : @35, + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : Color [ #white ] + } + } + }, + #userData : IdentityDictionary { + #closeTooltipWindowOnMouseLeave : true, + #elementId : BlElementNamedId { + #identifier : #buttonD + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @1173, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @1186, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : @1030 + } + ], + #rope : BlCollectionRope { + #collection : ''Text Button'' + } + } + }, + #enabled : true, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : true, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @1210 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : true, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + }, + #danger : ToStampProperty { + #name : #danger, + #value : true + }, + #text : ToStampProperty { + #name : #text, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @1226 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + ToButton { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : BlLayoutExactResizer { + #size : 32.0 + } + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @18 + }, + #weight : 1 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 4.0, + #left : 7.5, + #bottom : 4.0, + #right : 7.5 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @1234, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : BlCustomVisuals { + #geometry : BlRoundedRectangleGeometry { + #extent : Point [ 85.0, 32.0 ], + #pathCache : BlPathCache { + #geometry : @1240 + }, + #cornerRadii : BlCornerRadii { + #topLeft : 6, + #topRight : 6, + #bottomLeft : 6, + #bottomRight : 6 + }, + #center : Point [ 42.5, 16.0 ] + }, + #border : BlBorder { + #paint : BlColorPaint { + #color : @294 + }, + #width : 1, + #style : BlStrokeStyle { + #lineCap : @33, + #lineJoin : @34, + #miterLimit : 4.0, + #dashArray : @35, + #dashOffset : 0.0 + }, + #opacity : 1.0 + }, + #background : BlPaintBackground { + #paint : BlColorPaint { + #color : @129 + } + } + }, + #userData : IdentityDictionary { + #closeTooltipWindowOnMouseLeave : true, + #elementId : BlElementNamedId { + #identifier : #buttonE + }, + #stonLabeledIcon : ToLabeledIcon { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @13 : BlLinearLayoutConstraints { + #vertical : BlLinearLayoutConstraintsVertical { + #alignment : @47 + }, + #horizontal : BlLinearLayoutConstraintsHorizontal { + #alignment : @49 + }, + #weight : 1 + }, + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @47, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @49, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @1257, + #previouslyAccessedConstraintsType : @13, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToImage : nil, + #stonToLabel : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @50 : BlFrameLayoutConstraints { + #vertical : BlFrameLayoutConstraintsVertical { + #alignment : @16, + #weight : 1.0 + }, + #horizontal : BlFrameLayoutConstraintsHorizontal { + #alignment : @18, + #weight : 1.0 + } + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @1270, + #previouslyAccessedConstraintsType : @50, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #stonToLabelText : BlRopedText { + #rope : BlAttributeRope { + #attributes : [ + BlFontWeightAttribute { + #isOverwritableByStyler : true, + #weight : 600 + }, + BlFontFamilyDefaultAttribute { + #isOverwritableByStyler : true, + #name : ''SFMono-Regular'' + }, + BlFontSizeDefaultAttribute { + #isOverwritableByStyler : true, + #size : 14 + }, + AlbTextParagraphLineSpacingAttribute { + #isOverwritableByStyler : true, + #lineSpacing : 1.5 + }, + BlTextForegroundAttribute { + #isOverwritableByStyler : true, + #paint : @1030 + } + ], + #rope : BlCollectionRope { + #collection : ''Link Button'' + } + } + }, + #enabled : true, + #stamps : [ + #label : ToStampProperty { + #name : #label, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlFrameLayout { } + }, + #enabled : true, + #stamps : [ + #horizontal : ToStampProperty { + #name : #horizontal, + #value : true + }, + #labeled-icon : ToStampProperty { + #name : #labeled-icon, + #value : true + }, + #exact-interspace : ToStampProperty { + #name : #exact-interspace, + #value : true + }, + #icon-first : ToStampProperty { + #name : #icon-first, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @1294 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + }, + #enabled : true, + #tooltipContent : ToLabel { + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : @20, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #stonToLabelText : BlRopedText { + #rope : BlCollectionRope { + #collection : ''I\''m a button'' + } + } + }, + #layout : BlFrameLayout { } + }, + #stamps : [ + #button : ToStampProperty { + #name : #button, + #value : true + }, + #link : ToStampProperty { + #name : #link, + #value : true + }, + #danger : ToStampProperty { + #name : #danger, + #value : true + } + ], + #tokens : [ ] + }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @1310 + }, + #shouldUseLargestChild : false, + #cellSpacing : 0.0, + #interspace : 0.0 + } + } + ], + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @447 : BlFlowLayoutConstraints { + #vertical : BlFlowLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlFlowLayoutConstraintsHorizontal { + #alignment : @18 + }, + #newLine : false, + #weight : 0, + #display : @451 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 5.0, + #left : 5.0, + #bottom : 5.0, + #right : 5.0 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @1316, + #previouslyAccessedConstraintsType : @447, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { }, + #layout : BlLinearLayout { + #weightSum : 0, + #verticalAlignment : @88, + #horizontalAlignment : @89, + #orientation : BlLinearLayoutHorizontalOrientation { + #layout : @1322 + }, + #shouldUseLargestChild : false, + #cellSpacing : 5.0, + #interspace : 0.0 + } + } + ], + #constraints : BlLayoutCommonConstraints { + #vertical : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #horizontal : BlLayoutCommonConstraintsAxis { + #resizer : @11 + }, + #constraints : { + @447 : BlFlowLayoutConstraints { + #vertical : BlFlowLayoutConstraintsVertical { + #alignment : @16 + }, + #horizontal : BlFlowLayoutConstraintsHorizontal { + #alignment : @18 + }, + #newLine : false, + #weight : 0, + #display : @451 + } + }, + #position : Point [ 0.0, 0.0 ], + #margin : @20, + #padding : BlInsets { + #top : 5.0, + #left : 5.0, + #bottom : 5.0, + #right : 5.0 + }, + #minHeight : 0.0, + #minWidth : 0.0, + #maxHeight : @22, + #maxWidth : @22, + #ignoredByLayout : false, + #previouslyAccessedConstraints : @1328, + #previouslyAccessedConstraintsType : @447, + #accountTransformation : false + }, + #visuals : @55, + #userData : IdentityDictionary { + #enabled : true, + #elementId : BlElementNamedId { + #identifier : #themeSandBox + }, + #stamps : [ ], + #tokens : [ ] + }, + #layout : BlFlowLayout { + #measurer : BlFlowLayoutMeasurer { + #layout : @1337, + #children : OrderedCollection [ + BlFlowLayoutInlineChild { + #width : 527.0, + #height : 42.0, + #margin : @20, + #weight : 0, + #newLine : false, + #startLength : 0, + #startBreadth : 0, + #element : @4, + #alignment : BlCompositeAlignment { + #vertical : @16, + #horizontal : @18, + #direction : BlLayoutLeftToRight { } + }, + #measurer : @1338, + #display : @451 + }, + BlFlowLayoutInlineChild { + #width : 527.0, + #height : 42.0, + #margin : @20, + #weight : 0, + #newLine : false, + #startLength : 42.0, + #startBreadth : 0.0, + #element : @457, + #alignment : BlCompositeAlignment { + #vertical : @16, + #horizontal : @18, + #direction : @1342 + }, + #measurer : @1338, + #display : @451 + }, + BlFlowLayoutInlineChild { + #width : 527.0, + #height : 42.0, + #margin : @20, + #weight : 0, + #newLine : false, + #startLength : 84.0, + #startBreadth : 0.0, + #element : @888, + #alignment : BlCompositeAlignment { + #vertical : @16, + #horizontal : @18, + #direction : @1342 + }, + #measurer : @1338, + #display : @451 + } + ], + #lines : OrderedCollection [ + BlFlowLayoutLine { + #children : OrderedCollection [ + @1340, + @1343, + @1345 + ], + #startLength : 0, + #startBreadth : 0, + #length : 126.0, + #breadth : 527.0, + #measurer : @1338 + } + ], + #orientation : BlFlowLayoutVertical { }, + #maxWidth : -10.0, + #maxHeight : -10.0, + #widthMode : BlMeasurementSpec { + #size : 0.0, + #mode : BlMeasurementUnspecifiedMode { } + }, + #heightMode : BlMeasurementSpec { + #size : 0.0, + #mode : @1352 + }, + #checkCanFit : false + }, + #orientation : BlLayoutVertical { }, + #horizontalAlignment : @18, + #verticalAlignment : @16 + } + } +]' +] diff --git a/src/Pyramid-Toplo-Examples/package.st b/src/Pyramid-Toplo-Examples/package.st new file mode 100644 index 00000000..a1c8a7af --- /dev/null +++ b/src/Pyramid-Toplo-Examples/package.st @@ -0,0 +1 @@ +Package { #name : #'Pyramid-Toplo-Examples' } diff --git a/src/Pyramid-Toplo-Tests/PyramidContainsValidSelectorInterpreterTest.class.st b/src/Pyramid-Toplo-Tests/PyramidContainsValidSelectorInterpreterTest.class.st new file mode 100644 index 00000000..93d5e638 --- /dev/null +++ b/src/Pyramid-Toplo-Tests/PyramidContainsValidSelectorInterpreterTest.class.st @@ -0,0 +1,357 @@ +Class { + #name : #PyramidContainsValidSelectorInterpreterTest, + #superclass : #TestCase, + #instVars : [ + 'interpreter' + ], + #category : #'Pyramid-Toplo-Tests-cases-plugin-theme-management' +} + +{ #category : #accessing } +PyramidContainsValidSelectorInterpreterTest >> initialize [ + + super initialize. + interpreter := PyramidContainsValidSelectorInterpreter new. +] + +{ #category : #accessing } +PyramidContainsValidSelectorInterpreterTest >> interpreter [ + + ^ interpreter +] + +{ #category : #tests } +PyramidContainsValidSelectorInterpreterTest >> testVisitActionSelector [ + + | selector element | + selector := [ :e | true ] asActionSelector. + element := ToElement new. + self interpreter check: selector on: element. + self assert: self interpreter result. + + selector := [ :e | false ] asActionSelector. + element := ToElement new. + self interpreter check: selector on: element. + self deny: self interpreter result +] + +{ #category : #tests } +PyramidContainsValidSelectorInterpreterTest >> testVisitAndSelector [ + " + left ok + right ok -> true + left ko + right ok -> false + left ok + right ko -> false + left ko + right ko -> false + " + + | selector element | + selector := ToButton asTypeSelector && #hello asStampSelector. + + element := ToButton new. + self interpreter check: selector on: element. + self assert: self interpreter result. + + element := ToElement new. + self interpreter check: selector on: element. + self deny: self interpreter result. + + selector := #hello asStampSelector && #world asStampSelector. + element := ToElement new. + self interpreter check: selector on: element. + self assert: self interpreter result. +] + +{ #category : #tests } +PyramidContainsValidSelectorInterpreterTest >> testVisitChildSelector [ + " + child ok + parent ok -> true + child ok + parent ko -> false + child ko + parent ok -> false + " + + | selector parent child | + selector := ToButton asTypeSelector withChild: + ToButton asTypeSelector. + + "child ok + parent ok -> true" + parent := ToButton new. + child := ToButton new. + parent addChild: child. + self interpreter check: selector on: parent. + self assert: self interpreter result. + + "child ok + parent ko -> false" + parent := ToElement new. + child := ToButton new. + parent addChild: child. + self interpreter check: selector on: parent. + self deny: self interpreter result. + + "child ko + parent ok -> false" + parent := ToButton new. + child := ToElement new. + parent addChild: child. + self interpreter check: selector on: parent. + self deny: self interpreter result +] + +{ #category : #tests } +PyramidContainsValidSelectorInterpreterTest >> testVisitIdSelector [ + " + id ok -> true + id ko -> false + " + + | selector element | + selector := #hello asIdSelector. + + element := ToElement new id: #hello; yourself. + self interpreter check: selector on: element. + self assert: self interpreter result. + +element := ToElement new. + self interpreter check: selector on: element. + self deny: self interpreter result. +] + +{ #category : #tests } +PyramidContainsValidSelectorInterpreterTest >> testVisitNotSelector [ + + | selector element | + "action" + selector := [ :e | true ] asActionSelector not. + element := ToElement new. + self interpreter check: selector on: element. + self deny: self interpreter result. + selector := [ :e | false ] asActionSelector not. + element := ToElement new. + self interpreter check: selector on: element. + self assert: self interpreter result. + + "type" + selector := ToButton asTypeSelector not. + element := ToButton new. + self interpreter check: selector on: element. + self deny: self interpreter result. + element := ToElement new. + self interpreter check: selector on: element. + self assert: self interpreter result. + + "stamp" + selector := #hello asStampSelector not. + element := ToElement new + addStamp: #hello; + yourself. + self interpreter check: selector on: element. + self assert: self interpreter result. + element := ToElement new. + self interpreter check: selector on: element. + self assert: self interpreter result. + + "id" + selector := #hello asIdSelector not. + element := ToElement new + id: #hello; + yourself. + self interpreter check: selector on: element. + self deny: self interpreter result. + element := ToElement new. + self interpreter check: selector on: element. + self assert: self interpreter result. + + "universal" + selector := ToUniversalSelector new not. + element := ToElement new. + self interpreter check: selector on: element. + self deny: self interpreter result. + selector := ToUniversalSelector new not not. + self interpreter check: selector on: element. + self assert: self interpreter result. +] + +{ #category : #tests } +PyramidContainsValidSelectorInterpreterTest >> testVisitOrSelector [ + " + left ok + right ok -> true + left ko + right ok -> true + left ok + right ko -> true + left ko + right ko -> false + " + + | selector element | + selector := ToButton asTypeSelector || ToLabel asTypeSelector. + + element := ToButton new. + self interpreter check: selector on: element. + self assert: self interpreter result. + + element := ToLabel new. + self interpreter check: selector on: element. + self assert: self interpreter result. + + element := ToElement new. + self interpreter check: selector on: element. + self deny: self interpreter result. + + selector := ToButton asTypeSelector || #hello asStampSelector. + element := ToButton new. + self interpreter check: selector on: element. + self assert: self interpreter result. + + selector := #hello asStampSelector || #world asStampSelector. + element := ToElement new. + self interpreter check: selector on: element. + self assert: self interpreter result +] + +{ #category : #tests } +PyramidContainsValidSelectorInterpreterTest >> testVisitParentSelector [ + " + child ok + parent ok -> true + child ok + parent ko -> false + child kk + parent ok -> false + " + + | selector parent child | + selector := ToButton asTypeSelector withParent: + ToButton asTypeSelector. + + "child ok + parent ok -> true" + parent := ToButton new. + child := ToButton new. + parent addChild: child. + self interpreter check: selector on: child. + self assert: self interpreter result. + + "child ok + parent ko -> false" + parent := ToElement new. + child := ToButton new. + parent addChild: child. + self interpreter check: selector on: child. + self deny: self interpreter result. + + "child ko + parent ok -> false" + parent := ToButton new. + child := ToElement new. + parent addChild: child. + self interpreter check: selector on: child. + self deny: self interpreter result. + + "child ok + parent ok -> true" + selector := ToButton asTypeSelector withParent: + #hello asStampSelector. + parent := ToElement new addStamp: #hello. + child := ToButton new. + parent addChild: child. + self interpreter check: selector on: child. + self assert: self interpreter result. + + "child ok + parent ko -> false" + selector := ToButton asTypeSelector withParent: + #hello asStampSelector. + parent := ToElement new. + child := ToButton new. + parent addChild: child. + self interpreter check: selector on: child. + self deny: self interpreter result +] + +{ #category : #tests } +PyramidContainsValidSelectorInterpreterTest >> testVisitSiblingSelector [ + " + child ok + sibling1 ok + sibling2 ok -> true + child ok + sibling1 ok + sibling2 ko -> true + child ok + sibling1 ko + sibling2 ko -> false + child ko + sibling1 ok + sibling2 ok -> false + " + + | selector parent child sibling1 sibling2 | + selector := ToButton asTypeSelector withSibling: + ToButton asTypeSelector. + + "child ok + sibling1 ok + sibling2 ok -> true" + parent := ToElement new. + child := ToButton new. + sibling1 := ToButton new. + sibling2 := ToButton new. + parent addChild: child. + parent addChild: sibling1. + parent addChild: sibling2. + + self interpreter check: selector on: child. + self assert: self interpreter result. + + "child ok + sibling1 ok + sibling2 ko -> true" + parent := ToElement new. + child := ToButton new. + sibling1 := ToButton new. + sibling2 := ToElement new. + parent addChild: child. + parent addChild: sibling1. + parent addChild: sibling2. + + self interpreter check: selector on: child. + self assert: self interpreter result. + + "child ok + sibling1 ko + sibling2 ko -> false" + parent := ToElement new. + child := ToButton new. + sibling1 := ToElement new. + sibling2 := ToElement new. + parent addChild: child. + parent addChild: sibling1. + parent addChild: sibling2. + + self interpreter check: selector on: child. + self deny: self interpreter result. + + "child ko + sibling1 ok + sibling2 ok -> false" + parent := ToElement new. + child := ToElement new. + sibling1 := ToButton new. + sibling2 := ToButton new. + parent addChild: child. + parent addChild: sibling1. + parent addChild: sibling2. + + self interpreter check: selector on: child. + self deny: self interpreter result +] + +{ #category : #tests } +PyramidContainsValidSelectorInterpreterTest >> testVisitStyleStampSelector [ +"Test is true because stamps is authorized" + | element | + element := ToElement new. + self interpreter check: #hello asStampSelector on: element. + self assert: self interpreter result. + element addStamp: #hello. + self interpreter check: #hello asStampSelector on: element. + self assert: self interpreter result +] + +{ #category : #tests } +PyramidContainsValidSelectorInterpreterTest >> testVisitTypeSelector [ + " + Return true if type is ok. + Return false if type is ko. + " + + | element | + element := ToElement new. + self interpreter check: ToButton asTypeSelector on: element. + self deny: self interpreter result. + element := ToButton new. + self interpreter check: ToButton asTypeSelector on: element. + self assert: self interpreter result +] + +{ #category : #tests } +PyramidContainsValidSelectorInterpreterTest >> testVisitUniversalSelector [ + "Test is true universal is authorized" + + | element | + element := ToElement new. + self interpreter check: ToUniversalSelector new on: element. + self assert: self interpreter result +] diff --git a/src/Pyramid-Toplo-Tests/PyramidStampCommandTest.class.st b/src/Pyramid-Toplo-Tests/PyramidStampCommandTest.class.st new file mode 100644 index 00000000..b27c592e --- /dev/null +++ b/src/Pyramid-Toplo-Tests/PyramidStampCommandTest.class.st @@ -0,0 +1,29 @@ +Class { + #name : #PyramidStampCommandTest, + #superclass : #TestCase, + #traits : 'TPyramidCommandTest', + #classTraits : 'TPyramidCommandTest classTrait', + #category : #'Pyramid-Toplo-Tests-cases-plugin-theme-management' +} + +{ #category : #accessing } +PyramidStampCommandTest >> command [ + + ^ PyramidStampCommand new stamp: #test; yourself +] + +{ #category : #'as yet unclassified' } +PyramidStampCommandTest >> targetContainers [ + + ^ { + (PyramidCommandTestContainer + no: BlElement new + with: (BlElement new + addStamp: #test; + yourself) + prop: true). + (PyramidCommandTestContainer + no: (BlElement new addStamp: #test; yourself) + with: BlElement new + prop: false) } +] diff --git a/src/Pyramid-Toplo-Tests/PyramidThemeCommandTest.class.st b/src/Pyramid-Toplo-Tests/PyramidThemeCommandTest.class.st new file mode 100644 index 00000000..64635ee1 --- /dev/null +++ b/src/Pyramid-Toplo-Tests/PyramidThemeCommandTest.class.st @@ -0,0 +1,39 @@ +Class { + #name : #PyramidThemeCommandTest, + #superclass : #TestCase, + #traits : 'TPyramidCommandTest', + #classTraits : 'TPyramidCommandTest classTrait', + #category : #'Pyramid-Toplo-Tests-cases-plugin-theme-management' +} + +{ #category : #accessing } +PyramidThemeCommandTest >> command [ + + ^ PyramidThemeCommand new +] + +{ #category : #'as yet unclassified' } +PyramidThemeCommandTest >> targetContainers [ + + ^ { + (PyramidCommandTestContainer + no: BlElement new + with: (BlElement new + toTheme: ToRawTheme dark; + yourself) + prop: ToRawTheme dark). + (PyramidCommandTestContainer + no: (BlElement new + toTheme: ToRawTheme dark; + yourself) + with: (BlElement new + toTheme: ToRawTheme light; + yourself) + prop: ToRawTheme light). + (PyramidCommandTestContainer + no: (BlElement new + toTheme: ToRawTheme dark; + yourself) + with: (BlElement new) + prop: nil) } +] diff --git a/src/Pyramid-Toplo-Tests/package.st b/src/Pyramid-Toplo-Tests/package.st new file mode 100644 index 00000000..187b5704 --- /dev/null +++ b/src/Pyramid-Toplo-Tests/package.st @@ -0,0 +1 @@ +Package { #name : #'Pyramid-Toplo-Tests' } diff --git a/src/Pyramid-Toplo/PyramidContainsValidSelectorInterpreter.class.st b/src/Pyramid-Toplo/PyramidContainsValidSelectorInterpreter.class.st new file mode 100644 index 00000000..5148858e --- /dev/null +++ b/src/Pyramid-Toplo/PyramidContainsValidSelectorInterpreter.class.st @@ -0,0 +1,230 @@ +Class { + #name : #PyramidContainsValidSelectorInterpreter, + #superclass : #ToElementSelectorVisitor, + #instVars : [ + 'targetElement', + 'validSelectors', + 'invalidSelectors', + 'ignoredSelectors' + ], + #category : #'Pyramid-Toplo-plugin-theme-management' +} + +{ #category : #operating } +PyramidContainsValidSelectorInterpreter >> check: aSelector on: anElement [ + + targetElement := anElement. + validSelectors := OrderedCollection new. + invalidSelectors := OrderedCollection new. + ignoredSelectors := OrderedCollection new. + aSelector accept: self. +] + +{ #category : #accessing } +PyramidContainsValidSelectorInterpreter >> ignoredSelectors [ + + ^ ignoredSelectors +] + +{ #category : #accessing } +PyramidContainsValidSelectorInterpreter >> invalidSelectors [ + + ^ invalidSelectors +] + +{ #category : #accessing } +PyramidContainsValidSelectorInterpreter >> result [ + + invalidSelectors ifNil: [ ^ false ]. + ^ invalidSelectors isEmpty +] + +{ #category : #accessing } +PyramidContainsValidSelectorInterpreter >> targetElement [ + + + ^ targetElement +] + +{ #category : #accessing } +PyramidContainsValidSelectorInterpreter >> validSelectors [ + + ^ validSelectors +] + +{ #category : #visiting } +PyramidContainsValidSelectorInterpreter >> visitActionSelector: aSelector [ + + (aSelector action value: self targetElement) + ifTrue: [ self validSelectors add: aSelector ] + ifFalse: [ self invalidSelectors add: aSelector ] +] + +{ #category : #visiting } +PyramidContainsValidSelectorInterpreter >> visitAndSelector: aSelector [ + + | interpreterForAndLeft interpreterForAndRight | + interpreterForAndLeft := self class new. + interpreterForAndLeft check: aSelector left on: self targetElement. + + interpreterForAndLeft result ifFalse: [ + self invalidSelectors add: self. + ^ self ]. + + interpreterForAndRight := self class new. + interpreterForAndRight check: aSelector right on: self targetElement. + + interpreterForAndRight result ifFalse: [ + self invalidSelectors add: self. + ^ self ]. + + self validSelectors add: aSelector. + self ignoredSelectors addAll: interpreterForAndLeft ignoredSelectors. + self ignoredSelectors addAll: interpreterForAndRight ignoredSelectors +] + +{ #category : #visiting } +PyramidContainsValidSelectorInterpreter >> visitChildSelector: aSelector [ + + | parent interpreterForLeft interpreterForRight | + interpreterForLeft := self class new. + interpreterForRight := ToSelectorInterpreter new. + interpreterForLeft check: aSelector left on: self targetElement. + + interpreterForLeft result ifFalse: [ + self invalidSelectors add: aSelector. + ^ self ]. + + parent := self targetElement. + "evaluate only for children at a given depth or at any depth if selector depth is not specified " + parent allChildrenBreadthFirstWithDepthDo: [ :child :depth | + (aSelector depth isNil or: [ aSelector depth = depth ]) ifTrue: [ + interpreterForRight check: aSelector right on: child. + interpreterForRight result ifTrue: [ + self validSelectors add: aSelector. + self ignoredSelectors add: interpreterForLeft ignoredSelectors. + ^ self ] ] ]. + self invalidSelectors add: aSelector +] + +{ #category : #visiting } +PyramidContainsValidSelectorInterpreter >> visitIdSelector: aSelector [ + + aSelector id = self targetElement id + ifTrue: [ self validSelectors add: aSelector ] + ifFalse: [ self invalidSelectors add: aSelector ] +] + +{ #category : #visiting } +PyramidContainsValidSelectorInterpreter >> visitNotSelector: aSelector [ + + | interpreterForNot | + interpreterForNot := self class new. + interpreterForNot check: aSelector left on: self targetElement. + self invalidSelectors addAll: interpreterForNot validSelectors. + self validSelectors addAll: interpreterForNot invalidSelectors. + self ignoredSelectors addAll: interpreterForNot ignoredSelectors +] + +{ #category : #visiting } +PyramidContainsValidSelectorInterpreter >> visitOrSelector: aSelector [ + + | interpreterForOrLeft interpreterForOrRight | + interpreterForOrLeft := self class new. + interpreterForOrLeft check: aSelector left on: self targetElement. + + interpreterForOrRight := self class new. + interpreterForOrRight check: aSelector right on: self targetElement. + + "Both KO" + (interpreterForOrLeft result not and: [ + interpreterForOrRight result not ]) ifTrue: [ + self invalidSelectors add: self. + ^ self ]. + + interpreterForOrLeft result ifTrue: [ + self ignoredSelectors addAll: interpreterForOrLeft ignoredSelectors ]. + interpreterForOrRight result ifTrue: [ + self ignoredSelectors addAll: interpreterForOrRight ignoredSelectors ]. + self validSelectors add: aSelector +] + +{ #category : #visiting } +PyramidContainsValidSelectorInterpreter >> visitParentSelector: aSelector [ + + | depth current interpreterForLeft interpreterForRight | + interpreterForLeft := self class new. + interpreterForRight := ToSelectorInterpreter new. + interpreterForLeft check: aSelector left on: self targetElement. + + interpreterForLeft result ifFalse: [ + self invalidSelectors add: aSelector. + ^ self ]. + + current := self targetElement. + depth := aSelector depth. + + [ + current := current parent. + current ifNil: [ + self invalidSelectors add: aSelector. + ^ self ]. + depth ifNotNil: [ + depth := depth - 1. + depth < 0 ifTrue: [ + self invalidSelectors add: aSelector. + ^ self ] ]. + (depth isNil or: [ depth isZero ]) ifTrue: [ + interpreterForRight check: aSelector right on: current. + (interpreterForRight result) ifTrue: [ + self validSelectors add: aSelector. + self ignoredSelectors addAll: interpreterForLeft ignoredSelectors. + ^ self ] ] ] repeat +] + +{ #category : #visiting } +PyramidContainsValidSelectorInterpreter >> visitSiblingSelector: aSelector [ + + | current interpreterForSiblingLeft interpreterForSiblingRight | + interpreterForSiblingLeft := self class new. + interpreterForSiblingRight := ToSelectorInterpreter new. + interpreterForSiblingLeft + check: aSelector left + on: self targetElement. + + interpreterForSiblingLeft result ifFalse: [ + self invalidSelectors add: aSelector. + ^ self ]. + + current := self targetElement. + current siblingsDo: [ :sib | + interpreterForSiblingRight check: aSelector right on: sib. + interpreterForSiblingRight result ifTrue: [ + self validSelectors add: aSelector. + self ignoredSelectors addAll: + interpreterForSiblingLeft ignoredSelectors. + "There is no interest to add the right ignored items since they are sibling dependant" + ^ self ] ]. + self invalidSelectors add: aSelector +] + +{ #category : #visiting } +PyramidContainsValidSelectorInterpreter >> visitStyleStampSelector: aSelector [ + self ignoredSelectors add: aSelector + +] + +{ #category : #visiting } +PyramidContainsValidSelectorInterpreter >> visitTypeSelector: aSelector [ + + (aSelector selectType: self targetElement class) + ifTrue: [ self validSelectors add: aSelector ] + ifFalse: [ self invalidSelectors add: aSelector ] +] + +{ #category : #visiting } +PyramidContainsValidSelectorInterpreter >> visitUniversalSelector: aSelector [ + + "Must be valid for not" + self validSelectors add: aSelector +] diff --git a/src/Pyramid-Toplo/PyramidElementThemeSelectorPresenter.class.st b/src/Pyramid-Toplo/PyramidElementThemeSelectorPresenter.class.st new file mode 100644 index 00000000..eac5fa48 --- /dev/null +++ b/src/Pyramid-Toplo/PyramidElementThemeSelectorPresenter.class.st @@ -0,0 +1,179 @@ +Class { + #name : #PyramidElementThemeSelectorPresenter, + #superclass : #PyramidThemeSelectorPresenter, + #traits : 'TPyramidProjectModelObserver', + #classTraits : 'TPyramidProjectModelObserver classTrait', + #instVars : [ + 'projectModel', + 'inheritSelector', + 'labelPresenter', + 'commandExecutor', + 'themeCommand' + ], + #category : #'Pyramid-Toplo-plugin-theme-management' +} + +{ #category : #'as yet unclassified' } +PyramidElementThemeSelectorPresenter >> applyTheme [ + + | themeToApplied | + self triggerThemeChangement ifFalse: [ ^ self ]. + themeToApplied := nil. + self inheritSelector state ifFalse: [ + themeToApplied := self currentTheme ]. + self commandExecutor + use: self themeCommand + on: self projectModel selection asArray + with: themeToApplied. + self projectModel informElementsChanged +] + +{ #category : #'as yet unclassified' } +PyramidElementThemeSelectorPresenter >> commandExecutor [ + + ^ commandExecutor +] + +{ #category : #'as yet unclassified' } +PyramidElementThemeSelectorPresenter >> commandExecutor: aCommandExecutor [ + + commandExecutor := aCommandExecutor +] + +{ #category : #layout } +PyramidElementThemeSelectorPresenter >> defaultLayout [ + + ^ SpBoxLayout newVertical + spacing: 4; + add: (SpBoxLayout newHorizontal + spacing: 4; + add: self labelPresenter; + add: self buttonRefreshTheme withConstraints: [ :c | + c height: 24. + c width: 24 ]; + yourself) + expand: false; + add: self inheritSelector expand: false; + add: (SpBoxLayout newHorizontal + spacing: 4; + add: 'Theme' width: 50; + add: self themeSelector; + yourself) + expand: false; + add: SpNullPresenter new height: 10; + yourself +] + +{ #category : #accessing } +PyramidElementThemeSelectorPresenter >> inheritSelector [ + + ^ inheritSelector +] + +{ #category : #initialization } +PyramidElementThemeSelectorPresenter >> initializePresenters [ + + super initializePresenters. + themeCommand := PyramidThemeCommand new. + inheritSelector := SpCheckBoxPresenter new + label: 'Inherits from parents'; + whenChangedDo: [ :aBoolean | self applyTheme ]; + yourself. + labelPresenter := SpLabelPresenter new + label: 'Element Theme (empty select)'; + displayBold: [ :t | true ]; + yourself. + self triggerThemeChangement: false. + self setDefaultStateForPresenters. + self triggerThemeChangement: true +] + +{ #category : #initialization } +PyramidElementThemeSelectorPresenter >> labelPresenter [ + + ^ labelPresenter +] + +{ #category : #accessing } +PyramidElementThemeSelectorPresenter >> projectModel [ + + ^ projectModel +] + +{ #category : #accessing } +PyramidElementThemeSelectorPresenter >> projectModel: anObject [ + + projectModel := anObject. + anObject addObserver: self +] + +{ #category : #'as yet unclassified' } +PyramidElementThemeSelectorPresenter >> pyramidElementsChanged [ + + self triggerThemeChangement: false. + self updatePresenterFor: self projectModel selection. + self triggerThemeChangement: true +] + +{ #category : #'as yet unclassified' } +PyramidElementThemeSelectorPresenter >> pyramidSelectionChanged [ + + self triggerThemeChangement: false. + self updatePresenterFor: self projectModel selection. + self triggerThemeChangement: true. +] + +{ #category : #'as yet unclassified' } +PyramidElementThemeSelectorPresenter >> setDefaultStateForPresenters [. + self themeSelector enabled: false. + self inheritSelector enabled: false. + self inheritSelector state: true. + +] + +{ #category : #'as yet unclassified' } +PyramidElementThemeSelectorPresenter >> themeCommand [ + + ^ themeCommand +] + +{ #category : #'as yet unclassified' } +PyramidElementThemeSelectorPresenter >> updatePresenterFor: aCollectionOfElement [ + + | collectionOfLocalThemes | + "Default values" + self setDefaultStateForPresenters. + + "Empty state" + aCollectionOfElement ifEmpty: [ + self labelPresenter label: 'Element Theme (empty select)'. + ^ self ]. + + "Only one element selected state" + aCollectionOfElement size = 1 ifTrue: [ + self labelPresenter label: 'Element Theme'. + self inheritSelector enabled: true. + aCollectionOfElement first localTheme ifNotNil: [ :theme | + self inheritSelector state: false. + self themeSelector enabled: true. + self selectTheme: theme ]. + ^ self ]. + + "Mix between local and unlocal theme" + collectionOfLocalThemes := (aCollectionOfElement asArray collect: [ + :each | each localTheme ]) asSet asArray. + collectionOfLocalThemes size > 1 ifTrue: [ + self labelPresenter label: 'Elements Theme (differents)'. + ^ self ]. + + self labelPresenter label: 'Elements Theme'. + self inheritSelector enabled: true. + + "All local theme" + collectionOfLocalThemes first ifNotNil: [ + self inheritSelector state: false. + self themeSelector enabled: true. + self selectTheme: collectionOfLocalThemes first ]. + + self layout: self defaultLayout +] diff --git a/src/Pyramid-Toplo/PyramidSelectorPossibleStamps.class.st b/src/Pyramid-Toplo/PyramidSelectorPossibleStamps.class.st new file mode 100644 index 00000000..0cf44247 --- /dev/null +++ b/src/Pyramid-Toplo/PyramidSelectorPossibleStamps.class.st @@ -0,0 +1,53 @@ +Class { + #name : #PyramidSelectorPossibleStamps, + #superclass : #Object, + #instVars : [ + 'theme' + ], + #category : #'Pyramid-Toplo-plugin-theme-management' +} + +{ #category : #'as yet unclassified' } +PyramidSelectorPossibleStamps >> findAllSelectorFor: aBlElement [ + + ^ self theme styleSheet styleRules flatCollect: [ + :rule | + self findAllSelectorFor: aBlElement on: rule ]. +] + +{ #category : #'as yet unclassified' } +PyramidSelectorPossibleStamps >> findAllSelectorFor: aBlElement on: aToStyleRule [ + + | interpreter | + interpreter := PyramidContainsValidSelectorInterpreter new. + interpreter check: aToStyleRule selector on: aBlElement. + interpreter result + ifTrue: [ + ^ interpreter ignoredSelectors asArray + , (aToStyleRule styleRules flatCollect: [ :each | + self findAllSelectorFor: aBlElement on: each ]) ] + ifFalse: [ ^ { } ] +] + +{ #category : #'as yet unclassified' } +PyramidSelectorPossibleStamps >> findAllStampsFor: aBlElement [ + + | allValidSelectors allStampsSelectors | + allValidSelectors := self findAllSelectorFor: aBlElement. + allStampsSelectors := allValidSelectors select: [ :each | + each class = ToStampSelector ]. + ^ (allStampsSelectors flatCollect: [ :each | each allStamps ]) asSet + sorted +] + +{ #category : #accessing } +PyramidSelectorPossibleStamps >> theme [ + + ^ theme +] + +{ #category : #accessing } +PyramidSelectorPossibleStamps >> theme: anObject [ + + theme := anObject +] diff --git a/src/Pyramid-Toplo/PyramidSpaceThemeSelectorPresenter.class.st b/src/Pyramid-Toplo/PyramidSpaceThemeSelectorPresenter.class.st new file mode 100644 index 00000000..fca59254 --- /dev/null +++ b/src/Pyramid-Toplo/PyramidSpaceThemeSelectorPresenter.class.st @@ -0,0 +1,38 @@ +Class { + #name : #PyramidSpaceThemeSelectorPresenter, + #superclass : #PyramidThemeSelectorPresenter, + #traits : 'TPyramidSpaceExtension', + #classTraits : 'TPyramidSpaceExtension classTrait', + #instVars : [ + 'projectModel' + ], + #category : #'Pyramid-Toplo-plugin-theme-management' +} + +{ #category : #'as yet unclassified' } +PyramidSpaceThemeSelectorPresenter >> applyTheme [ + + self builder space toTheme: self currentTheme. + self projectModel informElementsChanged +] + +{ #category : #initialization } +PyramidSpaceThemeSelectorPresenter >> labelPresenter [ + + ^ SpLabelPresenter new + label: 'Space Theme'; + displayBold: [ :t | true ]; + yourself +] + +{ #category : #accessing } +PyramidSpaceThemeSelectorPresenter >> projectModel [ + + ^ projectModel +] + +{ #category : #accessing } +PyramidSpaceThemeSelectorPresenter >> projectModel: anObject [ + + projectModel := anObject +] diff --git a/src/Pyramid-Toplo/PyramidStampCommand.class.st b/src/Pyramid-Toplo/PyramidStampCommand.class.st new file mode 100644 index 00000000..2ec2f0c1 --- /dev/null +++ b/src/Pyramid-Toplo/PyramidStampCommand.class.st @@ -0,0 +1,34 @@ +Class { + #name : #PyramidStampCommand, + #superclass : #PyramidAbstractBlocCommand, + #instVars : [ + 'stamp' + ], + #category : #'Pyramid-Toplo-plugin-theme-management' +} + +{ #category : #'as yet unclassified' } +PyramidStampCommand >> getValueFor: anObject [ + + ^ anObject hasStamp: self stamp +] + +{ #category : #'as yet unclassified' } +PyramidStampCommand >> setValueFor: anObject with: aBoolean [ + + aBoolean + ifTrue: [ anObject addStamp: self stamp ] + ifFalse: [ anObject removeStamp: self stamp ] +] + +{ #category : #accessing } +PyramidStampCommand >> stamp [ + + ^ stamp +] + +{ #category : #accessing } +PyramidStampCommand >> stamp: anObject [ + + stamp := anObject +] diff --git a/src/Pyramid-Toplo/PyramidStyleSheetEditorPresenter.class.st b/src/Pyramid-Toplo/PyramidStyleSheetEditorPresenter.class.st new file mode 100644 index 00000000..8a92a1e5 --- /dev/null +++ b/src/Pyramid-Toplo/PyramidStyleSheetEditorPresenter.class.st @@ -0,0 +1,41 @@ +Class { + #name : #PyramidStyleSheetEditorPresenter, + #superclass : #SpPresenter, + #instVars : [ + 'themeSelector', + 'styleSheetEditor', + 'stampPresenter' + ], + #category : #'Pyramid-Toplo-plugin-theme-management' +} + +{ #category : #accessing } +PyramidStyleSheetEditorPresenter >> defaultLayout [ + + ^ SpBoxLayout new + spacing: 4; + add: (SpLabelPresenter new + label: 'Stamps edition'; + displayBold: [ :t | true ]; + yourself) expand: false; + add: self stampPresenter expand: true; + yourself +] + +{ #category : #initialization } +PyramidStyleSheetEditorPresenter >> initializePresenters [ + + stampPresenter := SpNullPresenter new +] + +{ #category : #accessing } +PyramidStyleSheetEditorPresenter >> stampPresenter [ + + ^ stampPresenter +] + +{ #category : #accessing } +PyramidStyleSheetEditorPresenter >> stampPresenter: anObject [ + + stampPresenter := anObject +] diff --git a/src/Pyramid-Toplo/PyramidThemeCommand.class.st b/src/Pyramid-Toplo/PyramidThemeCommand.class.st new file mode 100644 index 00000000..b5ba8a02 --- /dev/null +++ b/src/Pyramid-Toplo/PyramidThemeCommand.class.st @@ -0,0 +1,17 @@ +Class { + #name : #PyramidThemeCommand, + #superclass : #PyramidAbstractBlocCommand, + #category : #'Pyramid-Toplo-plugin-theme-management' +} + +{ #category : #'as yet unclassified' } +PyramidThemeCommand >> getValueFor: anObject [ + + ^ anObject localTheme +] + +{ #category : #'as yet unclassified' } +PyramidThemeCommand >> setValueFor: anObject with: nilOrToTheme [ + + anObject toTheme: nilOrToTheme +] diff --git a/src/Pyramid-Toplo/PyramidThemeFromSpaceExtension.class.st b/src/Pyramid-Toplo/PyramidThemeFromSpaceExtension.class.st new file mode 100644 index 00000000..ac45e856 --- /dev/null +++ b/src/Pyramid-Toplo/PyramidThemeFromSpaceExtension.class.st @@ -0,0 +1,96 @@ +Class { + #name : #PyramidThemeFromSpaceExtension, + #superclass : #Object, + #traits : 'TPyramidPlugin + TPyramidSpaceExtension + TPyramidEditorSpaceIsReadyObserver + TPyramidOpenFromSpacePluginExtension', + #classTraits : 'TPyramidPlugin classTrait + TPyramidSpaceExtension classTrait + TPyramidEditorSpaceIsReadyObserver classTrait + TPyramidOpenFromSpacePluginExtension classTrait', + #instVars : [ + 'defaultToTheme', + 'themeSpaceSelector', + 'spaceIsReady' + ], + #category : #'Pyramid-Toplo-plugin-theme-management' +} + +{ #category : #actions } +PyramidThemeFromSpaceExtension >> configureBuilder: aPyramidEditorBuilder [ + + (aPyramidEditorBuilder findPlugin: PyramidOpenFromSpacePlugin) + addExtension: self. + (aPyramidEditorBuilder findPlugin: PyramidSpacePlugin) builder + addExtension: self. + self themeSpaceSelector: (aPyramidEditorBuilder findPlugin: PyramidToploThemePlugin) + themePresenter themeSpaceSelector +] + +{ #category : #'as yet unclassified' } +PyramidThemeFromSpaceExtension >> configureCloseOnSpace: aSpace [ + + aSpace toTheme: themeSpaceSelector currentTheme. + aSpace root skinManager postponeRequestSkinIn: aSpace root +] + +{ #category : #'as yet unclassified' } +PyramidThemeFromSpaceExtension >> configureOpenFromSpace: aSpace [ + "Do something with the space" + + self defaultToTheme: aSpace toTheme. + aSpace root skinManager postponeRequestSkinIn: aSpace root +] + +{ #category : #accessing } +PyramidThemeFromSpaceExtension >> defaultToTheme [ + + ^ defaultToTheme +] + +{ #category : #accessing } +PyramidThemeFromSpaceExtension >> defaultToTheme: anObject [ + + defaultToTheme := anObject. + self themeSpaceSelector selectTheme: anObject. + self spaceIsReady ifTrue: [ self informSpaceIsReady ]. +] + +{ #category : #'as yet unclassified' } +PyramidThemeFromSpaceExtension >> informSpaceIsReady [ + + self defaultToTheme ifNil: [ self spaceIsReady: true. ^ self ]. + self builder space toTheme: self defaultToTheme +] + +{ #category : #initialization } +PyramidThemeFromSpaceExtension >> initialize [ + + spaceIsReady := false. +] + +{ #category : #displaying } +PyramidThemeFromSpaceExtension >> installOn: aBuilder [ + + self builder: aBuilder. + aBuilder addSpaceIsReadyObserver: self. +] + +{ #category : #accessing } +PyramidThemeFromSpaceExtension >> spaceIsReady [ + + ^ spaceIsReady +] + +{ #category : #accessing } +PyramidThemeFromSpaceExtension >> spaceIsReady: anObject [ + + spaceIsReady := anObject +] + +{ #category : #accessing } +PyramidThemeFromSpaceExtension >> themeSpaceSelector [ + + ^ themeSpaceSelector +] + +{ #category : #accessing } +PyramidThemeFromSpaceExtension >> themeSpaceSelector: anObject [ + + themeSpaceSelector := anObject +] diff --git a/src/Pyramid-Toplo/PyramidThemePresenter.class.st b/src/Pyramid-Toplo/PyramidThemePresenter.class.st new file mode 100644 index 00000000..b4591852 --- /dev/null +++ b/src/Pyramid-Toplo/PyramidThemePresenter.class.st @@ -0,0 +1,61 @@ +Class { + #name : #PyramidThemePresenter, + #superclass : #SpPresenter, + #instVars : [ + 'styleSheetEditor', + 'themeSpaceSelector', + 'themeElementSelector' + ], + #category : #'Pyramid-Toplo-plugin-theme-management' +} + +{ #category : #layout } +PyramidThemePresenter >> defaultLayout [ + + ^ SpBoxLayout newVertical + spacing: 4; + add: self themeSpaceSelector expand: false; + add: self themeElementSelector expand: false; + add: self styleSheetEditor expand: true; + yourself +] + +{ #category : #accessing } +PyramidThemePresenter >> editor: aPyramidEditor [ + + self themeSpaceSelector projectModel: aPyramidEditor projectModel. + self themeElementSelector projectModel: aPyramidEditor projectModel. + self themeElementSelector commandExecutor: aPyramidEditor propertiesManager commandExecutor +] + +{ #category : #layout } +PyramidThemePresenter >> initializePresenters [ + + themeSpaceSelector := PyramidSpaceThemeSelectorPresenter new. + themeElementSelector := PyramidElementThemeSelectorPresenter new. + styleSheetEditor := PyramidStyleSheetEditorPresenter new +] + +{ #category : #'as yet unclassified' } +PyramidThemePresenter >> pyramidSpaceBuilderConfigurationOn: aSpaceBuilder [ + + aSpaceBuilder addExtension: self themeSpaceSelector +] + +{ #category : #layout } +PyramidThemePresenter >> styleSheetEditor [ + + ^ styleSheetEditor +] + +{ #category : #layout } +PyramidThemePresenter >> themeElementSelector [ + + ^ themeElementSelector +] + +{ #category : #layout } +PyramidThemePresenter >> themeSpaceSelector [ + + ^ themeSpaceSelector +] diff --git a/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st new file mode 100644 index 00000000..42966674 --- /dev/null +++ b/src/Pyramid-Toplo/PyramidThemePropertyStrategy.class.st @@ -0,0 +1,45 @@ +Class { + #name : #PyramidThemePropertyStrategy, + #superclass : #PyramidHideEmptyPropertyStrategy, + #category : #'Pyramid-Toplo-plugin-theme-management' +} + +{ #category : #'as yet unclassified' } +PyramidThemePropertyStrategy >> buildPresenterFromCollection: aCollection andManager: aManager [ + + aManager removeAllProperties. + aManager addAllProperties: (self propertiesFor: aCollection). + ^ super buildPresenterFromCollection: aCollection andManager: aManager +] + +{ #category : #'as yet unclassified' } +PyramidThemePropertyStrategy >> propertiesFor: aCollectionOfElements [ + + | elementsWithStyleSheetTheme allPossibleStamps allCommonStamps | + elementsWithStyleSheetTheme := aCollectionOfElements + asOrderedCollection select: [ + :element | + element isAttachedToSceneGraph and: [ + element toTheme isKindOf: + ToStyleSheetTheme ] ]. + elementsWithStyleSheetTheme ifEmpty: [ ^ { } ]. + allPossibleStamps := elementsWithStyleSheetTheme collect: [ :each | + PyramidSelectorPossibleStamps new + theme: each toTheme; + findAllStampsFor: each ]. + allCommonStamps := allPossibleStamps first. + allPossibleStamps do: [ :each | + allCommonStamps := allCommonStamps & each ]. + ^ allCommonStamps collect: [ :each | self propertyForStamp: each ]. +] + +{ #category : #'as yet unclassified' } +PyramidThemePropertyStrategy >> propertyForStamp: aStamp [ + + | property | + property := PyramidProperty new name: aStamp; command: (PyramidStampCommand new stamp: aStamp; yourself); pyramidInputPresenterClass: PyramidSwitchInputPresenter ; yourself. + property pyramidInputPresenterStrings onLabel: 'Has stamp'. + property pyramidInputPresenterStrings offLabel: 'Has not stamp'. + property pyramidInputPresenterStrings uncertainLabel: 'Uncertain'. + ^ property +] diff --git a/src/Pyramid-Toplo/PyramidThemeSelectorPresenter.class.st b/src/Pyramid-Toplo/PyramidThemeSelectorPresenter.class.st new file mode 100644 index 00000000..faa06425 --- /dev/null +++ b/src/Pyramid-Toplo/PyramidThemeSelectorPresenter.class.st @@ -0,0 +1,135 @@ +Class { + #name : #PyramidThemeSelectorPresenter, + #superclass : #SpPresenter, + #instVars : [ + 'themeSelector', + 'buttonRefreshTheme', + 'triggerThemeChangement' + ], + #category : #'Pyramid-Toplo-plugin-theme-management' +} + +{ #category : #'as yet unclassified' } +PyramidThemeSelectorPresenter >> applyTheme [ + + self shouldBeImplemented +] + +{ #category : #accessing } +PyramidThemeSelectorPresenter >> buttonRefreshTheme [ + + ^ buttonRefreshTheme +] + +{ #category : #'as yet unclassified' } +PyramidThemeSelectorPresenter >> currentTheme [ + + ^ self themeSelector selectedItem +] + +{ #category : #layout } +PyramidThemeSelectorPresenter >> defaultLayout [ + + ^ SpBoxLayout newVertical + spacing: 4; + add: (SpBoxLayout newHorizontal + spacing: 4; + add: self labelPresenter; + add: self buttonRefreshTheme withConstraints: [ :c | + c height: 24. + c width: 24 ]; + yourself) + expand: false; + add: (SpBoxLayout newHorizontal + spacing: 4; + add: 'Theme' width: 50; + add: self themeSelector; + yourself) + expand: false; + add: SpNullPresenter new height: 10; + yourself +] + +{ #category : #initialization } +PyramidThemeSelectorPresenter >> initializeAllPossibleThemes [ + + | allThemes previousTheme | + previousTheme := self themeSelector selectedItem. + + allThemes := ToTheme allSubclasses select: [ :theme | + theme canBeDefault ]. + + allThemes := allThemes collect: [ :each | each new ]. + + self triggerThemeChangement: false. + self themeSelector items: allThemes. + + (previousTheme isNotNil and: [ allThemes includes: previousTheme ]) + ifTrue: [ self themeSelector selectItem: previousTheme ] + ifFalse: [ self themeSelector selectItem: allThemes first ]. + self triggerThemeChangement: true. +] + +{ #category : #initialization } +PyramidThemeSelectorPresenter >> initializePresenters [ + + triggerThemeChangement := false. + themeSelector := SpDropListPresenter new + whenSelectedItemChangedDo: [ :aThemeClass | + self themeSelectionChanged: aThemeClass ]; + yourself. + buttonRefreshTheme := SpButtonPresenter new + help: 'Refresh theme list.'; + icon: (self iconNamed: #refresh); + action: [ self initializeAllPossibleThemes ]; + yourself. + self initializeAllPossibleThemes +] + +{ #category : #initialization } +PyramidThemeSelectorPresenter >> labelPresenter [ + + ^ self shouldBeImplemented +] + +{ #category : #private } +PyramidThemeSelectorPresenter >> selectTheme: aToTheme [ + + self triggerThemeChangement: false. + self themeSelector selectItem: aToTheme. + self triggerThemeChangement: true. + +] + +{ #category : #'as yet unclassified' } +PyramidThemeSelectorPresenter >> themeSelectionChanged: aThemeClass [ + + aThemeClass ifNil: [ ^ self ]. + self triggerThemeChangement ifTrue: [ self applyTheme ] + +] + +{ #category : #accessing } +PyramidThemeSelectorPresenter >> themeSelector [ + + ^ themeSelector +] + +{ #category : #accessing } +PyramidThemeSelectorPresenter >> triggerThemeChangement [ + + ^ triggerThemeChangement +] + +{ #category : #accessing } +PyramidThemeSelectorPresenter >> triggerThemeChangement: anObject [ + + triggerThemeChangement := anObject +] + +{ #category : #'as yet unclassified' } +PyramidThemeSelectorPresenter >> variantSelectionChanged: aVariantClass [ + + aVariantClass ifNil: [ ^ self ]. + self triggerThemeChangement ifTrue: [ self applyTheme ] +] diff --git a/src/Pyramid-Toplo/PyramidToploThemePlugin.class.st b/src/Pyramid-Toplo/PyramidToploThemePlugin.class.st new file mode 100644 index 00000000..ad683f21 --- /dev/null +++ b/src/Pyramid-Toplo/PyramidToploThemePlugin.class.st @@ -0,0 +1,60 @@ +Class { + #name : #PyramidToploThemePlugin, + #superclass : #Object, + #traits : 'TPyramidPlugin', + #classTraits : 'TPyramidPlugin classTrait', + #instVars : [ + 'themePresenter', + 'themePropertyManager' + ], + #category : #'Pyramid-Toplo-plugin-theme-management' +} + +{ #category : #adding } +PyramidToploThemePlugin >> addPanelsOn: aPyramidSimpleWindow [ + + aPyramidSimpleWindow at: #tabRight addItem: [ :builder | + builder + makeTab: self themePresenter + label: 'Toplo-Theme' + icon: (self iconNamed: #smallPushpin) + order: 1 ] +] + +{ #category : #actions } +PyramidToploThemePlugin >> configureBuilder: aPyramidEditorBuilder [ + + | spacePlugin | + spacePlugin := aPyramidEditorBuilder findPlugin: #PyramidSpacePlugin. + self themePresenter pyramidSpaceBuilderConfigurationOn: spacePlugin builder +] + +{ #category : #connecting } +PyramidToploThemePlugin >> connectOn: aPyramidEditor [ + + self themePresenter editor: aPyramidEditor. + self themePropertyManager projectModel: aPyramidEditor projectModel +] + +{ #category : #initialization } +PyramidToploThemePlugin >> initialize [ + + themePresenter := PyramidThemePresenter new. + themePropertyManager := PyramidPropertiesManagerForSelection new + presenterStrategy: + PyramidThemePropertyStrategy new; + yourself. + themePresenter styleSheetEditor stampPresenter: themePropertyManager presenter +] + +{ #category : #accessing } +PyramidToploThemePlugin >> themePresenter [ + + ^ themePresenter +] + +{ #category : #accessing } +PyramidToploThemePlugin >> themePropertyManager [ + + ^ themePropertyManager +] diff --git a/src/Pyramid-Toplo/package.st b/src/Pyramid-Toplo/package.st new file mode 100644 index 00000000..3788959f --- /dev/null +++ b/src/Pyramid-Toplo/package.st @@ -0,0 +1 @@ +Package { #name : #'Pyramid-Toplo' } diff --git a/src/Pyramid/BlSpace.extension.st b/src/Pyramid/BlSpace.extension.st index e4b17c68..9075cef3 100644 --- a/src/Pyramid/BlSpace.extension.st +++ b/src/Pyramid/BlSpace.extension.st @@ -3,14 +3,21 @@ Extension { #name : #BlSpace } { #category : #'*Pyramid' } BlSpace >> editWithPyramid [ - | editor elements spacePlaceholder | + | editor elements spacePlaceholder openFromSpacePlugin | "Prepare image to replace the application view" spacePlaceholder := (self root exportAsForm dimmed: 0.5) asElement. spacePlaceholder addChildren: PyramidBlElementHelper openInPyramidHelper materializeAsBlElement. - "Open editor" + "Build editor" editor := PyramidEditor buildEditor. + + "PyramidOpenFromSpacePlugin used to recover theme if Toplo is loaded." + openFromSpacePlugin := editor findPlugin: PyramidOpenFromSpacePlugin. + openFromSpacePlugin extensions do: [ :each | + each configureOpenFromSpace: self ]. + + "Open editor" editor window open. self flag: @@ -33,7 +40,9 @@ BlSpace >> editWithPyramid [ editor projectModel firstLevelElements removeAll. self root removeChildren. self root addChildren: pyramidRoots. - self userData removeKey: #pyramid_isOnEdition ]. + self userData removeKey: #pyramid_isOnEdition. + openFromSpacePlugin extensions do: [ :each | + each configureCloseOnSpace: self ]. ]. ^ editor ] diff --git a/src/Pyramid/PyramidEditor.class.st b/src/Pyramid/PyramidEditor.class.st index 5c749c6b..d7a9f2ae 100644 --- a/src/Pyramid/PyramidEditor.class.st +++ b/src/Pyramid/PyramidEditor.class.st @@ -1,6 +1,8 @@ Class { #name : #PyramidEditor, #superclass : #Object, + #traits : 'TPyramidFindPlugin', + #classTraits : 'TPyramidFindPlugin classTrait', #instVars : [ 'plugins', 'projectModel', diff --git a/src/Pyramid/PyramidEditorBuilder.class.st b/src/Pyramid/PyramidEditorBuilder.class.st index f7eeb591..cfe79cb4 100644 --- a/src/Pyramid/PyramidEditorBuilder.class.st +++ b/src/Pyramid/PyramidEditorBuilder.class.st @@ -1,6 +1,8 @@ Class { #name : #PyramidEditorBuilder, #superclass : #Object, + #traits : 'TPyramidFindPlugin', + #classTraits : 'TPyramidFindPlugin classTrait', #instVars : [ 'plugins', 'editor', diff --git a/src/Pyramid/PyramidMultiplePluginsFoundError.class.st b/src/Pyramid/PyramidMultiplePluginsFoundError.class.st new file mode 100644 index 00000000..e9d18706 --- /dev/null +++ b/src/Pyramid/PyramidMultiplePluginsFoundError.class.st @@ -0,0 +1,20 @@ +Class { + #name : #PyramidMultiplePluginsFoundError, + #superclass : #PyramidError, + #instVars : [ + 'plugins' + ], + #category : #'Pyramid-core' +} + +{ #category : #accessing } +PyramidMultiplePluginsFoundError >> plugins [ + + ^ plugins +] + +{ #category : #accessing } +PyramidMultiplePluginsFoundError >> plugins: anObject [ + + plugins := anObject +] diff --git a/src/Pyramid/PyramidNoPluginFoundError.class.st b/src/Pyramid/PyramidNoPluginFoundError.class.st new file mode 100644 index 00000000..44d26e83 --- /dev/null +++ b/src/Pyramid/PyramidNoPluginFoundError.class.st @@ -0,0 +1,20 @@ +Class { + #name : #PyramidNoPluginFoundError, + #superclass : #PyramidError, + #instVars : [ + 'query' + ], + #category : #'Pyramid-core' +} + +{ #category : #accessing } +PyramidNoPluginFoundError >> query [ + + ^ query +] + +{ #category : #accessing } +PyramidNoPluginFoundError >> query: anObject [ + + query := anObject +] diff --git a/src/Pyramid/PyramidPropertiesManager.class.st b/src/Pyramid/PyramidPropertiesManager.class.st index 231003aa..06fdd063 100644 --- a/src/Pyramid/PyramidPropertiesManager.class.st +++ b/src/Pyramid/PyramidPropertiesManager.class.st @@ -10,6 +10,12 @@ Class { #category : #'Pyramid-property' } +{ #category : #removing } +PyramidPropertiesManager >> addAllProperties: aCollection [ + + aCollection do: [ :each | self addProperty: each ] +] + { #category : #adding } PyramidPropertiesManager >> addProperty: aPyramidProperty [ @@ -72,3 +78,21 @@ PyramidPropertiesManager >> properties [ ^ properties ] + +{ #category : #removing } +PyramidPropertiesManager >> removeAllProperties [ + + self properties asArray do: [ :each | self removeProperty: each ]. +] + +{ #category : #removing } +PyramidPropertiesManager >> removeProperty: aProperty [ + + + self properties remove: aProperty ifAbsent: [ PyramidPropertyNotInstalledError new + property: aProperty; + manager: self; + signal ] . + + +] diff --git a/src/Pyramid/PyramidPropertyNotInstalledError.class.st b/src/Pyramid/PyramidPropertyNotInstalledError.class.st new file mode 100644 index 00000000..839cb6c3 --- /dev/null +++ b/src/Pyramid/PyramidPropertyNotInstalledError.class.st @@ -0,0 +1,33 @@ +Class { + #name : #PyramidPropertyNotInstalledError, + #superclass : #PyramidError, + #instVars : [ + 'manager', + 'property' + ], + #category : #'Pyramid-property' +} + +{ #category : #accessing } +PyramidPropertyNotInstalledError >> manager [ + + ^ manager +] + +{ #category : #accessing } +PyramidPropertyNotInstalledError >> manager: anObject [ + + manager := anObject +] + +{ #category : #accessing } +PyramidPropertyNotInstalledError >> property [ + + ^ property +] + +{ #category : #accessing } +PyramidPropertyNotInstalledError >> property: anObject [ + + property := anObject +] diff --git a/src/Pyramid/TPyramidFindPlugin.trait.st b/src/Pyramid/TPyramidFindPlugin.trait.st new file mode 100644 index 00000000..79944593 --- /dev/null +++ b/src/Pyramid/TPyramidFindPlugin.trait.st @@ -0,0 +1,34 @@ +Trait { + #name : #TPyramidFindPlugin, + #category : #'Pyramid-core' +} + +{ #category : #'as yet unclassified' } +TPyramidFindPlugin >> findPlugin: aSymbolOrAClass [ + + | allPlugins | + allPlugins := aSymbolOrAClass isString + ifTrue: [ + self plugins select: [ :each | + each class name = aSymbolOrAClass ] ] + ifFalse: [ + self plugins select: [ :each | + each class = aSymbolOrAClass ] ]. + + allPlugins ifEmpty: [ + ^ PyramidNoPluginFoundError new + query: aSymbolOrAClass; + signal ]. + allPlugins size > 1 ifTrue: [ + ^ PyramidMultiplePluginsFoundError new + plugins: allPlugins; + signal ]. + ^ allPlugins asArray first +] + +{ #category : #accessing } +TPyramidFindPlugin >> plugins [ + "Return a collection of TPyramidPlugin instances." + + ^ self shouldBeImplemented +]