-
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.
Merge pull request #22 from OpenSmock/project-setup
Add stash package
- Loading branch information
Showing
124 changed files
with
5,233 additions
and
13 deletions.
There are no files selected for viewing
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
7 changes: 7 additions & 0 deletions
7
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Extension { #name : #BlAffineCompositeTransformation } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlAffineCompositeTransformation >> allSetterAndGettersForMyStash [ | ||
|
||
^ self transformations flatCollect: [ :each | each allSetterAndGettersForMyStash ] | ||
] |
7 changes: 7 additions & 0 deletions
7
src/Bloc-Serialization-Stash/BlAffineTransformationCenterOrigin.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Extension { #name : #BlAffineTransformationCenterOrigin } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlAffineTransformationCenterOrigin >> asStashMethodForTransformationBloc [ | ||
|
||
^ #centerOrigin | ||
] |
7 changes: 7 additions & 0 deletions
7
src/Bloc-Serialization-Stash/BlAffineTransformationLeftCenterOrigin.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Extension { #name : #BlAffineTransformationLeftCenterOrigin } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlAffineTransformationLeftCenterOrigin >> asStashMethodForTransformationBloc [ | ||
|
||
^ 'origin: <1s> new' expandMacrosWith: self class printString. | ||
] |
7 changes: 7 additions & 0 deletions
7
src/Bloc-Serialization-Stash/BlAffineTransformationNormalizedPositionOrigin.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Extension { #name : #BlAffineTransformationNormalizedPositionOrigin } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlAffineTransformationNormalizedPositionOrigin >> asStashMethodForTransformationBloc [ | ||
|
||
^ 'normalizedOrigin: <1p> @ <2p>' expandMacrosWith: self position x with: self position y | ||
] |
7 changes: 7 additions & 0 deletions
7
src/Bloc-Serialization-Stash/BlAffineTransformationPositionOrigin.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Extension { #name : #BlAffineTransformationPositionOrigin } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlAffineTransformationPositionOrigin >> asStashMethodForTransformationBloc [ | ||
|
||
^ 'origin: (<1s> new position: <2s> @ <3s>; yourself)' expandMacrosWith: self class printString with: self position x with: self position y | ||
] |
7 changes: 7 additions & 0 deletions
7
src/Bloc-Serialization-Stash/BlAffineTransformationRightCenterOrigin.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Extension { #name : #BlAffineTransformationRightCenterOrigin } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlAffineTransformationRightCenterOrigin >> asStashMethodForTransformationBloc [ | ||
|
||
^ #rightCenterOrigin | ||
] |
6 changes: 6 additions & 0 deletions
6
src/Bloc-Serialization-Stash/BlAffineTransformationTopLeftOrigin.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Extension { #name : #BlAffineTransformationTopLeftOrigin } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlAffineTransformationTopLeftOrigin >> asStashMethodForTransformationBloc [ | ||
^ #topLeftOrigin | ||
] |
8 changes: 8 additions & 0 deletions
8
src/Bloc-Serialization-Stash/BlAnnulusSectorGeometry.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Extension { #name : #BlAnnulusSectorGeometry } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlAnnulusSectorGeometry >> stashAccessors [ | ||
|
||
<stashAccessors> | ||
^ {#startAngle .#endAngle .#innerRadius .#outerRadius} | ||
] |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Extension { #name : #BlAttributeRope } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlAttributeRope >> asStashContructor [ | ||
|
||
^ self class printString | ||
] | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlAttributeRope >> asStashObject [ | ||
|
||
^ StashBlAttributeRope new | ||
object: self; | ||
rope: self rope; | ||
attributes: self attributes; | ||
yourself | ||
] | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlAttributeRope >> stashAccessors [ | ||
|
||
<stashAccessors> | ||
^ { | ||
#attributes. | ||
#rope } | ||
] |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Extension { #name : #BlBackground } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlBackground >> stashBackgroundOpacity [ | ||
|
||
<stashAccessors> | ||
^ { (#opacity) } | ||
] |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Extension { #name : #BlBasicLayout } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlBasicLayout >> asStashContructor [ | ||
|
||
^ 'BlBasicLayout uniqueInstance' | ||
] | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlBasicLayout >> shouldBeTagged [ | ||
|
||
^ false | ||
] |
8 changes: 8 additions & 0 deletions
8
src/Bloc-Serialization-Stash/BlBezierCurveGeometry.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Extension { #name : #BlBezierCurveGeometry } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlBezierCurveGeometry >> stashAccessors [ | ||
|
||
<stashAccessors> | ||
^ { #controlPoints } | ||
] |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Extension { #name : #BlBorder } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlBorder >> asStashObject [ | ||
|
||
^ StashObjectWithBuilder new | ||
builder: BlBorderBuilder new; | ||
methodToBuild: #build; | ||
object: self; | ||
yourself | ||
] | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlBorder >> stashAccessors [ | ||
|
||
<stashAccessors> | ||
| defaults settersAndGetters | | ||
settersAndGetters := OrderedCollection new. | ||
defaults := BlBorderBuilder new. | ||
self paint = defaults defaultPaint ifFalse: [ | ||
settersAndGetters add: #paint ]. | ||
self width = defaults defaultWidth ifFalse: [ | ||
settersAndGetters add: #width ]. | ||
self style lineCap = defaults defaultLineCap ifFalse: [ | ||
settersAndGetters add: | ||
#lineCap: -> [ :border | border style lineCap ] ]. | ||
self style lineJoin = defaults defaultLineJoin ifFalse: [ | ||
settersAndGetters add: #lineJoin: -> | ||
[ :border | border style lineJoin ] ]. | ||
self style miterLimit = defaults defaultMiterLimit ifFalse: [ | ||
settersAndGetters add: | ||
#miterLimit: -> [ :border | border style miterLimit ] ]. | ||
self style dashArray = defaults defaultDashArray ifFalse: [ | ||
settersAndGetters add: | ||
#dashArray: -> [ :border | border style dashArray ] ]. | ||
self style dashOffset = defaults defaultDashOffset ifFalse: [ | ||
settersAndGetters add: | ||
#dashOffset: -> [ :border | border style dashOffset ] ]. | ||
self opacity = defaults defaultOpacity ifFalse: [ | ||
settersAndGetters add: #opacity ]. | ||
|
||
^ settersAndGetters | ||
] |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Extension { #name : #BlBottomAlignment } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlBottomAlignment >> asStashSelector [ | ||
|
||
^ #alignBottom | ||
] |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Extension { #name : #BlCollectionRope } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlCollectionRope >> stashAccessors [ | ||
|
||
<stashAccessors> | ||
^ { #collection } | ||
] |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Extension { #name : #BlColorPaint } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlColorPaint >> stashAccessors [ | ||
|
||
<stashAccessors> | ||
^ { #color } | ||
] |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Extension { #name : #BlCornerRadii } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlCornerRadii >> stashAccessors [ | ||
|
||
<stashAccessors> | ||
^ { #topLeft .#topRight .#bottomLeft .#bottomRight } | ||
] |
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 |
---|---|---|
@@ -0,0 +1,90 @@ | ||
Extension { #name : #BlElement } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlElement >> allSetterAndGettersForMyStashChildren [ | ||
|
||
<stashAccessors> | ||
self shouldSerializedChildren ifFalse: [ ^ { } ]. | ||
self children ifNotEmpty: [ | ||
^ { #addChildren: -> #children } ]. | ||
^ { } | ||
] | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlElement >> allSetterAndGettersForMyStashConstraints [ | ||
|
||
<stashAccessors> | ||
(constraints allSetterAndGettersForMyStash) ifNotEmpty: [ | ||
^ { #constraintsDo: -> #constraints } ]. | ||
^ { } | ||
] | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlElement >> allSetterAndGettersForMyStashIdentifier [ | ||
|
||
<stashAccessors> | ||
| elementId | | ||
self userData at: #elementId ifAbsent: [ ^ { } ]. | ||
elementId := self userData at: #elementId. | ||
elementId class = BlElementNoId ifTrue: [ ^ { } ]. | ||
elementId class = BlElementNamedId ifTrue: [ ^ { #id } ]. | ||
^ { #elementId } | ||
|
||
] | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlElement >> allSetterAndGettersForMyStashLayout [ | ||
|
||
<stashAccessors> | ||
self layout == self defaultLayout ifFalse: [ | ||
^ { #layout } ]. | ||
^ { } | ||
|
||
] | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlElement >> allSetterAndGettersForMyStashTransformation [ | ||
|
||
<stashAccessors> | ||
self transformation isIdentity ifFalse: [ | ||
^ { #transformDo: -> #transformation } ]. | ||
^ { } | ||
] | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlElement >> allSetterAndGettersForMyStashVisuals [ | ||
|
||
<stashAccessors> | ||
| settersAndGetters | | ||
settersAndGetters := OrderedCollection new. | ||
self background == BlElementVisuals defaultBackground ifFalse: [ | ||
settersAndGetters add: #background ]. | ||
self border == BlElementVisuals defaultBorder ifFalse: [ | ||
settersAndGetters add: #border ]. | ||
self geometry == BlElementVisuals defaultGeometry ifFalse: [ | ||
settersAndGetters add: #geometry ]. | ||
self effect == (BlElementVisuals classPool at: #DefaultEffect) | ||
ifFalse: [ settersAndGetters add: #effect ]. | ||
self opacity == (BlElementVisuals classPool at: #DefaultOpacity) | ||
ifFalse: [ settersAndGetters add: #opacity ]. | ||
self visibility | ||
== (BlElementVisuals classPool at: #DefaultVisibility) ifFalse: [ | ||
settersAndGetters add: #visibility ]. | ||
self outskirts == (BlElementVisuals classPool at: #DefaultOutskirts) | ||
ifFalse: [ settersAndGetters add: #outskirts ]. | ||
self clipChildren | ||
== (BlElementVisuals classPool at: #DefaultClipChildren) ifFalse: [ | ||
settersAndGetters add: #clipChildren ]. | ||
self focusability | ||
== (BlElementVisuals classPool at: #DefaultFocusability) ifFalse: [ | ||
settersAndGetters add: #focusability ]. | ||
self elevation == (BlElementVisuals classPool at: #DefaultElevation) | ||
ifFalse: [ settersAndGetters add: #elevation ]. | ||
self focused == (BlElementVisuals classPool at: #DefaultFocused) | ||
ifFalse: [ settersAndGetters add: #focused ]. | ||
self mouseCursor | ||
== (BlElementVisuals classPool at: #DefaultMouseCursor) ifFalse: [ | ||
settersAndGetters add: #mouseCursor ]. | ||
^ settersAndGetters | ||
|
||
] |
16 changes: 16 additions & 0 deletions
16
src/Bloc-Serialization-Stash/BlElementCachedTransformation.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Extension { #name : #BlElementCachedTransformation } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlElementCachedTransformation >> asStashObject [ | ||
|
||
^ StashBlTransformation new | ||
object: self; | ||
yourself | ||
] | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlElementCachedTransformation >> stashAccessors [ | ||
|
||
<stashAccessors> | ||
^ self asElementTransformation 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Extension { #name : #BlElementGeometry } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlElementGeometry >> shouldBeTagged [ | ||
|
||
^ false | ||
] |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Extension { #name : #BlElementIndexedId } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlElementIndexedId >> stashAccessors [ | ||
|
||
<stashAccessors> | ||
^ { #index . #prefixId } | ||
] |
8 changes: 8 additions & 0 deletions
8
src/Bloc-Serialization-Stash/BlElementLocalTransformation.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Extension { #name : #BlElementLocalTransformation } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlElementLocalTransformation >> stashAccessors [ | ||
|
||
<stashAccessors> | ||
^ self affineTransformation 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Extension { #name : #BlElementNamedId } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlElementNamedId >> stashAccessors [ | ||
|
||
<stashAccessors> | ||
^ { #identifier } | ||
] |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Extension { #name : #BlElevation } | ||
|
||
{ #category : #'*Bloc-Serialization-Stash' } | ||
BlElevation >> asStashContructor [ | ||
|
||
^ self class printString , ' elevation: ' , self elevation printString | ||
] |
Oops, something went wrong.