Skip to content

Commit

Permalink
add BlTextAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyan11 committed Mar 6, 2024
1 parent c3f22fb commit 8dcb2d8
Show file tree
Hide file tree
Showing 14 changed files with 159 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/Stash-Serializer/BlAttributeRope.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Extension { #name : #BlAttributeRope }

{ #category : #'*Stash-Serializer' }
BlAttributeRope >> allSetterAndGettersForMyStash [

^ {
#attributes.
#rope }
]

{ #category : #'*Stash-Serializer' }
BlAttributeRope >> asStashContructor [

^ self class printString
]

{ #category : #'*Stash-Serializer' }
BlAttributeRope >> asStashObject [

^ StashBlAttributeRope new
object: self;
rope: self rope;
attributes: self attributes;
yourself
]
7 changes: 7 additions & 0 deletions src/Stash-Serializer/BlCollectionRope.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #BlCollectionRope }

{ #category : #'*Stash-Serializer' }
BlCollectionRope >> allSetterAndGettersForMyStash [

^ { #collection }
]
7 changes: 7 additions & 0 deletions src/Stash-Serializer/BlFontFamilyAttribute.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #BlFontFamilyAttribute }

{ #category : #'*Stash-Serializer' }
BlFontFamilyAttribute >> allSetterAndGettersForMyStash [

^ { #name }
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #BlFontFamilyDefaultAttribute }

{ #category : #'*Stash-Serializer' }
BlFontFamilyDefaultAttribute >> allSetterAndGettersForMyStash [

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

{ #category : #'*Stash-Serializer' }
BlFontSizeAttribute >> allSetterAndGettersForMyStash [

^ { #size }
]
7 changes: 7 additions & 0 deletions src/Stash-Serializer/BlFontSizeDefaultAttribute.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #BlFontSizeDefaultAttribute }

{ #category : #'*Stash-Serializer' }
BlFontSizeDefaultAttribute >> allSetterAndGettersForMyStash [

^ { #size }
]
7 changes: 7 additions & 0 deletions src/Stash-Serializer/BlFontWeightAttribute.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #BlFontWeightAttribute }

{ #category : #'*Stash-Serializer' }
BlFontWeightAttribute >> allSetterAndGettersForMyStash [

^ { #weight }
]
7 changes: 7 additions & 0 deletions src/Stash-Serializer/BlRopedText.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #BlRopedText }

{ #category : #'*Stash-Serializer' }
BlRopedText >> allSetterAndGettersForMyStash [

^ { #rope }
]
7 changes: 7 additions & 0 deletions src/Stash-Serializer/BlTextBackgroundAttribute.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #BlTextBackgroundAttribute }

{ #category : #'*Stash-Serializer' }
BlTextBackgroundAttribute >> allSetterAndGettersForMyStash [

^ { #paint }
]
7 changes: 7 additions & 0 deletions src/Stash-Serializer/BlTextDecorationAttribute.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #BlTextDecorationAttribute }

{ #category : #'*Stash-Serializer' }
BlTextDecorationAttribute >> allSetterAndGettersForMyStash [

^ { #decoration }
]
7 changes: 7 additions & 0 deletions src/Stash-Serializer/BlTextForegroundAttribute.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #BlTextForegroundAttribute }

{ #category : #'*Stash-Serializer' }
BlTextForegroundAttribute >> allSetterAndGettersForMyStash [

^ { #paint }
]
7 changes: 7 additions & 0 deletions src/Stash-Serializer/BlTextSpacingAttribute.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #BlTextSpacingAttribute }

{ #category : #'*Stash-Serializer' }
BlTextSpacingAttribute >> allSetterAndGettersForMyStash [

^ { #spacing }
]
41 changes: 41 additions & 0 deletions src/Stash-Serializer/StashBlAttributeRope.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Class {
#name : #StashBlAttributeRope,
#superclass : #StashObject,
#instVars : [
'rope',
'attributes'
],
#category : #'Stash-Serializer-stash-objects'
}

{ #category : #accessing }
StashBlAttributeRope >> attributes [

^ attributes
]

{ #category : #accessing }
StashBlAttributeRope >> attributes: anObject [

attributes := anObject
]

{ #category : #'stash - step' }
StashBlAttributeRope >> constructForGeneralObjectStep: aStashContructGeneralObjectsStep on: aStash [

aStashContructGeneralObjectsStep
constructBlAttributeRope: self
on: aStash
]

{ #category : #accessing }
StashBlAttributeRope >> rope [

^ rope
]

{ #category : #accessing }
StashBlAttributeRope >> rope: anObject [

rope := anObject
]
16 changes: 16 additions & 0 deletions src/Stash-Serializer/StashContructGeneralObjectsStep.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ StashContructGeneralObjectsStep >> constructAssociation: aStashAssociation on: a

]

{ #category : #actions }
StashContructGeneralObjectsStep >> constructBlAttributeRope: aStashObject on: aStash [

aStash addOnSourceCode: aStashObject constructorOrTag.
aStashObject isPropertiesSet ifTrue: [ ^ self ].

aStashObject propertiesAreSet.
aStash addOnSourceCode: '<r>'.
self
setProperty: #attributes asStashProperty
ofObject: aStashObject object
on: aStash.
aStash addOnSourceCode: '<r>'.
self setProperty: #rope asStashProperty ofObject: aStashObject object on: aStash
]

{ #category : #'as yet unclassified' }
StashContructGeneralObjectsStep >> constructBlLayoutConstraints: aStashObject on: aStash [
"horizontal - vertical"
Expand Down

0 comments on commit 8dcb2d8

Please sign in to comment.