-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
45 additions
and
46 deletions.
There are no files selected for viewing
6 changes: 4 additions & 2 deletions
6
src/Bloc-Serialization-Stash/BlAffineCompositeTransformation.extension.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
Extension { #name : #BlAffineCompositeTransformation } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlAffineCompositeTransformation >> allSetterAndGettersForMyStash [ | ||
BlAffineCompositeTransformation >> stashAccessors [ | ||
|
||
^ self transformations flatCollect: [ :each | each allSetterAndGettersForMyStash ] | ||
<stashAccessors> | ||
^ self transformations flatCollect: [ :each | | ||
each allSetterAndGettersForMyStash ] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,19 @@ | ||
Extension { #name : #BlFlowLayout } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlFlowLayout >> allSetterAndGettersForMyStash [ | ||
BlFlowLayout >> asStashConstructor [ | ||
|
||
self orientation isVertical ifTrue: [ ^ 'BlFlowLayout vertical' ]. | ||
^ 'BlFlowLayout horizontal' | ||
] | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlFlowLayout >> stashAccessors [ | ||
|
||
"We ovverride this method to take into account the default value of alignment" | ||
<stashAccessors> | ||
| settersAndGetters | | ||
settersAndGetters := OrderedCollection new. | ||
(verticalAlignment == self defaultVerticalAlignment and: [ | ||
horizontalAlignment == self defaultHorizontalAlignment ]) ifFalse: [ | ||
settersAndGetters addAll: self allSetterAndGettersForMyStashForMyTraits ]. | ||
self direction == self defaultDirection ifFalse: [ | ||
settersAndGetters add: #direction ]. | ||
^ settersAndGetters | ||
] | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlFlowLayout >> asStashConstructor [ | ||
|
||
self orientation isVertical ifTrue: [ ^ 'BlFlowLayout vertical' ]. | ||
^ 'BlFlowLayout horizontal' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,30 @@ | ||
Extension { #name : #TBlAlignable } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
TBlAlignable >> allSetterAndGettersOfTraitForMyStash: anObject [ | ||
TBlAlignable >> defaultStashAlignementTest [ | ||
|
||
^ { ([ :alignement | | ||
| val | | ||
val := #alignNone. | ||
alignement isAlignTopLeft ifTrue: [ val := #alignTopLeft ]. | ||
alignement isAlignTopCenter ifTrue: [ val := #alignTopCenter ]. | ||
alignement isAlignTopRight ifTrue: [ val := #alignTopRight ]. | ||
alignement isAlignCenterLeft ifTrue: [ val := #alignCenterLeft ]. | ||
alignement isAlignCenter ifTrue: [ val := #alignCenter ]. | ||
alignement isAlignCenterRight ifTrue: [ val := #alignCenterRight ]. | ||
alignement isAlignBottomLeft ifTrue: [ val := #alignBottomLeft ]. | ||
alignement isAlignBottomCenter ifTrue: [ | ||
val := #alignBottomCenter ]. | ||
alignement isAlignBottomRight ifTrue: [ val := #alignBottomRight ]. | ||
val ] -> self) onlySetOnStash } | ||
^ (self verticalAlignment == self defaultVerticalAlignment and: [ | ||
self horizontalAlignment == self defaultHorizontalAlignment ]) | ||
] | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
TBlAlignable >> stashAccessorForTBlAlignable [ | ||
|
||
<stashAccessors> | ||
self defaultStashAlignementTest ifTrue: [ ^ { } ]. | ||
self isAlignTopLeft ifTrue: [ ^ { #alignTopLeft onlySetOnStash } ]. | ||
self isAlignTopCenter ifTrue: [ ^ { #alignTopCenter onlySetOnStash } ]. | ||
self isAlignTopRight ifTrue: [ ^ { #alignTopRight onlySetOnStash } ]. | ||
self isAlignCenterLeft ifTrue: [ | ||
^ { #alignCenterLeft onlySetOnStash } ]. | ||
self isAlignCenter ifTrue: [ ^ { #alignCenter onlySetOnStash } ]. | ||
self isAlignCenterRight ifTrue: [ | ||
^ { #alignCenterRight onlySetOnStash } ]. | ||
self isAlignBottomLeft ifTrue: [ | ||
^ { #alignBottomLeft onlySetOnStash } ]. | ||
self isAlignBottomCenter ifTrue: [ | ||
^ { #alignBottomCenter onlySetOnStash } ]. | ||
self isAlignBottomRight ifTrue: [ | ||
^ { #alignBottomRight onlySetOnStash } ]. | ||
^ { } | ||
] |