[squeak-dev] The Trunk: Protocols-mt.78.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Mar 17 14:15:53 UTC 2021
Marcel Taeumel uploaded a new version of Protocols to project The Trunk:
http://source.squeak.org/trunk/Protocols-mt.78.mcz
==================== Summary ====================
Name: Protocols-mt.78
Author: mt
Time: 17 March 2021, 3:15:53.077151 pm
UUID: 5cf20c6e-8aca-734c-9cbb-5513228c669a
Ancestors: Protocols-mt.77
Complements EToys-mt.435
=============== Diff against Protocols-mt.77 ===============
Item was added:
+ DataType subclass: #PointType
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Protocols-Type Vocabularies'!
+
+ !PointType commentStamp: 'sw 2/8/2012 17:57' prior: 0!
+ A value type whose representing Point-valued variables.!
Item was added:
+ ----- Method: PointType>>initialValueForASlotFor: (in category 'initialization') -----
+ initialValueForASlotFor: aPlayer
+ "Answer the value to give initially to a newly created slot of the given type in the given player"
+
+ ^ 0 at 0!
Item was added:
+ ----- Method: PointType>>initialize (in category 'initialization') -----
+ initialize
+ "Initialize the receiver"
+
+ super initialize.
+ self vocabularyName: #Point!
Item was added:
+ ----- Method: Vocabulary class>>allPhrasesWithContextToTranslate (in category 'translation') -----
+ allPhrasesWithContextToTranslate
+ "Answer quads that encode phrases with (domain) context used for translation."
+
+ | literals |
+ literals := (self allStandardVocabularies
+ select:
+ [:aVocab | aVocab representsAType]
+ thenCollect:
+ [:aVocab | aVocab vocabularyName asString ]).
+ ^ {{Vocabulary class category. Vocabulary class. #typeChoices. literals}}!
Item was changed:
----- Method: Vocabulary class>>initialize (in category 'class initialization') -----
initialize
"Initialize a few standard vocabularies and place them in the AllVocabularies list. Call this to update all vocabularies."
self initializeStandardVocabularies.
self embraceAddedTypeVocabularies.
+
+ self allSubclassesDo: [:class | class initialize].
"Vocabulary initialize"
!
Item was changed:
----- Method: Vocabulary class>>initializeStandardVocabularies (in category 'class initialization') -----
initializeStandardVocabularies
"Initialize a few standard vocabularies and place them in the AllStandardVocabularies list."
AllStandardVocabularies := nil.
- Smalltalk at: #EToyVocabulary
- ifPresent:[:aClass| self addStandardVocabulary: aClass new].
- Smalltalk at: #EToyVectorVocabulary
- ifPresent:[:aClass| self addStandardVocabulary: aClass new].
self addStandardVocabulary: self newPublicVocabulary.
self addStandardVocabulary: FullVocabulary new.
self addStandardVocabulary: self newQuadVocabulary.
self addStandardVocabulary: ColorType new.
self addStandardVocabulary: BooleanType new.
self addStandardVocabulary: GraphicType new.
+ self addStandardVocabulary: PointType new.
+
- Smalltalk at: #PlayerType
- ifPresent:[:aClass| self addStandardVocabulary: aClass new].
self addStandardVocabulary: SoundType new.
self addStandardVocabulary: StringType new.
self addStandardVocabulary: MenuType new.
self addStandardVocabulary: UnknownType new.
- Smalltalk at: #ScriptNameType
- ifPresent:[:aClass| self addStandardVocabulary: aClass new].
- Smalltalk at: #PointType
- ifPresent:[:aClass| self addStandardVocabulary: aClass new].
self addStandardVocabulary: (SymbolListType new symbols: #(simple raised inset complexFramed complexRaised complexInset complexAltFramed complexAltRaised complexAltInset); vocabularyName: #BorderStyle; yourself).
+
- self addStandardVocabulary: (SymbolListType new symbols: #(lines arrows arrowheads dots); vocabularyName: #TrailStyle; yourself).
self addStandardVocabulary: (SymbolListType new symbols: #(leftToRight rightToLeft topToBottom bottomToTop); vocabularyName: #ListDirection; yourself).
self addStandardVocabulary: (SymbolListType new symbols: #(topLeft bottomRight center justified); vocabularyName: #ListCentering; yourself).
self addStandardVocabulary: (SymbolListType new symbols: #(#center #topLeft #topRight #bottomLeft #bottomRight #topCenter #leftCenter #rightCenter #bottomCenter ); vocabularyName: #CellPositioning; yourself).
self addStandardVocabulary: (SymbolListType new symbols: #(#none #localRect #localSquare #globalRect #globalSquare ); vocabularyName: #CellSpacing; yourself).
self addStandardVocabulary: (SymbolListType new symbols: #(buttonDown whilePressed buttonUp); vocabularyName: #ButtonPhase; yourself).
- self addStandardVocabulary: (SymbolListType new symbols: #(rotate #'do not rotate' #'flip left right' #'flip up down'); vocabularyName: #RotationStyle; yourself).
-
self addStandardVocabulary: (SymbolListType new symbols: #(rigid spaceFill shrinkWrap); vocabularyName: #Resizing; yourself).
self addStandardVocabulary: self newSystemVocabulary. "A custom vocabulary for Smalltalk -- still under development)"
self numberVocabulary. "creates and adds it"
"self wonderlandVocabulary." "creates and adds it"
self vocabularyForClass: Time. "creates and adds it"
- Smalltalk at: #KedamaPatchType ifPresent:[:aClass|
- self addStandardVocabulary: (aClass new vocabularyName: #Patch; yourself).
- ].
- self addStandardVocabulary: (SymbolListType new symbols: #(wrap stick bouncing); vocabularyName: #EdgeMode; yourself).
- self addStandardVocabulary: (SymbolListType new symbols: #(logScale linear color); vocabularyName: #PatchDisplayMode; yourself).
-
- self addStandardVocabulary: (SymbolListType new symbols: #(#top #'top right' #right #'bottom right' #bottom #'bottom left' #left #'top left' #center ); vocabularyName: #AttachmentEdge; yourself).
-
Smalltalk
at: #CalendarMorph
ifPresent: [:aClass | aClass assureDateFormatEstablished].
"Vocabulary initialize"!
More information about the Squeak-dev
mailing list
|