-
Notifications
You must be signed in to change notification settings - Fork 0
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 #4 from OpenSmock/project-setup
Project setup
- Loading branch information
Showing
26 changed files
with
284 additions
and
126 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
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Extension { #name : #ToButton } | ||
|
||
{ #category : #'*Toplo-Serialization-STON' } | ||
ToButton >> stonPostReferenceResolution [ | ||
|
||
super stonPostReferenceResolution. | ||
|
||
"LabeledIcon" | ||
self userData at: #stonLabeledIcon ifPresent: [ :anElement | | ||
(self class slotNamed: #labeledIcon) write: anElement to: self. | ||
self addChild: anElement. | ||
self userData removeKey: #stonLabeledIcon ]. | ||
|
||
"Checkable" | ||
self userData at: #stonIsCheckable ifAbsent: [ ^ self ]. | ||
self beCheckable. | ||
self userData at: #stonChecked ifPresent: [ :aCheckValue | | ||
self checked: aCheckValue. | ||
self userData removeKey: #stonChecked ]. | ||
self userData at: #stonGroup ifPresent: [ :aGroup | | ||
aGroup register: self. | ||
self userData removeKey: #stonGroup ] | ||
] | ||
|
||
{ #category : #'*Toplo-Serialization-STON' } | ||
ToButton >> stonUserDataOn: aIdentityDictionary [ | ||
|
||
super stonUserDataOn: aIdentityDictionary. | ||
|
||
"LabeledIcon" | ||
(self class usesTrait: TToElementWithLabeledIcon) ifTrue: [ | ||
aIdentityDictionary at: #stonLabeledIcon put: self labeledIcon ]. | ||
|
||
"Checkable" | ||
self isCheckable ifFalse: [ ^ self ]. | ||
aIdentityDictionary at: #stonIsCheckable put: self isCheckable. | ||
aIdentityDictionary at: #stonChecked put: self isChecked. | ||
self group ifNotNil: [ | ||
aIdentityDictionary at: #stonGroup put: self group ] | ||
] |
6 changes: 3 additions & 3 deletions
6
...rialization/ToCheckableGroup.extension.st → ...zation-STON/ToCheckableGroup.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
9 changes: 5 additions & 4 deletions
9
...plo-Serialization/ToCheckbox.extension.st → ...erialization-STON/ToCheckbox.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,21 +1,22 @@ | ||
Extension { #name : #ToCheckbox } | ||
|
||
{ #category : #'*Toplo-Serialization' } | ||
{ #category : #'*Toplo-Serialization-STON' } | ||
ToCheckbox >> stonPostReferenceResolution [ | ||
|
||
super stonPostReferenceResolution. | ||
self userData at: #stonChecked ifPresent: [ :aCheckValue | | ||
self checked: aCheckValue. | ||
self userData removeKey: #stonChecked ]. | ||
self userData at: #stonGroup ifPresent: [ :aGroup | | ||
aGroup add: self. | ||
aGroup register: self. | ||
self userData removeKey: #stonGroup ] | ||
] | ||
|
||
{ #category : #'*Toplo-Serialization' } | ||
{ #category : #'*Toplo-Serialization-STON' } | ||
ToCheckbox >> stonUserDataOn: aIdentityDictionary [ | ||
|
||
super stonUserDataOn: aIdentityDictionary. | ||
aIdentityDictionary at: #stonChecked put: self checked. | ||
self group ifNotNil: [ aIdentityDictionary at: #stonGroup put: self group. ] | ||
self group ifNotNil: [ | ||
aIdentityDictionary at: #stonGroup put: self group ] | ||
] |
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,34 @@ | ||
Extension { #name : #ToElement } | ||
|
||
{ #category : #'*Toplo-Serialization-STON' } | ||
ToElement >> stonPostReferenceResolution [ | ||
|
||
super stonPostReferenceResolution. | ||
self userData at: #tooltipContent ifPresent: [ :anElement | | ||
self tooltipContent: anElement. | ||
self userData removeKey: #tooltipContent ]. | ||
] | ||
|
||
{ #category : #'*Toplo-Serialization-STON' } | ||
ToElement >> stonUserDataOn: aIdentityDictionary [ | ||
|
||
super stonUserDataOn: aIdentityDictionary. | ||
"TToEnableable" | ||
self userData | ||
at: #enabled | ||
ifPresent: [ :id | aIdentityDictionary at: #enabled put: id ]. | ||
|
||
"TToElementWithTooltip" | ||
self hasTooltip ifTrue: [ | ||
aIdentityDictionary | ||
at: #tooltipContent | ||
put: (self rawTooltipWindowManager builder asContext tempAt: 3). | ||
self userData at: #tooltipPopupDelay ifPresent: [ :aDuration | | ||
aIdentityDictionary at: #tooltipPopupDelay put: aDuration ]. | ||
self userData | ||
at: #closeTooltipWindowOnMouseLeave | ||
ifPresent: [ :aBoolean | | ||
aIdentityDictionary | ||
at: #closeTooltipWindowOnMouseLeave | ||
put: aBoolean ] ] | ||
] |
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
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 @@ | ||
Package { #name : #'Toplo-Serialization-STON' } |
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,30 @@ | ||
Extension { #name : #BlElement } | ||
|
||
{ #category : #'*Toplo-Serialization-Stash' } | ||
BlElement >> allSetterAndGettersForMyStashAllStamps [ | ||
|
||
<stashAccessors> | ||
self allStamps isEmpty ifTrue: [ ^ { } ]. | ||
^ self toStyleStore stampIndex allProperties collect: [ :assoc | | setter getter | | ||
setter := [ :element | 'addStamp: <1p> withValue:' expandMacrosWith: assoc value name ]. | ||
getter := [ :element | assoc value value ]. | ||
setter -> getter | ||
] | ||
|
||
|
||
] | ||
|
||
{ #category : #'*Toplo-Serialization-Stash' } | ||
BlElement >> allSetterAndGettersForMyStashAllTokens [ | ||
|
||
<stashAccessors> | ||
self ensuredToStyleStore. | ||
self toStyleStore tokenPropertyIndex isEmpty ifTrue: [ ^ { } ]. | ||
^ self toStyleStore tokenPropertyIndex allProperties collect: [ :assoc | | setter getter | | ||
setter := [ :element | 'addTokenNamed: <1p> withValue:' expandMacrosWith: assoc value name ]. | ||
getter := [ :element | assoc value value ]. | ||
setter -> getter | ||
] | ||
|
||
|
||
] |
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,12 @@ | ||
Extension { #name : #TToCheckable } | ||
|
||
{ #category : #'*Toplo-Serialization-Stash' } | ||
TToCheckable >> allSetterAndGettersOfTraitForMyStash: aToElement [ | ||
|
||
| settersAndGetters | | ||
self isCheckable ifFalse: [ ^ { } ]. | ||
settersAndGetters := OrderedCollection new. | ||
settersAndGetters add: #checked. | ||
settersAndGetters add: #group. | ||
^ settersAndGetters | ||
] |
25 changes: 25 additions & 0 deletions
25
src/Toplo-Serialization-Stash/TToElementWithLabeledIcon.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,25 @@ | ||
Extension { #name : #TToElementWithLabeledIcon } | ||
|
||
{ #category : #'*Toplo-Serialization-Stash' } | ||
TToElementWithLabeledIcon >> allSetterAndGettersOfTraitForMyStash: aToElement [ | ||
|
||
| settersAndGetters | | ||
settersAndGetters := OrderedCollection new. | ||
aToElement isStartToEnd ifTrue: [ settersAndGetters add: (#beStartToEnd -> nil) onlySetOnStash ]. | ||
aToElement isEndToStart ifTrue: [ settersAndGetters add: (#beEndToStart -> nil) onlySetOnStash ]. | ||
|
||
aToElement isVertical ifTrue: [ settersAndGetters add: (#isVertical -> nil) onlySetOnStash ]. | ||
aToElement isHorizontal ifTrue: [ settersAndGetters add: (#isHorizontal -> nil) onlySetOnStash ]. | ||
|
||
settersAndGetters add: #endAlignment. | ||
settersAndGetters add: #endElement. | ||
settersAndGetters add: #endInterspace. | ||
settersAndGetters add: #flexible. | ||
settersAndGetters add: #icon. | ||
settersAndGetters add: #iconContainerHeight. | ||
settersAndGetters add: #iconContainerWidth. | ||
settersAndGetters add: #label. | ||
settersAndGetters add: #startAlignment. | ||
settersAndGetters add: #startInterspace. | ||
^ settersAndGetters | ||
] |
8 changes: 8 additions & 0 deletions
8
src/Toplo-Serialization-Stash/TToElementWithTooltip.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 : #TToElementWithTooltip } | ||
|
||
{ #category : #'*Toplo-Serialization-Stash' } | ||
TToElementWithTooltip >> allSetterAndGettersOfTraitForMyStash: aToElement [ | ||
|
||
self hasTooltip ifFalse: [ ^ { } ]. | ||
^ { #tooltipBuilder. #closeTooltipWindowOnMouseLeave . #tooltipPopupDelay } | ||
] |
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 : #TToEnableable } | ||
|
||
{ #category : #'*Toplo-Serialization-Stash' } | ||
TToEnableable >> allSetterAndGettersOfTraitForMyStash: aToElement [ | ||
|
||
aToElement isEnabled ifTrue: [ ^ { } ]. | ||
^ { #enabled: -> #isEnabled } | ||
] |
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,9 @@ | ||
Extension { #name : #ToButton } | ||
|
||
{ #category : #'*Toplo-Serialization-Stash' } | ||
ToButton >> stashToButtonCheckable [ | ||
|
||
<stashAccessors> | ||
self isCheckable ifFalse: [ ^ { } ]. | ||
^ { (#beCheckable -> self) onlySetOnStash } | ||
] |
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 : #ToCheckableGroup } | ||
|
||
{ #category : #'*Toplo-Serialization-Stash' } | ||
ToCheckableGroup >> stashAccessorsForCheckableGroup [ | ||
|
||
<stashAccessors> | ||
^ { #registerAll: -> #registeredCheckables } | ||
] |
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 : #ToImage } | ||
|
||
{ #category : #'*Toplo-Serialization-Stash' } | ||
ToImage >> stashAccessorsForInnerImage [ | ||
|
||
<stashAccessors> | ||
^ { #innerImage } | ||
] |
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 : #ToLabel } | ||
|
||
{ #category : #'*Toplo-Serialization-Stash' } | ||
ToLabel >> stashAccessorsForText [ | ||
|
||
<stashAccessors> | ||
^ { #text } | ||
] |
10 changes: 10 additions & 0 deletions
10
src/Toplo-Serialization-Stash/ToObservableCollection.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,10 @@ | ||
Extension { #name : #ToObservableCollection } | ||
|
||
{ #category : #'*Toplo-Serialization-Stash' } | ||
ToObservableCollection >> asStashObject [ | ||
|
||
^ StashCollection new | ||
object: collection; | ||
classType: collection class; | ||
yourself | ||
] |
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 @@ | ||
Package { #name : #'Toplo-Serialization-Stash' } |
2 changes: 1 addition & 1 deletion
2
...tion/ToElementWithLeafForTesting.class.st → ...ests/ToElementWithLeafForTesting.class.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,5 +1,5 @@ | ||
Class { | ||
#name : #ToElementWithLeafForTesting, | ||
#superclass : #ToElement, | ||
#category : #'Toplo-Serialization-cases-test' | ||
#category : #'Toplo-Serialization-Tests' | ||
} |
Oops, something went wrong.