'From Squeak3.7-m17n of 30 June 2004 [latest update: #6] on 2 July 2004 at 9:59:34 pm'! !AlignmentMorph class methodsFor: 'scripting' stamp: 'yo 7/2/2004 17:19'! defaultNameStemForInstances ^ 'Alignment' translated. ! ! !AlignmentMorphBob1 methodsFor: 'as yet unclassified' stamp: 'yo 7/2/2004 17:20'! fancyText: aString ofSize: pointSize color: aColor | answer tm | answer _ self inAColumn: { tm _ TextMorph new beAllFont: ((TextStyle default fontOfSize: pointSize) emphasized: 1); color: aColor; contents: aString translated }. tm addDropShadow. tm shadowPoint: (5@5) + tm bounds center. tm lock. ^answer ! ! !BorderStyle class methodsFor: 'instance creation' stamp: 'yo 7/2/2004 17:21'! borderStyleForSymbol: sym "Answer a border style corresponding to the given symbol" | aSymbol | aSymbol _ sym == #none ifTrue: [#simple] ifFalse: [sym]. ^ self perform: aSymbol " | aSymbol selector | aSymbol _ sym == #none ifTrue: [#simple] ifFalse: [sym]. selector _ Vocabulary eToyVocabulary translationKeyFor: aSymbol. selector isNil ifTrue: [selector _ aSymbol]. ^ self perform: selector " ! ! !ComplexProgressIndicator methodsFor: 'as yet unclassified' stamp: 'yo 7/2/2004 17:35'! addProgressDecoration: extraParam | f m | targetMorph ifNil: [^self]. (extraParam isForm) ifTrue: [targetMorph submorphsDo: [:mm | (mm isKindOf: SketchMorph) ifTrue: [mm delete]]. f := Form extent: extraParam extent depth: extraParam depth. extraParam displayOn: f. m := SketchMorph withForm: f. m align: m fullBounds leftCenter with: targetMorph fullBounds leftCenter + (2 @ 0). targetMorph addMorph: m. ^self]. (extraParam isString) ifTrue: [targetMorph submorphsDo: [:mm | (mm isKindOf: StringMorph) ifTrue: [mm delete]]. m := StringMorph contents: extraParam translated. m align: m fullBounds bottomCenter + (0 @ 8) with: targetMorph bounds bottomCenter. targetMorph addMorph: m. ^self]! ! !CompoundTileMorph methodsFor: 'initialization' stamp: 'yo 7/2/2004 17:41'! initialize "initialize the state of the receiver" | r stringMorph | super initialize. "" self layoutInset: 2. self listDirection: #topToBottom. self hResizing: #spaceFill; vResizing: #shrinkWrap; cellInset: 0 @ 1; minCellSize: 200 @ 14. r _ AlignmentMorph newRow color: color; layoutInset: 0. r setProperty: #demandsBoolean toValue: true. r addMorphBack: (Morph new color: color; extent: 2 @ 5). "spacer" stringMorph _ StringMorph new contents: 'Test' translated. stringMorph name: 'Test'. r addMorphBack: stringMorph. r addMorphBack: (Morph new color: color; extent: 5 @ 5). "spacer" r addMorphBack: (testPart _ BooleanScriptEditor new borderWidth: 0; layoutInset: 1). testPart color: Color transparent. testPart hResizing: #spaceFill. self addMorphBack: r. r _ AlignmentMorph newRow color: color; layoutInset: 0. r addMorphBack: (Morph new color: color; extent: 30 @ 5). "spacer" stringMorph _ StringMorph new contents: 'Yes' translated. stringMorph name: 'Yes'. r addMorphBack: stringMorph. r addMorphBack: (Morph new color: color; extent: 5 @ 5). "spacer" r addMorphBack: (yesPart _ ScriptEditorMorph new borderWidth: 0; layoutInset: 2). yesPart hResizing: #spaceFill. yesPart color: Color transparent. self addMorphBack: r. r _ AlignmentMorph newRow color: color; layoutInset: 0. r addMorphBack: (Morph new color: color; extent: 35 @ 5). "spacer" stringMorph _ StringMorph new contents: 'No' translated. stringMorph name: 'No'. r addMorphBack: stringMorph. r addMorphBack: (Morph new color: color; extent: 5 @ 5). "spacer" r addMorphBack: (noPart _ ScriptEditorMorph new borderWidth: 0; layoutInset: 2). noPart hResizing: #spaceFill. noPart color: Color transparent. self addMorphBack: r. self bounds: self fullBounds. self updateWordingToMatchVocabulary. ! ! !CompoundTileMorph methodsFor: 'initialization' stamp: 'yo 7/2/2004 17:35'! updateWordingToMatchVocabulary | labels | labels _ OrderedCollection new. self submorphs do: [:submorph | submorph submorphs do: [:subsubmorph | subsubmorph class == StringMorph ifTrue: [labels add: subsubmorph]]]. labels do: [:label | label acceptValue: label knownName translated] ! ! !Debugger methodsFor: 'initialize' stamp: 'yo 7/2/2004 17:42'! preDebugNotifierContentsFrom: messageString ^ Preferences eToyFriendly ifFalse: [messageString] ifTrue: ['An error has occurred; you should probably just hit ''abandon''. Sorry!!' translated] ! ! !FillInTheBlankMorph methodsFor: 'initialization' stamp: 'yo 7/2/2004 17:52'! createQueryTextMorph: queryString "create the queryTextMorph" | result frame | result := TextMorph new contents: queryString. result setNameTo: 'query' translated. result lock. frame := LayoutFrame new. frame topFraction: 0.0; topOffset: 2. frame leftFraction: 0.5; leftOffset: (result width // 2) negated. result layoutFrame: frame. self addMorph: result. ^ result! ! !FlapTab methodsFor: 'edge' stamp: 'yo 11/4/2002 20:50'! setEdge: anEdge "Set the edge as indicated, if possible" | newOrientation | self edgeToAdhereTo = anEdge ifTrue: [^ self]. newOrientation _ nil. self orientation == #vertical ifTrue: [(#(top bottom) includes: anEdge) ifTrue: [newOrientation _ #horizontal]] ifFalse: [(#(top bottom) includes: anEdge) ifFalse: [newOrientation _ #vertical]]. self edgeToAdhereTo: anEdge. newOrientation ifNotNil: [self transposeParts]. referent isInWorld ifTrue: [self positionReferent]. self changeTabText: self existingWording. self adjustPositionVisAVisFlap! ! !FlapTab methodsFor: 'menu' stamp: 'yo 7/2/2004 17:58'! changeTabText "Allow the user to change the text on the tab" | reply | reply _ FillInTheBlank request: 'new wording for this tab:' translated initialAnswer: self existingWording. reply isEmptyOrNil ifTrue: [^ self]. self changeTabText: reply. ! ! !FlapTab methodsFor: 'textual tabs' stamp: 'yo 8/11/2003 21:27'! changeTabText: aString | label | aString isEmptyOrNil ifTrue: [^ self]. label _ Smalltalk primaryLanguage flapTabTextFor: aString in: self. label isEmptyOrNil ifTrue: [^ self]. self useStringTab: label. submorphs first delete. self assumeString: label font: Preferences standardFlapFont orientation: (Flaps orientationForEdge: self edgeToAdhereTo) color: nil. ! ! !FreeTranslation class methodsFor: 'translation' stamp: 'yo 8/11/2003 21:12'! extract: aMimeDoc | pageSource str | "Extract the translated text from the web page" (aMimeDoc content beginsWith: 'error') ifTrue: [^ aMimeDoc content]. pageSource _ aMimeDoc content. "brute force way to pull out the result" str _ ReadStream on: pageSource. str match: 'Translation Results by Transparent Language'. str match: '

'. ^ str upToAll: '

'! ! !LanguageEnvironment class methodsFor: 'rendering support' stamp: 'yo 7/2/2004 17:57'! flapTabTextFor: aString "self subclassResponsibility." ^ aString. ! ! !LanguageEnvironment class methodsFor: 'rendering support' stamp: 'yo 7/2/2004 17:57'! flapTabTextFor: aString in: aFlapTab "self subclassResponsibility." ^ aString. ! ! !JapaneseEnvironment class methodsFor: 'language methods' stamp: 'yo 7/2/2004 18:00'! flapTabTextFor: aString in: aFlapTab ^ aString translated. ! ! !MethodMorph class methodsFor: 'as yet unclassified' stamp: 'yo 7/2/2004 18:03'! defaultNameStemForInstances ^ 'Method' translated. ! ! !NebraskaServerMorph methodsFor: 'drawing' stamp: 'yo 7/2/2004 18:39'! updateCurrentStatusString self server ifNil:[ currentStatusString _ '' translated. currentBacklogString _ ''. ] ifNotNil:[ currentStatusString _ ' Nebraska: ' translated, self server numClients printString, ' clients' translated. currentBacklogString _ 'backlog: ' translated, ((previousBacklog _ self server backlog) // 1024) printString,'k' ]. ! ! !NebraskaServerMorph methodsFor: 'initialization' stamp: 'yo 7/2/2004 18:38'! rebuild | myServer toggle closeBox font | font _ StrikeFont familyName: #Palatino size: 14. self removeAllMorphs. self setColorsAndBorder. self updateCurrentStatusString. toggle _ SimpleHierarchicalListMorph new perform: ( fullDisplay ifTrue: [#expandedForm] ifFalse: [#notExpandedForm] ). closeBox _ SimpleButtonMorph new borderWidth: 0; label: 'X' font: Preferences standardButtonFont; color: Color transparent; actionSelector: #delete; target: self; extent: 14@14; setBalloonText: 'End Nebrasks session'. self addARow: { self inAColumn: {closeBox}. self inAColumn: { UpdatingStringMorph new useStringFormat; target: self; font: font; getSelector: #currentStatusString; contents: self currentStatusString; stepTime: 2000; lock. }. self inAColumn: { toggle asMorph on: #mouseUp send: #toggleFull to: self; setBalloonText: 'Show more or less of Nebraska Status' }. }. myServer _ self server. (myServer isNil or: [fullDisplay not]) ifTrue: [ ^World startSteppingSubmorphsOf: self ]. "--- the expanded display ---" self addARow: { self inAColumn: { UpdatingStringMorph new useStringFormat; target: self; font: font; getSelector: #currentBacklogString; contents: self currentBacklogString; stepTime: 2000; lock. }. }. self addARow: { self inAColumn: { (StringMorph contents: '--clients--' translated) lock; font: font. }. }. myServer clients do: [ :each | self addARow: { UpdatingStringMorph new useStringFormat; target: each; font: font; getSelector: #currentStatusString; contents: each currentStatusString; stepTime: 2000; lock. } ]. World startSteppingSubmorphsOf: self.! ! !PaintBoxMorph methodsFor: 'initialization' stamp: 'yo 11/4/2002 21:20'! loadOffForm: pic16Bit "Prototype loadOffForm: (Smalltalk imageImports at: #offPaletteJapanese)" | blt | OriginalBounds _ pic16Bit boundingBox. AllOffImage _ Form extent: OriginalBounds extent depth: 16. blt _ BitBlt current toForm: AllOffImage. blt sourceForm: pic16Bit; combinationRule: Form over; sourceRect: OriginalBounds; destOrigin: 0 @ 0; copyBits. AllOffImage mapColor: Color blue to: Color transparent. self image: AllOffImage. AllOffImage _ nil. self invalidRect: bounds ! ! !PaintBoxMorph methodsFor: 'initialization' stamp: 'yo 11/4/2002 21:20'! loadPressedForm: pic16Bit "Prototype loadPressedForm: (Smalltalk imageImports at: #pressedPaletteJapanese)" | blt on | AllPressedImage _ AllPressedImage _ Form extent: OriginalBounds extent depth: 16. blt _ BitBlt current toForm: AllPressedImage. blt sourceForm: pic16Bit; combinationRule: Form over; sourceRect: OriginalBounds; destOrigin: 0 @ 0; copyBits. AllPressedImage mapColor: Color black to: Color transparent. self allMorphsDo: [:button | (button isKindOf: ThreePhaseButtonMorph) ifTrue: [on _ Form extent: button extent depth: 16. on copy: (0 @ 0 extent: button extent) from: button topLeft - self topLeft in: AllPressedImage rule: Form over. button pressedImage: on]]. AllPressedImage _ nil. self invalidRect: bounds ! ! !PartsBin class methodsFor: 'instance creation' stamp: 'yo 7/2/2004 18:50'! newPartsBinWithOrientation: aListDirection from: quadList "Answer a new PartBin object, to run horizontally or vertically, obtaining its elements from the list of tuples of the form: (