Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Pyramid-Bloc/PyramidAbstractBorderCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ PyramidAbstractBorderCommand >> borderBuilderOf: aBlElement [
^ builder
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidAbstractBorderCommand >> setValueFor: aBlElement with: anArgument [

| builder |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PyramidAbstractChangeDrawOrderCommand >> canBeUsedFor: anObject [
^ (super canBeUsedFor: anObject) and: [ anObject hasParent]
]

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidAbstractChangeDrawOrderCommand >> getValueFor: aBlElement [
"return current index for testing."

Expand Down
18 changes: 15 additions & 3 deletions src/Pyramid-Bloc/PyramidAddChildCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,26 @@ Class {
#category : #'Pyramid-Bloc-plugin-bloc'
}

{ #category : #'as yet unclassified' }
{ #category : #history }
PyramidAddChildCommand >> commandInverse [

^ PyramidRemoveChildCommand new
]

{ #category : #'as yet unclassified' }
{ #category : #private }
PyramidAddChildCommand >> savedIndexFor: aChild in: aParent [

| index |
index := aChild userData at: #pyramidRemovedAtIndex ifAbsent: [ 0 ].
(index = 0 or: [ index > aParent children size ])
ifTrue: [ ^ aParent children size + 1 ]
ifFalse: [ ^ index ]
]

{ #category : #setter }
PyramidAddChildCommand >> setValueFor: aBlElement with: aChildToAdd [

aBlElement addChild: aChildToAdd
aBlElement
addChild: aChildToAdd
at: (self savedIndexFor: aChildToAdd in: aBlElement)
]
6 changes: 3 additions & 3 deletions src/Pyramid-Bloc/PyramidAddChildrenCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Class {
#category : #'Pyramid-Bloc-plugin-bloc'
}

{ #category : #'as yet unclassified' }
{ #category : #history }
PyramidAddChildrenCommand >> commandInverse [

^ PyramidRemoveChildrenCommand new
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidAddChildrenCommand >> setValueFor: aBlElement with: aChildrenToAdd [

aBlElement addChildren: aChildrenToAdd
aBlElement addChildren: aChildrenToAdd
]
89 changes: 88 additions & 1 deletion src/Pyramid-Bloc/PyramidBackgroundBlocPlugin.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,86 @@ PyramidBackgroundBlocPlugin class >> outskirts [
^ property
]

{ #category : #accessing }
PyramidBackgroundBlocPlugin class >> shadow [

| property |
property := PyramidProperty new
name: 'Shadow Effect';
command: PyramidShadowCommand current;
inputPresenterClass: PyramidMagicButtonsInputPresenter;
yourself.
property inputPresenterModel
addButtonModel: (PyramidMagicButtonModel new
icon: (Smalltalk ui icons iconNamed: #blank);
helpSelected: 'No shadow.';
helpNotSelected: 'Remove shadow.';
label: 'None';
inputValue: [ BlNullEffect new ];
inputValidation: [ :value | value class = BlNullEffect ];
yourself);
addButtonModel: (PyramidMagicButtonModel new
icon: (Smalltalk ui icons iconNamed: #windowMaximize);
helpSelected: 'Shadow type is simple.';
helpNotSelected: 'Set shadow type to simple.';
label: 'Simple';
inputValue: [ PyramidShadowCommand current lastSimpleShadow ];
inputValidation: [ :value | value class = BlSimpleShadowEffect ];
yourself);
addButtonModel: (PyramidMagicButtonModel new
icon: (Smalltalk ui icons iconNamed: #radioButtonUnselected);
helpSelected: 'Shadow type is gaussian.';
helpNotSelected: 'Set shadow type to gaussian.';
label: 'Gaussian';
inputValue: [ PyramidShadowCommand current lastGaussianShadow ];
inputValidation: [ :value | value class = BlGaussianShadowEffect ];
yourself).
^ property
]

{ #category : #accessing }
PyramidBackgroundBlocPlugin class >> shadowColor [

| property |
property := PyramidProperty new
name: 'Shadow Color';
command: PyramidShadowColorCommand new;
inputPresenterClass:
PyramidColorInputSingleLineWithPickupButtonPresenter;
yourself.
^ property


]

{ #category : #accessing }
PyramidBackgroundBlocPlugin class >> shadowOffset [

| property |
property := PyramidProperty new
name: 'Shadow Offset';
command: PyramidShadowOffsetCommand new;
inputPresenterClass:
PyramidPointInputPresenter;
yourself.
property inputPresenterModel help:
'Set the position x and y for the shadow offset'.
^ property
]

{ #category : #accessing }
PyramidBackgroundBlocPlugin class >> shadowWidthGaussian [

| property |
property := PyramidProperty new
name: 'Shadow Width';
command: PyramidShadowGaussianWidthCommand new;
inputPresenterClass: PyramidNumberInputPresenter;
yourself.
property inputPresenterModel help: 'Set the width value'.
^ property
]

{ #category : #adding }
PyramidBackgroundBlocPlugin >> addPanelsOn: aPyramidSimpleWindow [

Expand Down Expand Up @@ -747,7 +827,14 @@ PyramidBackgroundBlocPlugin >> initialize [
propertiesManager addProperty: self class borderRadialInnerCenter.
propertiesManager addProperty: self class borderRadialInnerRadius.
propertiesManager addProperty: self class borderRadialOuterCenter.
propertiesManager addProperty: self class borderRadialOuterRadius
propertiesManager addProperty: self class borderRadialOuterRadius.

"Shadow"
PyramidShadowCommand resetShadowCommand.
propertiesManager addProperty: self class shadow.
propertiesManager addProperty: self class shadowColor.
propertiesManager addProperty: self class shadowOffset.
propertiesManager addProperty: self class shadowWidthGaussian
]

{ #category : #adding }
Expand Down
4 changes: 2 additions & 2 deletions src/Pyramid-Bloc/PyramidBackgroundImageCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ PyramidBackgroundImageCommand >> canBeUsedFor: anObject [
anObject background isKindOf: BlImageBackground ]
]

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundImageCommand >> getValueFor: aBlElement [

^ aBlElement background image
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidBackgroundImageCommand >> setValueFor: aBlElement with: anArgument [

aBlElement background: (BlBackground image: anArgument)
Expand Down
4 changes: 2 additions & 2 deletions src/Pyramid-Bloc/PyramidBackgroundOpacityCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Class {
#category : #'Pyramid-Bloc-plugin-bloc-visuals'
}

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundOpacityCommand >> getValueFor: aBlElement [

^ aBlElement background opacity
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidBackgroundOpacityCommand >> setValueFor: aBlElement with: anArgument [

| background |
Expand Down
4 changes: 2 additions & 2 deletions src/Pyramid-Bloc/PyramidBackgroundPaintColorCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ PyramidBackgroundPaintColorCommand >> canBeUsedFor: anObject [
anObject background paint isKindOf: BlColorPaint ] ]
]

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundPaintColorCommand >> getValueFor: aBlElement [

^ aBlElement background paint color
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidBackgroundPaintColorCommand >> setValueFor: aBlElement with: anArgument [

aBlElement background: (BlBackground paint: anArgument asBlPaint)
Expand Down
6 changes: 3 additions & 3 deletions src/Pyramid-Bloc/PyramidBackgroundPaintCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ PyramidBackgroundPaintCommand >> canBeUsedFor: anObject [
anObject background isKindOf: BlPaintBackground ]
]

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundPaintCommand >> getGroupedValueFor: aBlElement [

^ aBlElement background paint class
]

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundPaintCommand >> getValueFor: aBlElement [

^ aBlElement background paint
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidBackgroundPaintCommand >> setValueFor: aBlElement with: anArgument [

aBlElement background: (BlBackground paint: anArgument value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Class {
#category : #'Pyramid-Bloc-plugin-bloc-visuals'
}

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundPaintLinearEndCommand >> getValueFor: aBlElement [

^ aBlElement background paint end
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidBackgroundPaintLinearEndCommand >> setValueFor: aBlElement with: anArgument [

aBlElement background paint end: anArgument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Class {
#category : #'Pyramid-Bloc-plugin-bloc-visuals'
}

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundPaintLinearStartCommand >> getValueFor: aBlElement [

^ aBlElement background paint start
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidBackgroundPaintLinearStartCommand >> setValueFor: aBlElement with: anArgument [

aBlElement background paint start: anArgument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Class {
#category : #'Pyramid-Bloc-plugin-bloc-visuals'
}

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundPaintRadialInnerCenterCommand >> getValueFor: aBlElement [

^ aBlElement background paint innerCenter
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidBackgroundPaintRadialInnerCenterCommand >> setValueFor: aBlElement with: anArgument [

aBlElement background paint innerCenter: anArgument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Class {
#category : #'Pyramid-Bloc-plugin-bloc-visuals'
}

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundPaintRadialInnerRadiusCommand >> getValueFor: aBlElement [

^ aBlElement background paint innerRadius
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidBackgroundPaintRadialInnerRadiusCommand >> setValueFor: aBlElement with: anArgument [

aBlElement background paint innerRadius: anArgument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Class {
#category : #'Pyramid-Bloc-plugin-bloc-visuals'
}

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundPaintRadialOuterCenterCommand >> getValueFor: aBlElement [

^ aBlElement background paint outerCenter
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidBackgroundPaintRadialOuterCenterCommand >> setValueFor: aBlElement with: anArgument [

aBlElement background paint outerCenter: anArgument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Class {
#category : #'Pyramid-Bloc-plugin-bloc-visuals'
}

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundPaintRadialOuterRadiusCommand >> getValueFor: aBlElement [

^ aBlElement background paint outerRadius
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidBackgroundPaintRadialOuterRadiusCommand >> setValueFor: aBlElement with: anArgument [

aBlElement background paint outerRadius: anArgument
Expand Down
4 changes: 2 additions & 2 deletions src/Pyramid-Bloc/PyramidBackgroundPaintStopsCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ PyramidBackgroundPaintStopsCommand >> canBeUsedFor: anObject [
anObject background paint isKindOf: BlGradientPaint ] ]
]

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundPaintStopsCommand >> getValueFor: aBlElement [
"We ensure that we are working with a copy of the associations."

^ aBlElement background paint stops collect: [ :asso |
asso key copy -> asso value copy ]
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidBackgroundPaintStopsCommand >> setValueFor: aBlElement with: anArgument [
"We ensure that we are working with a copy of the associations."

Expand Down
6 changes: 3 additions & 3 deletions src/Pyramid-Bloc/PyramidBackgroundTypeCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ Class {
#category : #'Pyramid-Bloc-plugin-bloc-visuals'
}

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundTypeCommand >> getGroupedValueFor: aBlElement [

^ aBlElement background class
]

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBackgroundTypeCommand >> getValueFor: aBlElement [

^ aBlElement background
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidBackgroundTypeCommand >> setValueFor: aBlElement with: anArgument [
"Must be a blockClosure to ensure no background are created."

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ PyramidBasicExactHorizontalConstraintsBlocCommand >> canBeUsedFor: anObject [
anObject constraints horizontal resizer isExact ]
]

{ #category : #'as yet unclassified' }
{ #category : #getter }
PyramidBasicExactHorizontalConstraintsBlocCommand >> getValueFor: anObject [

^ anObject constraints horizontal resizer size
]

{ #category : #'as yet unclassified' }
{ #category : #setter }
PyramidBasicExactHorizontalConstraintsBlocCommand >> setValueFor: anObject with: anArgument [

^ anObject constraintsDo: [ :c | c horizontal exact: anArgument ]
Expand Down
Loading
Loading