Skip to content

Commit

Permalink
Merge pull request #74 from OpenSmock/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
labordep authored Aug 17, 2023
2 parents cf8dead + 39db74f commit 31698fd
Show file tree
Hide file tree
Showing 389 changed files with 18,082 additions and 10,139 deletions.
8 changes: 5 additions & 3 deletions src/BaselineOfPyramid/BaselineOfPyramid.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ BaselineOfPyramid >> baseline: spec [
spec postLoadDoIt: #postload:package:.
self dependencies: spec.
spec
package: #Pyramid with: [ spec requires: #( #BlocSerialization ) ];
package: #Pyramid;
package: #'Pyramid-Bloc'
with: [ spec requires: #( #Pyramid #Bloc ) ];
package: #'Pyramid-Tests' with: [ spec requires: #( #Pyramid ) ];
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 ) ] ]
]

Expand Down
26 changes: 26 additions & 0 deletions src/Pyramid-Bloc/BlBackground.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Extension { #name : #BlBackground }

{ #category : #'*Pyramid-Bloc' }
BlBackground >> = aBlBackground [

aBlBackground == self ifTrue: [ ^ true ].
^ aBlBackground class = self class
]

{ #category : #'*Pyramid-Bloc' }
BlBackground >> asForm [

^ self shouldBeImplemented
]

{ #category : #'*Pyramid-Bloc' }
BlBackground >> asString [

^ self shouldBeImplemented
]

{ #category : #'*Pyramid-Bloc' }
BlBackground >> selectOnBackgroundInput: aPyramidBackgroundInputPresenter [

self shouldBeImplemented
]
7 changes: 7 additions & 0 deletions src/Pyramid-Bloc/BlBasicLayout.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #BlBasicLayout }

{ #category : #'*Pyramid-Bloc' }
BlBasicLayout >> setLayoutOn: aPyramidLayoutInputPresenter [

aPyramidLayoutInputPresenter setBasic
]
12 changes: 7 additions & 5 deletions src/Pyramid-Bloc/BlColorPaint.extension.st
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
Extension { #name : #BlColorPaint }

{ #category : #'*Pyramid-Bloc' }
BlColorPaint >> pyramidBackgroundPreview [
BlColorPaint >> asForm [

^ PyramidPaintPreviewSolidColor new color: self color
^ (Morph new
extent: 16 @ 16;
color: self color;
yourself) asForm
]

{ #category : #'*Pyramid-Bloc' }
BlColorPaint >> pyramidModalDefaultPaint: aPyramidPaintInput [
BlColorPaint >> selectOnBackgroundInput: aPyramidBackgroundInputPresenter [

aPyramidPaintInput buttonColor click.
aPyramidPaintInput inputSolid defaultColor: self color
aPyramidBackgroundInputPresenter selectPaintSolidWith: self
]
8 changes: 4 additions & 4 deletions src/Pyramid-Bloc/BlCompositeBackground.extension.st
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Extension { #name : #BlCompositeBackground }

{ #category : #'*Pyramid-Bloc' }
BlCompositeBackground >> pyramidBackgroundStrategy [
BlCompositeBackground >> asForm [

^ PyramidBackgroundPropertyInputUnknownStrategy new
^ self iconNamed: #jigsawIcon
]

{ #category : #'*Pyramid-Bloc' }
BlCompositeBackground >> pyramidSelectMenuOnModal: aModal [
BlCompositeBackground >> asString [

aModal buttonComposite click
^ 'Composite'
]
13 changes: 13 additions & 0 deletions src/Pyramid-Bloc/BlCornerRadii.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Extension { #name : #BlCornerRadii }

{ #category : #'*Pyramid-Bloc' }
BlCornerRadii >> setCornerRadiiOn: aPyramidInsetsInputPresenter [

((self topLeft closeTo: self bottomRight) and: [(self topRight closeTo: self bottomLeft)]) ifTrue: [
(self topLeft closeTo: self topRight) ifTrue: [ aPyramidInsetsInputPresenter inputArray value: { self topLeft }. ] ifFalse: [ aPyramidInsetsInputPresenter inputArray value: { self topLeft . self topRight}. ].
^ self ].

aPyramidInsetsInputPresenter inputArray value: {
self topLeft . self topRight . self bottomRight . self bottomLeft }.

]
7 changes: 7 additions & 0 deletions src/Pyramid-Bloc/BlElement.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #BlElement }

{ #category : #'*Pyramid-Bloc' }
BlElement >> asIcon [

^ self iconNamed: #class
]
11 changes: 0 additions & 11 deletions src/Pyramid-Bloc/BlElementGeometry.extension.st

This file was deleted.

8 changes: 8 additions & 0 deletions src/Pyramid-Bloc/BlEllipseGeometry.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Extension { #name : #BlEllipseGeometry }

{ #category : #'*Pyramid-Bloc' }
BlEllipseGeometry >> = anObject [

self == anObject ifTrue: [ ^ true ].
^ self class = anObject class
]
18 changes: 18 additions & 0 deletions src/Pyramid-Bloc/BlFlowLayout.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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 >> setLayoutOn: aPyramidLayoutInputPresenter [

aPyramidLayoutInputPresenter setFlow
]
32 changes: 29 additions & 3 deletions src/Pyramid-Bloc/BlGradientPaint.extension.st
Original file line number Diff line number Diff line change
@@ -1,8 +1,34 @@
Extension { #name : #BlGradientPaint }

{ #category : #'*Pyramid-Bloc' }
BlGradientPaint >> pyramidModalDefaultPaint: aPyramidPaintInput [
BlGradientPaint >> = aBlPaint [

aPyramidPaintInput buttonGradient click.
aPyramidPaintInput inputGradient stopsColor stopManager from: self stops.
self == aBlPaint ifTrue: [ ^ true ].
self class == aBlPaint class ifFalse: [ ^ false ].
^ self stops = aBlPaint stops
]

{ #category : #'*Pyramid-Bloc' }
BlGradientPaint >> asForm [

^ (Morph new
extent: 16 @ 16;
color: self stops last value;
addMorph: (Morph new
extent: 8 @ 16;
color: self stops first value;
yourself);
yourself) asForm
]

{ #category : #'*Pyramid-Bloc' }
BlGradientPaint >> selectOnBackgroundInput: aPyramidBackgroundInputPresenter [

aPyramidBackgroundInputPresenter selectPaintGradientWith: self
]

{ #category : #'*Pyramid-Bloc' }
BlGradientPaint >> selectOnGradientPaintInput: aPyramidGradientPaintInputPresenter [

aPyramidGradientPaintInputPresenter stopsInput value:self stops.
]
30 changes: 18 additions & 12 deletions src/Pyramid-Bloc/BlImageBackground.extension.st
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
Extension { #name : #BlImageBackground }

{ #category : #'*Pyramid-Bloc' }
BlImageBackground >> pyramidBackgroundStrategy [

(self image respondsTo: #pyramidExternalRessourceSource) ifTrue: [
^ PyramidBackgroundPropertyInputImage new
ressource: self image pyramidExternalRessourceSource;
yourself ].
^ PyramidBackgroundPropertyInputImage new
ressource: nil;
yourself
BlImageBackground >> = aBlBackground [

super = aBlBackground ifFalse: [ ^ false ].
^ self image = aBlBackground image
]

{ #category : #'*Pyramid-Bloc' }
BlImageBackground >> asForm [

^ self image
]

{ #category : #'*Pyramid-Bloc' }
BlImageBackground >> asString [

^ 'Image - ', self image asString
]

{ #category : #'*Pyramid-Bloc' }
BlImageBackground >> pyramidSelectMenuOnModal: aModal [
BlImageBackground >> selectOnBackgroundInput: aPyramidBackgroundInputPresenter [

aModal buttonImage click.
aModal currentPresenter setImage: self image
aPyramidBackgroundInputPresenter selectImage
]
20 changes: 20 additions & 0 deletions src/Pyramid-Bloc/BlInsets.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Extension { #name : #BlInsets }

{ #category : #'*Pyramid-Bloc' }
BlInsets >> setInsetsOn: aPyramidInsetsInputPresenter [

self isUniform ifTrue: [
aPyramidInsetsInputPresenter inputArray value: { self top }.
^ self ].
((self top closeTo: self bottom) and: [
self left closeTo: self right ]) ifTrue: [
aPyramidInsetsInputPresenter inputArray value: {
self top.
self right }.
^ self ].
aPyramidInsetsInputPresenter inputArray value: {
self top.
self right.
self bottom.
self left }
]
14 changes: 14 additions & 0 deletions src/Pyramid-Bloc/BlLayout.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Extension { #name : #BlLayout }

{ #category : #'*Pyramid-Bloc' }
BlLayout >> = anObject [

self == anObject ifTrue: [ ^ true ].
^ self class = anObject class
]

{ #category : #'*Pyramid-Bloc' }
BlLayout >> setLayoutOn: aPyramidLayoutInputPresenter [

aPyramidLayoutInputPresenter setUnknowValue
]
10 changes: 8 additions & 2 deletions src/Pyramid-Bloc/BlLayoutCommonConstraintsAxis.extension.st
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
Extension { #name : #BlLayoutCommonConstraintsAxis }

{ #category : #'*Pyramid-Bloc' }
BlLayoutCommonConstraintsAxis >> pyramidSelectConstraintsOn: aPyramidConstraintsPresenter [
BlLayoutCommonConstraintsAxis >> asPyramidConstraintsArgument [

self resizer pyramidSelectConstraintsResizerOn: aPyramidConstraintsPresenter
^ self resizer asPyramidConstraintsArgument
]

{ #category : #'*Pyramid-Bloc' }
BlLayoutCommonConstraintsAxis >> setConstraintsOn: aPyramidBasicConstraintsInputPresenter [

self resizer setResizerConstraintsOn: aPyramidBasicConstraintsInputPresenter
]
19 changes: 11 additions & 8 deletions src/Pyramid-Bloc/BlLayoutExactResizer.extension.st
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
Extension { #name : #BlLayoutExactResizer }

{ #category : #'*Pyramid-Bloc' }
BlLayoutExactResizer >> pyramidSelectConstraintsResizerOn: aPyramidConstraintsPresenter [

| item |
item := (aPyramidConstraintsPresenter selectorInputs select: [ :each |
each value targetClass = self class ]) first.
item key click.
aPyramidConstraintsPresenter submit: item value.
item value associatedPresenter number: self size.
BlLayoutExactResizer >> asPyramidConstraintsArgument [

^ {
#exact:.
self size }
]

{ #category : #'*Pyramid-Bloc' }
BlLayoutExactResizer >> setResizerConstraintsOn: aPyramidBasicConstraintsInputPresenter [

aPyramidBasicConstraintsInputPresenter setExact
]
13 changes: 13 additions & 0 deletions src/Pyramid-Bloc/BlLayoutFitContentResizer.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Extension { #name : #BlLayoutFitContentResizer }

{ #category : #'*Pyramid-Bloc' }
BlLayoutFitContentResizer >> asPyramidConstraintsArgument [

^ #fitContent
]

{ #category : #'*Pyramid-Bloc' }
BlLayoutFitContentResizer >> setResizerConstraintsOn: aPyramidBasicConstraintsInputPresenter [

aPyramidBasicConstraintsInputPresenter setFitContent
]
13 changes: 13 additions & 0 deletions src/Pyramid-Bloc/BlLayoutHorizontal.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Extension { #name : #BlLayoutHorizontal }

{ #category : #'*Pyramid-Bloc' }
BlLayoutHorizontal >> asBooleanForPyramid [

^ false
]

{ #category : #'*Pyramid-Bloc' }
BlLayoutHorizontal >> switchOrientation [

^ BlLayoutOrientation vertical
]
13 changes: 13 additions & 0 deletions src/Pyramid-Bloc/BlLayoutMatchParentResizer.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Extension { #name : #BlLayoutMatchParentResizer }

{ #category : #'*Pyramid-Bloc' }
BlLayoutMatchParentResizer >> asPyramidConstraintsArgument [

^ #matchParent
]

{ #category : #'*Pyramid-Bloc' }
BlLayoutMatchParentResizer >> setResizerConstraintsOn: aPyramidBasicConstraintsInputPresenter [

aPyramidBasicConstraintsInputPresenter setMatchParent
]
11 changes: 0 additions & 11 deletions src/Pyramid-Bloc/BlLayoutResizer.extension.st

This file was deleted.

13 changes: 13 additions & 0 deletions src/Pyramid-Bloc/BlLayoutVertical.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Extension { #name : #BlLayoutVertical }

{ #category : #'*Pyramid-Bloc' }
BlLayoutVertical >> asBooleanForPyramid [

^ true
]

{ #category : #'*Pyramid-Bloc' }
BlLayoutVertical >> switchOrientation [

^ BlLayoutOrientation horizontal
]
Loading

0 comments on commit 31698fd

Please sign in to comment.