'From Squeak3.8alpha of ''17 July 2004'' [latest update: #5976] on 28 July 2004 at 8:59:25 pm'! Object subclass: #Locale instanceVariableNames: 'id shortDate longDate time decimalSymbol digitGrouping currencySymbol currencyNotation measurement offsetLocalToUTC offsetVMToUTC dstActive ' classVariableNames: 'Current KnownLocales LanguageSymbols LocaleChangeListeners PlatformEncodings CurrentPlatform ' poolDictionaries: '' category: 'System-Localization'! IdentityDictionary subclass: #SystemDictionary instanceVariableNames: 'cachedClassNames ' classVariableNames: 'LastImageName LastQuitLogPosition LowSpaceProcess LowSpaceSemaphore MemoryHogs PrimaryLanguage ShutDownList SourceFileVersionString SpecialSelectors StartUpList StartupStamp SystemChanges SystemLanguage ' poolDictionaries: '' category: 'System-Support'! !FlapTab methodsFor: 'textual tabs' stamp: 'yo 7/28/2004 20:50'! changeTabText: aString | label | aString isEmptyOrNil ifTrue: [^ self]. label _ Locale current languageEnvironment 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. ! ! !Locale class methodsFor: 'accessing' stamp: 'yo 7/28/2004 20:32'! currentPlatform "CurrentPlatform := nil" CurrentPlatform ifNil: [CurrentPlatform := self determineCurrentLocale]. ^CurrentPlatform! ! !Locale class methodsFor: 'accessing' stamp: 'yo 7/28/2004 20:39'! currentPlatform: locale CurrentPlatform := locale. LanguageEnvironment startUp. ! ! !Unicode class methodsFor: 'class methods' stamp: 'yo 7/28/2004 20:49'! value: code | l | code < 256 ifTrue: [^ Character value: code]. l _ Locale currentPlatform languageEnvironment leadingChar. l = 0 ifTrue: [l _ 255]. ^ MultiCharacter leadingChar: l code: code. ! ! IdentityDictionary subclass: #SystemDictionary instanceVariableNames: 'cachedClassNames' classVariableNames: 'LastImageName LastQuitLogPosition LowSpaceProcess LowSpaceSemaphore MemoryHogs ShutDownList SourceFileVersionString SpecialSelectors StartUpList StartupStamp SystemChanges' poolDictionaries: '' category: 'System-Support'! Object subclass: #Locale instanceVariableNames: 'id shortDate longDate time decimalSymbol digitGrouping currencySymbol currencyNotation measurement offsetLocalToUTC offsetVMToUTC dstActive' classVariableNames: 'Current CurrentPlatform KnownLocales LanguageSymbols LocaleChangeListeners PlatformEncodings' poolDictionaries: '' category: 'System-Localization'! 'From Squeak3.8alpha of ''17 July 2004'' [latest update: #5976] on 28 July 2004 at 10:41:20 pm'! !CompoundTextConverter methodsFor: 'conversion' stamp: 'yo 7/21/2004 15:49'! nextPut: aCharacter toStream: aStream | ascii leadingChar class | aStream isBinary ifTrue: [ aCharacter class == Character ifTrue: [ ^ aStream basicNextPut: aCharacter. ]. aCharacter class == MultiCharacter ifTrue: [ "this shouldn't happen?" ^ aStream nextInt32Put: aCharacter value. ]. ]. aCharacter isUnicode ifTrue: [ class _ (EncodedCharSet charsetAt: aCharacter leadingChar) traditionalCharsetClass. ascii _ (class charFromUnicode: aCharacter asUnicode) charCode. leadingChar _ class leadingChar. ] ifFalse: [ ascii _ aCharacter charCode. leadingChar _ aCharacter leadingChar. ]. self nextPutValue: ascii toStream: aStream withShiftSequenceIfNeededForLeadingChar: leadingChar. ! ! !HandMorph methodsFor: 'multilingual' stamp: 'yo 7/28/2004 21:35'! keyboardInterpreter ^keyboardInterpreter ifNil: [keyboardInterpreter _ LanguageEnvironment currentPlatform class defaultInputInterpreter]! ! !JISX0208 class methodsFor: 'as yet unclassified' stamp: 'yo 7/21/2004 18:36'! unicodeLeadingChar ^ JapaneseEnvironment leadingChar. ! ! !LanguageEnvironment class methodsFor: 'public query' stamp: 'yo 7/28/2004 21:56'! defaultClipboardInterpreter ClipboardInterpreterClass ifNil: [ClipboardInterpreterClass _ self currentPlatform class clipboardInterpreterClass]. ^ ClipboardInterpreterClass new. ! ! !LanguageEnvironment class methodsFor: 'public query' stamp: 'yo 7/28/2004 21:56'! defaultFileNameConverter FileNameConverterClass ifNil: [FileNameConverterClass := self currentPlatform class fileNameConverterClass]. ^ FileNameConverterClass new! ! !LanguageEnvironment class methodsFor: 'public query' stamp: 'yo 7/28/2004 21:36'! defaultInputInterpreter InputInterpreterClass ifNil: [InputInterpreterClass _ self inputInterpreterClass]. ^ InputInterpreterClass new. ! ! !LanguageEnvironment class methodsFor: 'public query' stamp: 'yo 7/28/2004 21:56'! defaultSystemConverter SystemConverterClass ifNil: [SystemConverterClass _ self currentPlatform class systemConverterClass]. ^ SystemConverterClass new. ! ! !LanguageEnvironment class methodsFor: 'accessing' stamp: 'yo 7/28/2004 21:34'! currentPlatform ^ Locale currentPlatform languageEnvironment. ! ! !MultiCharacter methodsFor: 'converting' stamp: 'yo 7/21/2004 18:36'! asUnicodeChar | table charset v | charset _ EncodedCharSet charsetAt: self leadingChar. (charset isKindOf: Unicode class) ifTrue: [^ self]. table _ charset ucsTable. table isNil ifTrue: [^ Character value: 16rFFFD]. v _ table at: self charCode + 1. v = -1 ifTrue: [^ Character value: 16rFFFD]. ^ MultiCharacter leadingChar: charset unicodeLeadingChar code: v. ! ! !Preferences class methodsFor: 'fonts' stamp: 'yo 7/28/2004 21:25'! restoreDefaultFontsForJapanese "Preferences restoreDefaultFontsForJapanese" #( "(setButtonFontTo: ComicBold 15)" "(setTextButtonFontTo: NewYork 12)" "(setCodeFontTo: NewYork 12)" "Later" (setFlapsFontTo: NewYork 15) (setListFontTo: NewYork 12) (setMenuFontTo: NewYork 12) (setWindowTitleFontTo: NewYork 15) (setSystemFontTo: NewYork 12)) do: [:triplet | self perform: triplet first with: (StrikeFontSet familyName: triplet second size: triplet third)]. self setButtonFontTo: (StrikeFont familyName: #ComicBold size: 16). Smalltalk at: #BalloonMorph ifPresent: [:thatClass | thatClass setBalloonFontTo: (StrikeFontSet familyName: #NewYork size: 12)]. "Note: The standardCodeFont is not currently used -- the default font is instead; later hopefully we can split the code font out as a separate choice, but only after we're able to have the protocols reorganized such that we can know whether it's code or not when we launch the text object. Note: The standard button font is reset by this code but is not otherwise settable by a public UI (too many things can go afoul) "! ! "Postscript: " Smalltalk cleanOutUndeclared. !