diff --git a/src/Pyramid-Bloc/BlBezierCurveGeometry.extension.st b/src/Pyramid-Bloc/BlBezierCurveGeometry.extension.st new file mode 100644 index 0000000..c280514 --- /dev/null +++ b/src/Pyramid-Bloc/BlBezierCurveGeometry.extension.st @@ -0,0 +1,27 @@ +Extension { #name : #BlBezierCurveGeometry } + +{ #category : #'*Pyramid-Bloc' } +BlBezierCurveGeometry class >> asIcon [ + + ^ super asIcon copy: (0 @ 12 extent: 16 @ 12) +] + +{ #category : #'*Pyramid-Bloc' } +BlBezierCurveGeometry class >> pyramidDefaultValue [ + + ^ self controlPoints: { + (0 @ 0). + (0 @ 75). + (50 @ -25). + (50 @ 50) } +] + +{ #category : #'*Pyramid-Bloc' } +BlBezierCurveGeometry class >> pyramidDefaultValueForIcon [ + + ^ self controlPoints: { + (0 @ 0). + (0 @ 24). + (16 @ -12). + (16 @ 12) } +] diff --git a/src/Pyramid-Bloc/BlElementGeometry.extension.st b/src/Pyramid-Bloc/BlElementGeometry.extension.st new file mode 100644 index 0000000..0fb38d9 --- /dev/null +++ b/src/Pyramid-Bloc/BlElementGeometry.extension.st @@ -0,0 +1,41 @@ +Extension { #name : #BlElementGeometry } + +{ #category : #'*Pyramid-Bloc' } +BlElementGeometry class >> asIcon [ + + | element | + element := BlElement new + size: 16 @ 12; + background: (Color gray: 0.75); + border: (BlBorder paint: Color black width: 1); + geometry: self pyramidDefaultValueForIcon; + yourself. + ^ element exportAsForm +] + +{ #category : #'*Pyramid-Bloc' } +BlElementGeometry class >> asPyramidMagicButton [ + + ^ PyramidMagicButtonModel new + icon: self asIcon; + helpSelected: + ('The geometry is <1s>.' expandMacrosWith: self name); + helpNotSelected: + ('Set the geometry to <1s>.' expandMacrosWith: self name); + label: ''; + inputValue: self pyramidDefaultValue; + inputValidation: [ :value | value isKindOf: self ]; + yourself +] + +{ #category : #'*Pyramid-Bloc' } +BlElementGeometry class >> pyramidDefaultValue [ + + ^ self new +] + +{ #category : #'*Pyramid-Bloc' } +BlElementGeometry class >> pyramidDefaultValueForIcon [ + + ^ self pyramidDefaultValue +] diff --git a/src/Pyramid-Bloc/BlLineGeometry.extension.st b/src/Pyramid-Bloc/BlLineGeometry.extension.st new file mode 100644 index 0000000..9025ceb --- /dev/null +++ b/src/Pyramid-Bloc/BlLineGeometry.extension.st @@ -0,0 +1,13 @@ +Extension { #name : #BlLineGeometry } + +{ #category : #'*Pyramid-Bloc' } +BlLineGeometry class >> pyramidDefaultValue [ + + ^ self from: 0 asPoint to: 50 asPoint +] + +{ #category : #'*Pyramid-Bloc' } +BlLineGeometry class >> pyramidDefaultValueForIcon [ + + ^ self from: 0 asPoint to: 12 asPoint +] diff --git a/src/Pyramid-Bloc/BlPolygonGeometry.extension.st b/src/Pyramid-Bloc/BlPolygonGeometry.extension.st new file mode 100644 index 0000000..a8b793c --- /dev/null +++ b/src/Pyramid-Bloc/BlPolygonGeometry.extension.st @@ -0,0 +1,19 @@ +Extension { #name : #BlPolygonGeometry } + +{ #category : #'*Pyramid-Bloc' } +BlPolygonGeometry class >> pyramidDefaultValue [ + + ^ self vertices: { + (0 @ 50). + (0 @ 0). + (25 @ 25). + (50 @ 0). + (50 @ 50) } +] + +{ #category : #'*Pyramid-Bloc' } +BlPolygonGeometry class >> pyramidDefaultValueForIcon [ + + ^ self vertices: + (self pyramidDefaultValue vertices collect: [ :each | each / 4.2 ]) +] diff --git a/src/Pyramid-Bloc/BlPolylineGeometry.extension.st b/src/Pyramid-Bloc/BlPolylineGeometry.extension.st new file mode 100644 index 0000000..2e54f29 --- /dev/null +++ b/src/Pyramid-Bloc/BlPolylineGeometry.extension.st @@ -0,0 +1,18 @@ +Extension { #name : #BlPolylineGeometry } + +{ #category : #'*Pyramid-Bloc' } +BlPolylineGeometry class >> pyramidDefaultValue [ + + ^ self vertices: { + (0 @ 50). + (0 @ 0). + (25 @ 25). + (50 @ 0). + (50 @ 50) } +] + +{ #category : #'*Pyramid-Bloc' } +BlPolylineGeometry class >> pyramidDefaultValueForIcon [ + + ^ self vertices: (self pyramidDefaultValue vertices collect: [ :each | each / 4.2 ]) +] diff --git a/src/Pyramid-Bloc/BlRoundedRectangleGeometry.extension.st b/src/Pyramid-Bloc/BlRoundedRectangleGeometry.extension.st new file mode 100644 index 0000000..0d46098 --- /dev/null +++ b/src/Pyramid-Bloc/BlRoundedRectangleGeometry.extension.st @@ -0,0 +1,7 @@ +Extension { #name : #BlRoundedRectangleGeometry } + +{ #category : #'*Pyramid-Bloc' } +BlRoundedRectangleGeometry class >> pyramidDefaultValue [ + + ^ self cornerRadius: 8 +] diff --git a/src/Pyramid-Bloc/BlVisibility.extension.st b/src/Pyramid-Bloc/BlVisibility.extension.st index ef2b965..7739bc6 100644 --- a/src/Pyramid-Bloc/BlVisibility.extension.st +++ b/src/Pyramid-Bloc/BlVisibility.extension.st @@ -2,8 +2,20 @@ Extension { #name : #BlVisibility } { #category : #'*Pyramid-Bloc' } BlVisibility >> asIcon [ -"return a 16 by 16 `Form`" - ^ self shouldBeImplemented + + | bloc target | + bloc := self class blocIcon. + target := bloc isCollection + ifTrue: [ + BlElement new + layout: BlFrameLayout new; + constraintsDo: [ :c | + c horizontal fitContent. + c vertical fitContent ]; + addChildren: bloc; + yourself ] + ifFalse: [ bloc ]. + ^ target exportAsForm ] { #category : #'*Pyramid-Bloc' } @@ -13,6 +25,12 @@ BlVisibility >> asString [ ^ self shouldBeImplemented ] +{ #category : #'*Pyramid-Bloc' } +BlVisibility class >> blocIcon [ + + ^ self shouldBeImplemented +] + { #category : #'*Pyramid-Bloc' } BlVisibility >> nextVisibilityForTree [ "return the next visibility. diff --git a/src/Pyramid-Bloc/BlVisibilityGone.extension.st b/src/Pyramid-Bloc/BlVisibilityGone.extension.st index 29ae7c2..d9ca712 100644 --- a/src/Pyramid-Bloc/BlVisibilityGone.extension.st +++ b/src/Pyramid-Bloc/BlVisibilityGone.extension.st @@ -1,17 +1,116 @@ Extension { #name : #BlVisibilityGone } { #category : #'*Pyramid-Bloc' } -BlVisibilityGone >> asIcon [ +BlVisibilityGone >> asString [ - ^ PyramidBlocPlugin - iconOf: PyramidBlocPlugin blocVisibilityGone - maxHeight: 12 + ^ 'gone' ] { #category : #'*Pyramid-Bloc' } -BlVisibilityGone >> asString [ +BlVisibilityGone class >> blocIcon [ + "This class has been generated using Pyramid. - ^ 'gone' + By: YannLEGOFF + 2024-08-02 09:26:40" + + + ^ [ + | blinsets1 | + blinsets1 := BlInsets + top: 0.0 + right: 2.0 + bottom: 0.0 + left: 0.0. + { (BlElement new + geometry: BlRectangleGeometry new; + constraintsDo: [ :constraints | + constraints horizontal exact: 24.0. + constraints vertical exact: 12.0 ]; + layout: BlLinearLayout horizontal; + addChildren: { + (BlElement new + background: (BlPaintBackground new + paint: (BlColorPaint new + color: (Color + r: 0.5728250244379277 + g: 0.8191593352883676 + b: 1.0 + alpha: 1.0); + yourself); + opacity: 1.0; + yourself); + border: (BlBorderBuilder new + paint: (BlColorPaint new + color: (Color + r: 0.0 + g: 0.0 + b: 0.0 + alpha: 1.0); + yourself); + build); + geometry: BlRectangleGeometry new; + constraintsDo: [ :constraints | + constraints horizontal matchParent. + constraints vertical matchParent. + constraints margin: blinsets1 ]; + id: #B; + yourself). + (BlElement new + background: (BlPaintBackground new + paint: (BlColorPaint new + color: (Color + r: 0.5728250244379277 + g: 0.8191593352883676 + b: 1.0 + alpha: 1.0); + yourself); + opacity: 1.0; + yourself); + border: (BlBorderBuilder new + paint: (BlColorPaint new + color: (Color + r: 0.0 + g: 0.0 + b: 0.0 + alpha: 1.0); + yourself); + build); + geometry: BlRectangleGeometry new; + constraintsDo: [ :constraints | + constraints horizontal matchParent. + constraints vertical matchParent. + constraints margin: blinsets1 ]; + id: #C; + yourself). + (BlElement new + background: (BlPaintBackground new + paint: (BlColorPaint new + color: (Color + r: 0.5728250244379277 + g: 0.8191593352883676 + b: 1.0 + alpha: 1.0); + yourself); + opacity: 1.0; + yourself); + border: (BlBorderBuilder new + paint: (BlColorPaint new + color: (Color + r: 0.0 + g: 0.0 + b: 0.0 + alpha: 1.0); + yourself); + build); + geometry: BlRectangleGeometry new; + visibility: BlVisibility hidden; + constraintsDo: [ :constraints | + constraints horizontal matchParent. + constraints vertical matchParent ]; + id: #D; + yourself) }; + id: #A; + yourself) } ] value ] { #category : #'*Pyramid-Bloc' } diff --git a/src/Pyramid-Bloc/BlVisibilityHidden.extension.st b/src/Pyramid-Bloc/BlVisibilityHidden.extension.st index 7ae6f88..a8f7424 100644 --- a/src/Pyramid-Bloc/BlVisibilityHidden.extension.st +++ b/src/Pyramid-Bloc/BlVisibilityHidden.extension.st @@ -1,17 +1,115 @@ Extension { #name : #BlVisibilityHidden } { #category : #'*Pyramid-Bloc' } -BlVisibilityHidden >> asIcon [ +BlVisibilityHidden >> asString [ - ^ PyramidBlocPlugin - iconOf: PyramidBlocPlugin blocVisibilityHidden - maxHeight: 12 + ^ 'hidden' ] { #category : #'*Pyramid-Bloc' } -BlVisibilityHidden >> asString [ +BlVisibilityHidden class >> blocIcon [ + "This class has been generated using Pyramid. - ^ 'hidden' + By: YannLEGOFF + 2024-08-02 09:25:56" + + + ^ [ + | blinsets1 | + blinsets1 := BlInsets + top: 0.0 + right: 2.0 + bottom: 0.0 + left: 0.0. + { (BlElement new + geometry: BlRectangleGeometry new; + constraintsDo: [ :constraints | + constraints horizontal exact: 24.0. + constraints vertical exact: 12.0 ]; + layout: BlLinearLayout horizontal; + addChildren: { + (BlElement new + background: (BlPaintBackground new + paint: (BlColorPaint new + color: (Color + r: 0.5728250244379277 + g: 0.8191593352883676 + b: 1.0 + alpha: 1.0); + yourself); + opacity: 1.0; + yourself); + border: (BlBorderBuilder new + paint: (BlColorPaint new + color: (Color + r: 0.0 + g: 0.0 + b: 0.0 + alpha: 1.0); + yourself); + build); + geometry: BlRectangleGeometry new; + constraintsDo: [ :constraints | + constraints horizontal matchParent. + constraints vertical matchParent. + constraints margin: blinsets1 ]; + id: #B; + yourself). + (BlElement new + background: (BlPaintBackground new + paint: (BlColorPaint new + color: (Color + r: 0.863147605083089 + g: 0.863147605083089 + b: 0.863147605083089 + alpha: 1.0); + yourself); + opacity: 1.0; + yourself); + border: (BlBorderBuilder new + paint: (BlColorPaint new + color: (Color + r: 0.0 + g: 0.0 + b: 0.0 + alpha: 1.0); + yourself); + build); + geometry: BlRectangleGeometry new; + constraintsDo: [ :constraints | + constraints horizontal matchParent. + constraints vertical matchParent. + constraints margin: blinsets1 ]; + id: #C; + yourself). + (BlElement new + background: (BlPaintBackground new + paint: (BlColorPaint new + color: (Color + r: 0.5728250244379277 + g: 0.8191593352883676 + b: 1.0 + alpha: 1.0); + yourself); + opacity: 1.0; + yourself); + border: (BlBorderBuilder new + paint: (BlColorPaint new + color: (Color + r: 0.0 + g: 0.0 + b: 0.0 + alpha: 1.0); + yourself); + build); + geometry: BlRectangleGeometry new; + constraintsDo: [ :constraints | + constraints horizontal matchParent. + constraints vertical matchParent ]; + id: #D; + yourself) }; + id: #A; + yourself) } ] value ] { #category : #'*Pyramid-Bloc' } diff --git a/src/Pyramid-Bloc/BlVisibilityVisible.extension.st b/src/Pyramid-Bloc/BlVisibilityVisible.extension.st index 50314af..cd34073 100644 --- a/src/Pyramid-Bloc/BlVisibilityVisible.extension.st +++ b/src/Pyramid-Bloc/BlVisibilityVisible.extension.st @@ -1,17 +1,115 @@ Extension { #name : #BlVisibilityVisible } { #category : #'*Pyramid-Bloc' } -BlVisibilityVisible >> asIcon [ +BlVisibilityVisible >> asString [ - ^ PyramidBlocPlugin - iconOf: PyramidBlocPlugin blocVisibilityVisible - maxHeight: 12 + ^ 'visible' ] { #category : #'*Pyramid-Bloc' } -BlVisibilityVisible >> asString [ +BlVisibilityVisible class >> blocIcon [ + "This class has been generated using Pyramid. - ^ 'visible' + By: YannLEGOFF + 2024-08-02 09:24:49" + + + ^ [ + | blinsets1 | + blinsets1 := BlInsets + top: 0.0 + right: 2.0 + bottom: 0.0 + left: 0.0. + { (BlElement new + geometry: BlRectangleGeometry new; + constraintsDo: [ :constraints | + constraints horizontal exact: 24.0. + constraints vertical exact: 12.0 ]; + layout: BlLinearLayout horizontal; + addChildren: { + (BlElement new + background: (BlPaintBackground new + paint: (BlColorPaint new + color: (Color + r: 0.5728250244379277 + g: 0.8191593352883676 + b: 1.0 + alpha: 1.0); + yourself); + opacity: 1.0; + yourself); + border: (BlBorderBuilder new + paint: (BlColorPaint new + color: (Color + r: 0.0 + g: 0.0 + b: 0.0 + alpha: 1.0); + yourself); + build); + geometry: BlRectangleGeometry new; + constraintsDo: [ :constraints | + constraints horizontal matchParent. + constraints vertical matchParent. + constraints margin: blinsets1 ]; + id: #B; + yourself). + (BlElement new + background: (BlPaintBackground new + paint: (BlColorPaint new + color: (Color + r: 0.5728250244379277 + g: 0.8191593352883676 + b: 1.0 + alpha: 1.0); + yourself); + opacity: 1.0; + yourself); + border: (BlBorderBuilder new + paint: (BlColorPaint new + color: (Color + r: 0.0 + g: 0.0 + b: 0.0 + alpha: 1.0); + yourself); + build); + geometry: BlRectangleGeometry new; + constraintsDo: [ :constraints | + constraints horizontal matchParent. + constraints vertical matchParent. + constraints margin: blinsets1 ]; + id: #C; + yourself). + (BlElement new + background: (BlPaintBackground new + paint: (BlColorPaint new + color: (Color + r: 0.5728250244379277 + g: 0.8191593352883676 + b: 1.0 + alpha: 1.0); + yourself); + opacity: 1.0; + yourself); + border: (BlBorderBuilder new + paint: (BlColorPaint new + color: (Color + r: 0.0 + g: 0.0 + b: 0.0 + alpha: 1.0); + yourself); + build); + geometry: BlRectangleGeometry new; + constraintsDo: [ :constraints | + constraints horizontal matchParent. + constraints vertical matchParent ]; + id: #D; + yourself) }; + id: #A; + yourself) } ] value ] { #category : #'*Pyramid-Bloc' } diff --git a/src/Pyramid-Bloc/PyramidBlocGeometryPlugin.class.st b/src/Pyramid-Bloc/PyramidBlocGeometryPlugin.class.st new file mode 100644 index 0000000..b4e5e21 --- /dev/null +++ b/src/Pyramid-Bloc/PyramidBlocGeometryPlugin.class.st @@ -0,0 +1,75 @@ +Class { + #name : #PyramidBlocGeometryPlugin, + #superclass : #Object, + #traits : 'TPyramidPlugin', + #classTraits : 'TPyramidPlugin classTrait', + #instVars : [ + 'propertiesManager' + ], + #category : #'Pyramid-Bloc-plugin-bloc-geometry' +} + +{ #category : #accessing } +PyramidBlocGeometryPlugin class >> geometry [ + + | property | + property := PyramidProperty new + name: 'Geo'; + command: PyramidGeometryCommand new; + inputPresenterClass: PyramidMagicButtonsInputPresenter; + yourself. + self geometryClasses do: [ :each | + property inputPresenterModel addButtonModel: + each asPyramidMagicButton ]. + ^ property +] + +{ #category : #'as yet unclassified' } +PyramidBlocGeometryPlugin class >> geometryClasses [ + + ^ { + BlRectangleGeometry. + BlRoundedRectangleGeometry. + BlSquareGeometry. + BlEllipseGeometry. + BlCircleGeometry. + BlAnnulusSectorGeometry. + BlTriangleGeometry. + BlPolylineGeometry. + BlBezierCurveGeometry. + BlPolygonGeometry } +] + +{ #category : #adding } +PyramidBlocGeometryPlugin >> addPanelsOn: aPyramidSimpleWindow [ + + aPyramidSimpleWindow at: #tabRight addItem: [ :builder | + builder + makeTab: self propertiesManager mainPresenter + label: 'Geo' + icon: (Smalltalk ui icons iconNamed: #box) + order: 4 ] +] + +{ #category : #connecting } +PyramidBlocGeometryPlugin >> connectOn: aPyramidEditor [ + + propertiesManager projectModel: aPyramidEditor projectModel. + propertiesManager commandExecutor: + aPyramidEditor commandExecutor +] + +{ #category : #initialization } +PyramidBlocGeometryPlugin >> initialize [ + + propertiesManager := PyramidPropertiesManagerForSelection new. + + propertiesManager addProperty: self class geometry. + +] + +{ #category : #adding } +PyramidBlocGeometryPlugin >> propertiesManager [ + + ^ propertiesManager +] diff --git a/src/Pyramid-Bloc/PyramidBlocPlugin.class.st b/src/Pyramid-Bloc/PyramidBlocPlugin.class.st index 4a8c165..1ab83e1 100644 --- a/src/Pyramid-Bloc/PyramidBlocPlugin.class.st +++ b/src/Pyramid-Bloc/PyramidBlocPlugin.class.st @@ -11,223 +11,6 @@ Class { #category : #'Pyramid-Bloc-plugin-bloc' } -{ #category : #'pyramid-serialized-bloc' } -PyramidBlocPlugin class >> blocVisibilityGone [ - "This class has been generated using Pyramid. - - By: YannLEGOFF - 2024-08-02 09:26:40" - - - ^ [ | blinsets1 | -blinsets1 := BlInsets top: 0.0 right: 2.0 bottom: 0.0 left: 0.0. -{(BlElement new - geometry: BlRectangleGeometry new; - constraintsDo: [:constraints | constraints horizontal exact: 24.0. - constraints vertical exact: 12.0 ]; - layout: BlLinearLayout horizontal; - addChildren: {(BlElement new - background: (BlPaintBackground new - paint: (BlColorPaint new - color: (Color r: 0.5728250244379277 g: 0.8191593352883676 b: 1.0 alpha: 1.0); - yourself); - opacity: 1.0; - yourself); - border: (BlBorderBuilder new - paint: (BlColorPaint new - color: (Color r: 0.0 g: 0.0 b: 0.0 alpha: 1.0); - yourself); - build); - geometry: BlRectangleGeometry new; - constraintsDo: [:constraints | constraints horizontal matchParent. - constraints vertical matchParent. - constraints margin: blinsets1 ]; - id: #B; - yourself) . - (BlElement new - background: (BlPaintBackground new - paint: (BlColorPaint new - color: (Color r: 0.5728250244379277 g: 0.8191593352883676 b: 1.0 alpha: 1.0); - yourself); - opacity: 1.0; - yourself); - border: (BlBorderBuilder new - paint: (BlColorPaint new - color: (Color r: 0.0 g: 0.0 b: 0.0 alpha: 1.0); - yourself); - build); - geometry: BlRectangleGeometry new; - constraintsDo: [:constraints | constraints horizontal matchParent. - constraints vertical matchParent. - constraints margin: blinsets1 ]; - id: #C; - yourself) . - (BlElement new - background: (BlPaintBackground new - paint: (BlColorPaint new - color: (Color r: 0.5728250244379277 g: 0.8191593352883676 b: 1.0 alpha: 1.0); - yourself); - opacity: 1.0; - yourself); - border: (BlBorderBuilder new - paint: (BlColorPaint new - color: (Color r: 0.0 g: 0.0 b: 0.0 alpha: 1.0); - yourself); - build); - geometry: BlRectangleGeometry new; - visibility: BlVisibility hidden; - constraintsDo: [:constraints | constraints horizontal matchParent. - constraints vertical matchParent ]; - id: #D; - yourself)}; - id: #A; - yourself)} ] value -] - -{ #category : #'pyramid-serialized-bloc' } -PyramidBlocPlugin class >> blocVisibilityHidden [ - "This class has been generated using Pyramid. - - By: YannLEGOFF - 2024-08-02 09:25:56" - - - ^ [ | blinsets1 | -blinsets1 := BlInsets top: 0.0 right: 2.0 bottom: 0.0 left: 0.0. -{(BlElement new - geometry: BlRectangleGeometry new; - constraintsDo: [:constraints | constraints horizontal exact: 24.0. - constraints vertical exact: 12.0 ]; - layout: BlLinearLayout horizontal; - addChildren: {(BlElement new - background: (BlPaintBackground new - paint: (BlColorPaint new - color: (Color r: 0.5728250244379277 g: 0.8191593352883676 b: 1.0 alpha: 1.0); - yourself); - opacity: 1.0; - yourself); - border: (BlBorderBuilder new - paint: (BlColorPaint new - color: (Color r: 0.0 g: 0.0 b: 0.0 alpha: 1.0); - yourself); - build); - geometry: BlRectangleGeometry new; - constraintsDo: [:constraints | constraints horizontal matchParent. - constraints vertical matchParent. - constraints margin: blinsets1 ]; - id: #B; - yourself) . - (BlElement new - background: (BlPaintBackground new - paint: (BlColorPaint new - color: (Color r: 0.863147605083089 g: 0.863147605083089 b: 0.863147605083089 alpha: 1.0); - yourself); - opacity: 1.0; - yourself); - border: (BlBorderBuilder new - paint: (BlColorPaint new - color: (Color r: 0.0 g: 0.0 b: 0.0 alpha: 1.0); - yourself); - build); - geometry: BlRectangleGeometry new; - constraintsDo: [:constraints | constraints horizontal matchParent. - constraints vertical matchParent. - constraints margin: blinsets1 ]; - id: #C; - yourself) . - (BlElement new - background: (BlPaintBackground new - paint: (BlColorPaint new - color: (Color r: 0.5728250244379277 g: 0.8191593352883676 b: 1.0 alpha: 1.0); - yourself); - opacity: 1.0; - yourself); - border: (BlBorderBuilder new - paint: (BlColorPaint new - color: (Color r: 0.0 g: 0.0 b: 0.0 alpha: 1.0); - yourself); - build); - geometry: BlRectangleGeometry new; - constraintsDo: [:constraints | constraints horizontal matchParent. - constraints vertical matchParent ]; - id: #D; - yourself)}; - id: #A; - yourself)} ] value -] - -{ #category : #'pyramid-serialized-bloc' } -PyramidBlocPlugin class >> blocVisibilityVisible [ - "This class has been generated using Pyramid. - - By: YannLEGOFF - 2024-08-02 09:24:49" - - - ^ [ | blinsets1 | -blinsets1 := BlInsets top: 0.0 right: 2.0 bottom: 0.0 left: 0.0. -{(BlElement new - geometry: BlRectangleGeometry new; - constraintsDo: [:constraints | constraints horizontal exact: 24.0. - constraints vertical exact: 12.0 ]; - layout: BlLinearLayout horizontal; - addChildren: {(BlElement new - background: (BlPaintBackground new - paint: (BlColorPaint new - color: (Color r: 0.5728250244379277 g: 0.8191593352883676 b: 1.0 alpha: 1.0); - yourself); - opacity: 1.0; - yourself); - border: (BlBorderBuilder new - paint: (BlColorPaint new - color: (Color r: 0.0 g: 0.0 b: 0.0 alpha: 1.0); - yourself); - build); - geometry: BlRectangleGeometry new; - constraintsDo: [:constraints | constraints horizontal matchParent. - constraints vertical matchParent. - constraints margin: blinsets1 ]; - id: #B; - yourself) . - (BlElement new - background: (BlPaintBackground new - paint: (BlColorPaint new - color: (Color r: 0.5728250244379277 g: 0.8191593352883676 b: 1.0 alpha: 1.0); - yourself); - opacity: 1.0; - yourself); - border: (BlBorderBuilder new - paint: (BlColorPaint new - color: (Color r: 0.0 g: 0.0 b: 0.0 alpha: 1.0); - yourself); - build); - geometry: BlRectangleGeometry new; - constraintsDo: [:constraints | constraints horizontal matchParent. - constraints vertical matchParent. - constraints margin: blinsets1 ]; - id: #C; - yourself) . - (BlElement new - background: (BlPaintBackground new - paint: (BlColorPaint new - color: (Color r: 0.5728250244379277 g: 0.8191593352883676 b: 1.0 alpha: 1.0); - yourself); - opacity: 1.0; - yourself); - border: (BlBorderBuilder new - paint: (BlColorPaint new - color: (Color r: 0.0 g: 0.0 b: 0.0 alpha: 1.0); - yourself); - build); - geometry: BlRectangleGeometry new; - constraintsDo: [:constraints | constraints horizontal matchParent. - constraints vertical matchParent ]; - id: #D; - yourself)}; - id: #A; - yourself)} ] value -] - { #category : #accessing } PyramidBlocPlugin class >> clipChildren [ @@ -289,30 +72,6 @@ PyramidBlocPlugin class >> geometry [ ^ property ] -{ #category : #'as yet unclassified' } -PyramidBlocPlugin class >> iconOf: anObject [ - - | target | - target := anObject isCollection ifTrue: [ - BlElement new constraintsDo: [ :c | c horizontal fitContent . c vertical fitContent ]; addChildren: anObject; yourself. - ] ifFalse: [anObject ]. - ^ target exportAsForm -] - -{ #category : #'as yet unclassified' } -PyramidBlocPlugin class >> iconOf: aBlElement maxHeight: aNumber [ - - | form scale | - aBlElement isCollection ifTrue: [ - ^ self - iconOf: aBlElement first - maxHeight: aNumber ]. - form := aBlElement exportAsForm. - form height = 0 ifTrue: [ ^ form ]. - scale := aNumber / form height. - ^ form magnifyBy: scale -] - { #category : #accessing } PyramidBlocPlugin class >> visibility [ @@ -372,11 +131,10 @@ PyramidBlocPlugin class >> zIndex [ { #category : #adding } PyramidBlocPlugin >> addPanelsOn: aPyramidSimpleWindow [ - aPyramidSimpleWindow at: #tabRight addItem: [ :builder | builder makeTab: self propertiesManager mainPresenter - label: 'Properties' + label: 'Props' icon: (Smalltalk ui icons iconNamed: #box) order: 1 ].