Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-kb.255.mcz ==================== Summary ==================== Name: Morphic-kb.255 Author: kb Time: 28 November 2009, 3:17:35 am UUID: d6d55229-7919-7549-b367-dc7f20d5db58 Ancestors: Morphic-dtl.252 - Removal of TheWorldMainDockingBarOld. Cleaning up references in the preamble. Load System-kb.180 before. =============== Diff against Morphic-dtl.252 =============== Item was changed: Item was removed: - ----- Method: TheWorldMainDockingBarOld>>createButtonIcon:help:selector: (in category 'private - buttons') ----- - createButtonIcon: aFormOrMorph help: helpStringOrNil selector: selector - "Private - Creates a button to fire an action from a docking bar" - | button icon | - button := RectangleMorph new. - button extent: aFormOrMorph extent + 2. - button borderWidth: 0. - button color: self offColor. - helpStringOrNil isNil - - ifFalse: [button setBalloonText: helpStringOrNil translated]. - "" - icon := aFormOrMorph isMorph - ifTrue: [aFormOrMorph] - ifFalse: [SketchMorph withForm: aFormOrMorph]. - button addMorphCentered: icon. - "" - button - on: #mouseDown - send: #perform:event:for: - to: self - withValue: selector. - button - on: #mouseEnter - send: #colorOnEvent:for: - to: self. - button - on: #mouseLeave - send: #colorOffEvent:for: - to: self. - "" - ^ button! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>offColor (in category 'private - buttons') ----- - offColor - "Private - answer the off color" - ^ Color black alpha: 0.01! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>hideAllViewersIn: (in category 'menu actions') ----- - hideAllViewersIn: aMorph - aMorph isFlapTab - ifTrue: [self hideAllViewersIn: aMorph referent]. - aMorph - submorphsDo: [:each | "" - ({ScriptEditorMorph. StandardViewer} includes: each class) - ifTrue: [each dismiss] - ifFalse: [self hideAllViewersIn: each]]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>changeSoundVolume (in category 'menu actions') ----- - changeSoundVolume - self notYetImplemented! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>volumeIcon (in category 'private - icons') ----- - volumeIcon - ^ Preferences tinyDisplay - ifTrue: [MenuIcons smallVolumeIcon] - ifFalse: [MenuIcons volumeIcon]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>publishProject (in category 'menu actions') ----- - publishProject - self - publishStyle: #limitedSuperSwikiPublishDirectoryList - forgetURL: false - withRename: false! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>nextProject (in category 'menu actions') ----- - nextProject - Project advanceToNextProject. - Beeper beep! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>appearance (in category 'menu actions') ----- - appearance - self worldMenu appearanceMenu popUpInWorld ! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>windows (in category 'menu actions') ----- - windows - self worldMenu windowsMenu popUpInWorld! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>switchToExpertMode (in category 'menu actions') ----- - switchToExpertMode - | ok | - ok := self confirm: 'CAUTION!! - The expert mode is powerful as well as dangerous and you can break your Squeak in several ways. - Are you sure to switch to expert mode?' translated. - ok - ifFalse: [^ self]. - "" - Preferences enable: #cmdGesturesEnabled. - Preferences enable: #debugHaloHandle. - Preferences disable: #noviceMode. - ! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>createButtonIcon:selector: (in category 'private - buttons') ----- - createButtonIcon: aFormOrMorph selector: selector - "Private - Creates a button to fire an action from a docking bar" - ^ self - createButtonIcon: aFormOrMorph - help: nil - selector: selector! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>setColorTheme (in category 'menu actions') ----- - setColorTheme - SmallLandColorTheme chooseTheme. ! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>showAllViewers (in category 'menu actions') ----- - showAllViewers - self world showAllPlayers! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>fillMenuItemsBar: (in category 'construction') ----- - fillMenuItemsBar: aDockingBar - "Private - fill the given docking bar" - | squeakIcon homeIcon configurationIcon helpIcon squeakLabel projectLabel configurationLabel helpLabel | - (aDockingBar isDockingBar not - or: [Preferences tinyDisplay]) - ifTrue: ["" - squeakIcon := MenuIcons smallSqueakIcon. - homeIcon := MenuIcons smallHomeIcon. - configurationIcon := MenuIcons smallConfigurationIcon. - helpIcon := MenuIcons smallHelpIcon] - ifFalse: ["" - squeakIcon := MenuIcons squeakIcon. - homeIcon := MenuIcons homeIcon. - configurationIcon := MenuIcons configurationIcon. - helpIcon := MenuIcons helpIcon]. - "" - Preferences tinyDisplay - ifTrue: ["" - squeakLabel := '' . - projectLabel := '' . - configurationLabel := '' . - helpLabel := '' ] - ifFalse: ["" - squeakLabel := 'Squeak' translated. - projectLabel := 'Project' translated. - configurationLabel := 'Configuration' translated. - helpLabel := 'Help' translated]. - "" - aDockingBar - add: squeakLabel - icon: squeakIcon - help: 'Options related to Squeak as a whole' translated - subMenu: self squeakMenu. - aDockingBar - add: projectLabel - icon: homeIcon - help: 'Options to open things in the current project or to navigate between projects' translated - subMenu: self projectMenu. - aDockingBar - add: configurationLabel - icon: configurationIcon - help: 'Options to configure Squeak' translated - subMenu: self configurationMenu. - aDockingBar - add: helpLabel - icon: helpIcon - help: 'Helpful options or options to get help' translated - subMenu: self helpMenu! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>forwardIcon (in category 'private - icons') ----- - forwardIcon - ^ Preferences tinyDisplay - ifTrue: [MenuIcons smallForwardIcon] - ifFalse: [MenuIcons forwardIcon]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>objectsIcon (in category 'private - icons') ----- - objectsIcon - ^ Preferences tinyDisplay - ifTrue: [MenuIcons smallObjectsIcon] - ifFalse: [MenuIcons objectsIcon]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>clearTurtleTrails (in category 'menu actions') ----- - clearTurtleTrails - self world clearTurtleTrails! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>paintIcon (in category 'private - icons') ----- - paintIcon - ^ Preferences tinyDisplay - ifTrue: [MenuIcons smallPaintIcon] - ifFalse: [MenuIcons paintIcon]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>about (in category 'menu actions') ----- - about - - ! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>createDockingBar (in category 'construction') ----- - createDockingBar - "Create a docking bar from the receiver's representation" - | dockingBar | - dockingBar := DockingBarMorph new. - dockingBar adhereToTop. - dockingBar color: ColorTheme current dockingBarColor. - dockingBar gradientRamp: ColorTheme current dockingBarGradientRamp. - dockingBar autoGradient: ColorTheme current dockingBarAutoGradient. - "" - self fillDockingBar: dockingBar. - "" - ^ dockingBar! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>findAnyFile (in category 'menu actions') ----- - findAnyFile - FileList2 morphicViewGeneralLoaderInWorld: self world! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>hideAllViewers (in category 'menu actions') ----- - hideAllViewers - self hideAllViewersIn: self world! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>exitFromFullScreen (in category 'menu actions') ----- - exitFromFullScreen - self toggleFullScreen! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>saveAsNewVersionMenuItem (in category 'construction - submenus') ----- - saveAsNewVersionMenuItem - - ^{ 'Save As New Version'. - 'Save the current state of Squeak on disk under a version-stamped name'. - MenuIcons smallSaveAsIcon. - #saveAsNewVersion }! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>viewObjectsHierarchy (in category 'menu actions') ----- - viewObjectsHierarchy - "self world findWindow: nil" - MorphHierarchy openOrDelete! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>squeakLogoIcon (in category 'private - icons') ----- - squeakLogoIcon - - ^MenuIcons squeakLogoIcon! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>openIcon (in category 'private - icons') ----- - openIcon - ^ Preferences tinyDisplay - ifTrue: [MenuIcons smallOpenIcon] - ifFalse: [MenuIcons openIcon]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>jumpIcon (in category 'private - icons') ----- - jumpIcon - ^ Preferences tinyDisplay - ifTrue: [MenuIcons smallJumpIcon] - ifFalse: [MenuIcons jumpIcon]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>projectMenu (in category 'construction - submenus') ----- - projectMenu - | menu | - menu := MenuMorph new defaultTarget: self. - "" - Preferences noviceMode - ifFalse: ["" - self createMenuItem: {'open...'. nil. MenuIcons smallOpenIcon} on: menu. - self createMenuItem: {'windows...'. nil. MenuIcons smallWindowIcon} on: menu. - menu addLine]. - "" - self createMenuItem: {'previous project'. 'Return to the most recently visited project'. MenuIcons smallBackIcon} on: menu. - self createMenuItem: {'jump to project...'. 'Put up a list of all projects, letting me choose one to go to'. MenuIcons smallJumpIcon} on: menu. - self createMenuItem: {'next project'. 'Go to next project'. MenuIcons smallForwardIcon} on: menu. - menu addLine. - self createMenuItem: {'find any file'. 'Import a file into Squeak'. MenuIcons smallOpenIcon} on: menu. - self createMenuItem: {'find a project'. 'Open a project into Squeak'. MenuIcons smallLoadProjectIcon} on: menu. - menu addLine. - self createMenuItem: {'new project'. 'Start a new project'. MenuIcons smallProjectIcon} on: menu. - self createMenuItem: {'make new drawing'. 'Make a painting'. MenuIcons smallPaintIcon} on: menu. - self createMenuItem: {'object catalog (o)'. 'A tool for finding and obtaining many kinds of objects'. MenuIcons smallObjectCatalogIcon} on: menu. - menu addLine. - self createMenuItem: {'object from paste buffer'. 'Create a new object from paste buffer'. MenuIcons smallPasteIcon} on: menu. - Preferences useUndo - ifTrue: ["" - Preferences infiniteUndo - ifTrue: ["" - menu - addUpdating: #undoMenuWording - target: self commandHistory - action: #undoLastCommand. - menu - addUpdating: #redoMenuWording - target: self commandHistory - action: #redoNextCommand] - ifFalse: ["" - menu - addUpdating: #undoOrRedoMenuWording - target: self commandHistory - action: #undoOrRedoCommand]]. - menu addLine. - self createMenuItem: {'view objects hierarchy'. 'A tool for discovering the objects and the relations between them'. MenuIcons smallObjectsIcon} on: menu. - menu addLine. - self createMenuItem: {'publish project'. 'Publish the current project'. MenuIcons smallPublishIcon} on: menu. - "" - ^ menu! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>jumpToProject (in category 'menu actions') ----- - jumpToProject - Project current jumpToProject! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>saveAndQuit (in category 'menu actions') ----- - saveAndQuit - SmalltalkImage current snapshot: true andQuit: true! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>projectIcon (in category 'private - icons') ----- - projectIcon - ^ Preferences tinyDisplay - ifTrue: [MenuIcons smallProjectIcon] - ifFalse: [MenuIcons projectIcon]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>viewSelectedObject (in category 'menu actions') ----- - viewSelectedObject - | selected menu | - selected := self world selectedObject. - selected isNil - ifTrue: [^ self viewObjectsHierarchy]. - "" - menu := selected buildYellowButtonMenu: ActiveHand. - menu - addTitle: selected externalName - icon: (selected iconOrThumbnailOfSize: (Preferences tinyDisplay ifTrue: [16] ifFalse: [28])). - menu popUpInWorld: selected currentWorld! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>setWorldColor (in category 'menu actions') ----- - setWorldColor - | world | - world := self world. - world - changeColorTarget: world - selector: #color: - originalColor: world color - hand: world activeHand! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>findAProject (in category 'menu actions') ----- - findAProject - FileList2 - morphicViewProjectLoader2InWorld: self world - reallyLoad: true - dirFilterType: #limitedSuperSwikiDirectoryList! Item was removed: - ----- Method: TheWorldMainDockingBarOld class>>showWorldMainDockingBar: (in category 'preferences') ----- - showWorldMainDockingBar: aBoolean - - Project current showWorldMainDockingBar: aBoolean! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>purgeUndoRecords (in category 'menu actions') ----- - purgeUndoRecords - CommandHistory resetAllHistory! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>previousProject (in category 'menu actions') ----- - previousProject - - Project returnToPreviousProject. - Project current exit. "go to parent if no previous" - Beeper beep.! Item was removed: - ----- Method: TheWorldMainDockingBarOld class>>localeChanged (in category 'as yet unclassified') ----- - localeChanged - self updateInstances! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>importFile (in category 'menu actions') ----- - importFile - self findAnyFile! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>publishIcon (in category 'private - icons') ----- - publishIcon - ^ Preferences tinyDisplay - ifTrue: [MenuIcons smallPublishIcon] - ifFalse: [MenuIcons publishIcon]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>openDockingBar (in category 'construction') ----- - openDockingBar - ^ self createDockingBar openInWorld ! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>objectFromPasteBuffer (in category 'menu actions') ----- - objectFromPasteBuffer - ActiveHand pasteMorph! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>createMenuItem:on: (in category 'private') ----- - createMenuItem: triplet on: menu - | wording help selectorOrMenu | - wording := triplet first. - help := triplet second. - selectorOrMenu := triplet size > 3 - ifTrue: [triplet fourth] - ifFalse: [self selectorForWording: wording]. - "" - selectorOrMenu isSymbol - ifTrue: ["" - menu - add: wording translated - target: self - selector: selectorOrMenu] - ifFalse: [menu add: wording translated subMenu: selectorOrMenu]. - "" - help isNil - ifFalse: [menu lastItem setBalloonText: help translated]."" - Preferences tinyDisplay - ifFalse: [triplet size > 2 - ifTrue: [menu lastItem icon: triplet third]]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>saveAndQuitMenuItem (in category 'construction - submenus') ----- - saveAndQuitMenuItem - - ^{ 'Save And Quit'. - 'Save the current state of Squeak on disk, and quit out of Squeak'. - MenuIcons smallQuitIcon. - #saveAndQuit }! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>objectCatalog (in category 'menu actions') ----- - objectCatalog - self activateObjectsTool! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>setLanguage (in category 'menu actions') ----- - setLanguage - Project current chooseNaturalLanguage ! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>gradientRamp (in category 'construction') ----- - gradientRamp - - ^{ - 0.0 -> Color white. - 1.0 -> Preferences menuColor }! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>publishStyle:forgetURL:withRename: (in category 'menu actions') ----- - publishStyle: aSymbol forgetURL: aBoolean withRename: renameBoolean - - | w primaryServer rename | - - w := self world ifNil: [^Beeper beep]. - w setProperty: #SuperSwikiPublishOptions toValue: aSymbol. - - primaryServer := w project primaryServerIfNil: [nil]. - rename := ((primaryServer notNil - and: [primaryServer acceptsUploads]) not) - or: [renameBoolean]. - w setProperty: #SuperSwikiRename toValue: rename. - - w project - storeOnServerShowProgressOn: self - forgetURL: aBoolean | rename. - ! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>quitMenuItem (in category 'construction - submenus') ----- - quitMenuItem - - ^{ 'Quit'. - 'Quit out of Squeak'. - MenuIcons smallQuitIcon. - #quit }! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>switchToNoviceMode (in category 'menu actions') ----- - switchToNoviceMode - Preferences disable: #cmdGesturesEnabled. - Preferences disable: #debugHaloHandle. - Preferences enable: #noviceMode. - ! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>preferences (in category 'menu actions') ----- - preferences - PreferenceBrowser open! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>selectorForWording: (in category 'private') ----- - selectorForWording: aString - "Private - Create a valid smalltalk selector from an english - wording. - 'foo' -> #foo - 'foo....' -> #foo - 'foo bar' -> #fooBar - 'foo bar (f)' - #fooBar - " - | words selector temp | - temp := aString. - ('*(*)*' match: temp) - ifTrue: [| pre post | - pre := temp copyUpTo: $(. - post := temp copyAfterLast: $). - temp := pre , post]. - "" - temp := temp - collect: [:each | "" - each isLetter - ifTrue: [each] - ifFalse: [Character space]]. - words := temp subStrings: Character separators. - selector := String - streamContents: [:stream | "" - words - do: [:word | stream nextPutAll: word capitalized]]. - selector at: 1 put: selector first asLowercase. - "" - ^ selector asSymbol! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>switchToFullScreen (in category 'menu actions') ----- - switchToFullScreen - self toggleFullScreen! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>aboutMenuItem (in category 'construction - submenus') ----- - aboutMenuItem - - ^{ 'About Squeak...'. - nil. - nil. - #about }! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>quit (in category 'menu actions') ----- - quit - Preferences readOnlyMode - ifTrue: [""(self confirm: 'REALLY quit Squeak?' translated) - ifTrue: [SmalltalkImage current snapshot: false andQuit: true]] - ifFalse: [| saveBeforeQuitting | - saveBeforeQuitting := self - confirm: 'Save changes before quitting?' translated - orCancel: [^ self]. - SmalltalkImage current snapshot: saveBeforeQuitting andQuit: true]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>squeakMenu (in category 'construction - submenus') ----- - squeakMenu - | menu | - menu := MenuMorph new defaultTarget: self. - "" - " - menu add: 'configuration...' translated subMenu: self - configurationMenu. menu lastItem icon: MenuIcons - smallConfigurationIcon. menu addLine. - " - Preferences readOnlyMode ifFalse:["" - self createMenuItem: {'save'. 'Save the current state of Squeak on disk'. MenuIcons smallSaveIcon} on: menu. - self createMenuItem: {'save as...'. 'Save the current state of Squeak on disk under a new name'. MenuIcons smallSaveAsIcon} on: menu. - Preferences noviceMode - ifFalse: ["" - self createMenuItem: {'save as new version'. 'Save the current state of Squeak on disk under a version-stamped name'. MenuIcons smallSaveAsIcon} on: menu]. - menu addLine. - self createMenuItem: {'save and quit'. 'Save the current state of Squeak on disk, and quit out of Squeak'. MenuIcons smallQuitIcon} on: menu]. - self createMenuItem: {'quit'. 'Quit out of Squeak'. MenuIcons smallQuitIcon} on: menu. - "" - ^ menu! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>squeakLogoInvertedIcon (in category 'private - icons') ----- - squeakLogoInvertedIcon - - ^MenuIcons squeakLogoInvertedIcon! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>updateIfNeeded: (in category 'private') ----- - updateIfNeeded: aDockingBar - "Update the given docking bar if needed" - | timeStamp | - timeStamp := aDockingBar - valueOfProperty: #mainDockingBarTimeStamp - ifAbsent: [^ self]. - timeStamp = self class timeStamp - ifTrue: [^ self]. - "" - aDockingBar removeAllMorphs. - self fillDockingBar: aDockingBar! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>worldMenu (in category 'private') ----- - worldMenu - ^ TheWorldMenu new - world: self world - project: Project current - hand: self world activeHand; yourself! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>colorOffEvent:for: (in category 'private - buttons') ----- - colorOffEvent: anEvent for: aMorph - "Private - gives an off-color to the given morph" - aMorph color: self offColor! Item was removed: - ----- Method: TheWorldMainDockingBarOld class>>initialize (in category 'class initialization') ----- - initialize - "Initialize the receiver" - Preferences - addPreference: #showWorldMainDockingBar - categories: #(#'docking bars' ) - default: true - balloonHelp: 'Whether world''s main docking bar should be shown or not.' - projectLocal: true - changeInformee: TheWorldMainDockingBar - changeSelector: #showWorldMainDockingBarPreferenceChanged. - "" - SystemChangeNotifier uniqueInstance noMoreNotificationsFor: self. - SystemChangeNotifier uniqueInstance - notify: self - ofSystemChangesOfItem: #method - using: #updateInstances:. - "" - Locale addLocalChangedListener: self. - self setTimeStamp! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>fullScreenIcon (in category 'private - icons') ----- - fullScreenIcon - ^ Preferences tinyDisplay - ifTrue: [MenuIcons smallFullScreenIcon] - ifFalse: [MenuIcons fullScreenIcon]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>save (in category 'menu actions') ----- - save - SmalltalkImage current snapshot: true andQuit: false! Item was removed: - ----- Method: TheWorldMainDockingBarOld class>>showWorldMainDockingBar (in category 'preferences') ----- - showWorldMainDockingBar - - <preference: 'Show world main docking bar' - category: 'docking bars' - description: 'Whether world''s main docking bar should be shown or not.' - type: #Boolean> - ^Project current showWorldMainDockingBar! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>showWorldMainDockingBarString (in category 'menu actions') ----- - showWorldMainDockingBarString - ^ self world showWorldMainDockingBarString! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>helpMenu (in category 'construction - submenus') ----- - helpMenu - | menu | - menu := MenuMorph new defaultTarget: self. - "" - self createMenuItem: {'move objects onscreen'. 'Bring back all objects whose current coordinates keep them from being visible, so that at least a portion of each of my interior objects can be seen'} on: menu. - self createMenuItem: {'unhide hidden objects'. 'If any items on the world are currently hidden, make them visible'} on: menu. - menu addLine. - self createMenuItem: {'show all viewers'. 'Make visible the viewers for all objects which have user-written scripts in this playfield'} on: menu. - self createMenuItem: {'hide all viewers'. 'Make invisible the viewers for all objects in the world'} on: menu. - menu addLine. - self createMenuItem: {'clear turtle trails'. 'Remove any pigment laid down on the desktop by objects moving with their pens down'} on: menu. - " - menu addLine. - self createMenuItem: {'eToy vocabulary summary'. 'Displays a summary of all the pre-defined commands and properties in the pre-defined eToy vocabulary'} on: menu. - " - "" - ^ menu! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>backIcon (in category 'private - icons') ----- - backIcon - ^ Preferences tinyDisplay - ifTrue: [MenuIcons smallBackIcon] - ifFalse: [MenuIcons backIcon]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>perform:event:for: (in category 'private - buttons') ----- - perform: selectorSymbol event: anEvent for: aMorph - "Private - perform the given selector" - aMorph color: self offColor. - self perform: selectorSymbol! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>objectCatalogIcon (in category 'private - icons') ----- - objectCatalogIcon - ^ Preferences tinyDisplay - ifTrue: [MenuIcons smallObjectCatalogIcon] - ifFalse: [MenuIcons objectCatalogIcon]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>newProject (in category 'menu actions') ----- - newProject - MorphicProject openViewOn: nil! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>saveAs (in category 'menu actions') ----- - saveAs - SmalltalkImage current saveAs! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>activateObjectsTool (in category 'menu actions') ----- - activateObjectsTool - self world activateObjectsTool! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>toggleFullScreen (in category 'menu actions') ----- - toggleFullScreen - ScreenController lastScreenModeSelected - ifTrue: [ScreenController new fullScreenOff] - ifFalse: [ScreenController new fullScreenOn]. - self world positionSubmorphs. - self class updateInstances! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>eToyVocabularySummary (in category 'menu actions') ----- - eToyVocabularySummary - Cursor wait - showWhile: [self world printVocabularySummary]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>onColor (in category 'private - buttons') ----- - onColor - "Private - answer the on color" - ^ (Preferences menuSelectionColor - ifNil: [Color blue]) - alpha: 0.4! Item was removed: - Object subclass: #TheWorldMainDockingBarOld - instanceVariableNames: 'icons' - classVariableNames: 'Instance TS' - poolDictionaries: '' - category: 'Morphic-Kernel'! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>loadProjectIcon (in category 'private - icons') ----- - loadProjectIcon - ^ Preferences tinyDisplay - ifTrue: [MenuIcons smallLoadProjectIcon] - ifFalse: [MenuIcons loadProjectIcon]! Item was removed: - ----- Method: TheWorldMainDockingBarOld class>>setTimeStamp (in category 'timestamping') ----- - setTimeStamp - "Change the receiver's timeStamp" - TS := UUID new! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>saveMenuItem (in category 'construction - submenus') ----- - saveMenuItem - - ^{ 'Save Image'. - 'Save the current state of Squeak on disk'. - MenuIcons smallSaveIcon. - #save }! Item was removed: - ----- Method: TheWorldMainDockingBarOld class>>showWorldMainDockingBarPreferenceChanged (in category 'preferences') ----- - showWorldMainDockingBarPreferenceChanged - "The preference #showWorldMainDockingBar has just - changed" - Project current showWorldMainDockingBar: Preferences showWorldMainDockingBar! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>toggleShowWorldMainDockingBar (in category 'menu actions') ----- - toggleShowWorldMainDockingBar - self world toggleShowWorldMainDockingBar! Item was removed: - ----- Method: TheWorldMainDockingBarOld class>>new (in category 'instance creation') ----- - new - "Singleton, use #instance" - ^ self error: 'Use #instance'! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>makeNewDrawing (in category 'menu actions') ----- - makeNewDrawing - self doNewPainting! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>updateFromServer (in category 'menu actions') ----- - updateFromServer - Smalltalk - at: #SmallLandTools - ifPresent: [:smallLandTools | smallLandTools instance updateFromSmallLandSwikiPage: #quick]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>unhideHiddenObjects (in category 'menu actions') ----- - unhideHiddenObjects - self world showHiders! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>suppressFlapsString (in category 'menu actions') ----- - suppressFlapsString - "Answer the wording of the suppress-flaps item" - ^ Project current suppressFlapsString! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>doNewPainting (in category 'menu actions') ----- - doNewPainting - | w | - w := self world. - w - assureNotPaintingElse: [^ self]. - w - makeNewDrawing: (World primaryHand lastEvent copy setPosition: w center)! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>saveAsMenuItem (in category 'construction - submenus') ----- - saveAsMenuItem - - ^{ 'Save Image As...'. - 'Save the current state of Squeak on disk under a new name'. - MenuIcons smallSaveAsIcon. - #saveAs }! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>configurationMenu (in category 'construction - submenus') ----- - configurationMenu - | menu | - menu := MenuMorph new defaultTarget: self. - "" - self createMenuItem: {'set language...'. 'Choose the language in which Squeak should be displayed'. MenuIcons smallLanguageIcon} on: menu. - menu addLine. - self createMenuItem: {'update from server'. 'Update from server (Internet access is required)'. MenuIcons smallUpdateIcon} on: menu. - "" - menu addLine. - menu addUpdating: #showWorldMainDockingBarString action: #toggleShowWorldMainDockingBar. - Flaps sharedFlapsAllowed - ifTrue: [menu - addUpdating: #suppressFlapsString - target: Project current - action: #toggleFlapsSuppressed]. - menu addLine. - self createMenuItem: {'set world color...'. 'Choose a color to use as world background.'} on: menu. - ScreenController lastScreenModeSelected - ifTrue: [self createMenuItem: {'exit from full screen'. 'Exit from full screen and enclose Squeak in a window'. MenuIcons smallFullScreenIcon} on: menu] - ifFalse: [self createMenuItem: {'switch to full screen'. 'Switch to full screen giving the maximun display space to Squeak'. MenuIcons smallFullScreenIcon} on: menu]. - "" - self createMenuItem: {'change sound volume'. 'Change sound volume'. MenuIcons smallVolumeIcon} on: menu. - menu addLine. - Preferences noviceMode - ifFalse: ["" - Preferences useUndo - ifTrue: ["" - self createMenuItem: {'purge undo records'. 'Save space by removing all the undo information.'} on: menu. - menu addLine]. - self createMenuItem: {'preferences..'. 'Opens a "Preferences Panel" which allows you to alter many settings'. MenuIcons smallConfigurationIcon} on: menu. - self createMenuItem: {'appearance...'. nil. MenuIcons smallConfigurationIcon} on: menu]. - self createMenuItem: {'set color theme...'. 'Choose the color theme in which Squeak should be displayed'} on: menu. - menu addLine. - Preferences noviceMode - ifTrue: [self createMenuItem: {'switch to expert mode'. 'Switch to expert mode. CAUTION: The expert mode is powerful as well as dangerous'. MenuIcons smallExpertIcon} on: menu] - ifFalse: [self createMenuItem: {'switch to novice mode'. 'Come back to novice mode'. MenuIcons smallExpertIcon} on: menu]. - "" - ^ menu! Item was removed: - ----- Method: TheWorldMainDockingBarOld class>>timeStamp (in category 'timestamping') ----- - timeStamp - "Answer the receiver's timeStamp" - ^ TS! Item was removed: - ----- Method: TheWorldMainDockingBarOld class>>updateInstances (in category 'events') ----- - updateInstances - "The class has changed, time to update the instances" - - self setTimeStamp. - Project current assureMainDockingBarPresenceMatchesPreference! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>moveObjectsOnscreen (in category 'menu actions') ----- - moveObjectsOnscreen - self world roundUpStrays! Item was removed: - ----- Method: TheWorldMainDockingBarOld class>>instance (in category 'instance creation') ----- - instance - "Answer the receiver's instance" - ^ Instance - ifNil: [Instance := super new]! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>fillDockingBar: (in category 'construction') ----- - fillDockingBar: aDockingBar - "Private - fill the given docking bar" - self fillMenuItemsBar: aDockingBar. - "" - aDockingBar addSpacer. - self fillNavigatorOn: aDockingBar. - "" - aDockingBar addSpacer. - Preferences tinyDisplay - ifFalse: [| clock | - clock := ClockMorph new. - clock show24hr: true. - clock showSeconds: false. - clock font: Preferences standardMenuFont emphasis: 0. - aDockingBar addMorphBack: clock. - aDockingBar addSpace: 5. - "" - aDockingBar - addMorphBack: (self - createButtonIcon: self volumeIcon - help: 'Change sound volume' translated - selector: #changeSoundVolume)]. - aDockingBar - addMorphBack: (self - createButtonIcon: self fullScreenIcon - help: (ScreenController lastScreenModeSelected - ifTrue: ['Exit from full screen'] - ifFalse: ['Switch to full screen']) - selector: #toggleFullScreen). - aDockingBar - addMorphBack: (self - createButtonIcon: (SelectedObjectThumbnail - extent: 37 @ 28 - - (Preferences tinyDisplay - ifTrue: [12] - ifFalse: [0]) - noSelectedThumbnail: self objectsIcon - noSelectedBalloonText: 'View objects hierarchy' translated) - selector: #viewSelectedObject). - "" - aDockingBar setProperty: #mainDockingBarTimeStamp toValue: self class timeStamp! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>saveAsNewVersion (in category 'menu actions') ----- - saveAsNewVersion - SmalltalkImage current saveAsNewVersion! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>fillNavigatorOn: (in category 'construction') ----- - fillNavigatorOn: main - "main addLine." - main addDefaultSpace. - "" - main - addMorphBack: (self - createButtonIcon: self backIcon - help: 'Previous project' - selector: #previousProject). - main - addMorphBack: (self - createButtonIcon: self jumpIcon - help: 'Put up a list of all projects, letting me choose one to go to' - selector: #jumpToProject). - main - addMorphBack: (self - createButtonIcon: self forwardIcon - help: 'Next project' - selector: #nextProject). - main - addMorphBack: (self - createButtonIcon: self openIcon - help: 'Find any file' - selector: #findAnyFile). - Preferences tinyDisplay ifFalse:["" - main - addMorphBack: (self - createButtonIcon: self loadProjectIcon - help: 'Find a project' - selector: #findAProject)]. - main addDefaultSpace. - main addSpacer. - main - addMorphBack: (self - createButtonIcon: self projectIcon - help: 'Start a new project' - selector: #newProject). - main - addMorphBack: (self - createButtonIcon: self paintIcon - help: 'Make a painting' - selector: #doNewPainting). - main - addMorphBack: (self - createButtonIcon: self objectCatalogIcon - help: 'Open the objects catalog' - selector: #activateObjectsTool). - Preferences tinyDisplay ifFalse:["" - main - addMorphBack: (self - createButtonIcon: self publishIcon - help: 'Publish the current project' - selector: #publishProject)]. - "" - main addDefaultSpace! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>colorOnEvent:for: (in category 'private - buttons') ----- - colorOnEvent: anEvent for: aMorph - "Private - gives an on-color to the given morph" - aMorph color: self onColor! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>open (in category 'menu actions') ----- - open - self worldMenu openMenu popUpInWorld! Item was removed: - ----- Method: TheWorldMainDockingBarOld class>>updateInstances: (in category 'events') ----- - updateInstances: anEvent - "The class has changed, time to update the instances" - (anEvent itemClass == self - or: [anEvent itemClass == self class]) - ifFalse: [^ self]. - "" - self updateInstances! Item was removed: - ----- Method: TheWorldMainDockingBarOld>>world (in category 'private') ----- - world - ^ World! |
Free forum by Nabble | Edit this page |