Frank Shearar uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-fbs.112.mcz ==================== Summary ==================== Name: MorphicExtras-fbs.112 Author: fbs Time: 3 July 2013, 9:50:50.965 pm UUID: 3d28e62d-4971-f14f-bbf1-29b3ab896170 Ancestors: MorphicExtras-nice.111 Some stuff that's easily movable from Morphic to MorphicExtras. =============== Diff against MorphicExtras-nice.111 =============== Item was changed: - SystemOrganization addCategory: #'MorphicExtras-Demo'! - SystemOrganization addCategory: #'MorphicExtras-AdditionalSupport'! SystemOrganization addCategory: #'MorphicExtras-AdditionalMorphs'! + SystemOrganization addCategory: #'MorphicExtras-AdditionalSupport'! - SystemOrganization addCategory: #'MorphicExtras-Widgets'! - SystemOrganization addCategory: #'MorphicExtras-Books'! - SystemOrganization addCategory: #'MorphicExtras-Postscript Filters'! - SystemOrganization addCategory: #'MorphicExtras-Support'! - SystemOrganization addCategory: #'MorphicExtras-SoundInterface'! - SystemOrganization addCategory: #'MorphicExtras-Undo'! - SystemOrganization addCategory: #'MorphicExtras-Postscript Canvases'! - SystemOrganization addCategory: #'MorphicExtras-PartsBin'! SystemOrganization addCategory: #'MorphicExtras-AdditionalWidgets'! + SystemOrganization addCategory: #'MorphicExtras-Books'! + SystemOrganization addCategory: #'MorphicExtras-Demo'! + SystemOrganization addCategory: #'MorphicExtras-EToy-Download'! SystemOrganization addCategory: #'MorphicExtras-Flaps'! - SystemOrganization addCategory: #'MorphicExtras-Navigators'! SystemOrganization addCategory: #'MorphicExtras-GeeMail'! - SystemOrganization addCategory: #'MorphicExtras-Palettes'! SystemOrganization addCategory: #'MorphicExtras-Leds'! + SystemOrganization addCategory: #'MorphicExtras-Navigators'! + SystemOrganization addCategory: #'MorphicExtras-Obsolete'! + SystemOrganization addCategory: #'MorphicExtras-Palettes'! + SystemOrganization addCategory: #'MorphicExtras-PartsBin'! + SystemOrganization addCategory: #'MorphicExtras-Postscript Canvases'! + SystemOrganization addCategory: #'MorphicExtras-Postscript Filters'! + SystemOrganization addCategory: #'MorphicExtras-SoundInterface'! SystemOrganization addCategory: #'MorphicExtras-SqueakPage'! + SystemOrganization addCategory: #'MorphicExtras-Support'! SystemOrganization addCategory: #'MorphicExtras-Text Support'! + SystemOrganization addCategory: #'MorphicExtras-Undo'! + SystemOrganization addCategory: #'MorphicExtras-Widgets'! - SystemOrganization addCategory: #'MorphicExtras-Obsolete'! - SystemOrganization addCategory: #'MorphicExtras-EToy-Download'! Item was added: + ----- Method: HandMorph>>pauseEventRecorderIn: (in category '*MorphicExtras-event handling') ----- + pauseEventRecorderIn: aWorld + "Suspend any recorder prior to a project change, and return it. + It will be resumed after starting the new project." + eventListeners ifNil:[^nil]. + eventListeners do: + [:er | (er isKindOf: EventRecorderMorph) ifTrue: [^ er pauseIn: aWorld]]. + ^ nil! Item was added: + ----- Method: Morph>>asEPS (in category '*MorphicExtras-postscript') ----- + asEPS + + ^ EPSCanvas morphAsPostscript: self rotated: false. + ! Item was added: + ----- Method: Morph>>asPostscriptPrintJob (in category '*MorphicExtras-postscript') ----- + asPostscriptPrintJob + + ^ DSCPostscriptCanvas morphAsPostscript: self rotated: false. + ! Item was added: + ----- Method: Morph>>printPSToFileNamed: (in category '*MorphicExtras-menus') ----- + printPSToFileNamed: aString + "Ask the user for a filename and print this morph as postscript." + | fileName rotateFlag psCanvasType psExtension | + fileName := aString asFileName. + psCanvasType := PostscriptCanvas defaultCanvasType. + psExtension := psCanvasType defaultExtension. + fileName := UIManager default request: (String streamContents: [ :s | + s nextPutAll: ('File name? ("{1}" will be added to end)' translated format: {psExtension})]) + initialAnswer: fileName. + fileName isEmpty + ifTrue: [^ Beeper beep]. + (fileName endsWith: psExtension) + ifFalse: [fileName := fileName , psExtension]. + rotateFlag := (UIManager default chooseFrom: { + 'portrait (tall)' translated. + 'landscape (wide)' translated. + } title: 'Choose orientation...' translated) = 2. + ((FileStream newFileNamed: fileName asFileName) converter: TextConverter defaultSystemConverter) + nextPutAll: (psCanvasType morphAsPostscript: self rotated: rotateFlag); + close! Item was added: + ----- Method: PasteUpMorph class>>newWorldTesting (in category '*MorphicExtras-project') ----- + newWorldTesting + + | world ex | + + ex := 500@500. + world := PasteUpMorph newWorldForProject: nil. + world extent: ex; color: Color orange. + world openInWorld. + world viewBox: (0@0 extent: ex). + BouncingAtomsMorph new openInWorld: world. + + "----- + + | world window | + world := PasteUpMorph newWorldForProject: nil. + world extent: 300@300; color: Color orange. + world viewBox: (0@0 extent: 300@300). + window := (SystemWindow labelled: 'the new world') model: world. + window color: Color orange. + window addMorph: world frame: (0@0 extent: 1.0@1.0). + window openInWorld. + + ---" + ! |
Free forum by Nabble | Edit this page |