'From Squeak3.1alpha of 28 February 2001 [latest update: #4290] on 24 August 2001 at 2:17:54 pm'! "Change Set: pluginMods Date: 24 August 2001 Author: Michael Rueger Adds the widget flap to the etoy configuration. Adds the ObjectsTool to the widget flap. Plays the system beep on releasing the volume control."! !Flaps class methodsFor: 'predefined flaps' stamp: 'mir 8/24/2001 13:48'! addAndEnableEToyFlaps "Initialize the standard default out-of-box set of global flaps. This method creates them and places them in my class variable #SharedFlapTabs, but does not itself get them displayed." SharedFlapTabs ifNil: [SharedFlapTabs _ OrderedCollection new]. SharedFlapTabs add: self newSuppliesFlap. SharedFlapTabs add: self newPaintingFlap delete. self enableGlobalFlapWithID: 'Supplies'. self enableGlobalFlapWithID: 'Widgets'. SharedFlapTabs do: [:aFlapTab | aFlapTab setToPopOutOnMouseOver: false]. "The above amends some historic behavior imparted by the initializers of the individual flaps" SharedFlapsAllowed _ true. Project current flapsSuppressed: false. ^ SharedFlapTabs "Flaps addAndEnableEToyFlaps"! ! !Flaps class methodsFor: 'predefined flaps' stamp: 'mir 8/24/2001 13:45'! quadsDefiningWidgetsFlap "Answer a structure defining the default Widgets flap" ^ #( (TrashCanMorph new 'Trash' 'A tool for discarding objects') (ScriptingSystem scriptControlButtons 'Status' 'Buttons to run, stop, or single-step scripts') (PaintInvokingMorph new 'Paint' 'Drop this into an area to start making a fresh painting there') (GeeMailMorph new 'Gee-Mail' 'A place to present annotated content') (RecordingControlsMorph authoringPrototype 'Sound' 'A device for making sound recordings.') (MPEGMoviePlayerMorph authoringPrototype 'Movie Player' 'A Player for MPEG movies') (FrameRateMorph authoringPrototype 'Frame Rate' 'An indicator of how fast your system is running') (MagnifierMorph newRound 'Magnifier' 'A magnifying glass') (AllScriptsTool allScriptsToolForActiveWorld 'All Scripts' 'A tool that lets you control all the running scripts in your world') (ScriptingSystem newScriptingSpace 'Scripting' 'A confined place for drawing and scripting, with its own private stop/step/go buttons.') (BouncingAtomsMorph new 'Bouncing Atoms' 'Atoms, mate') (ObjectsTool newStandAlone 'Morph Catalog' 'A tool that lets you browse the catalog of morphs') )! ! !PasteUpMorph methodsFor: 'world menu' stamp: 'mir 8/24/2001 14:09'! keystrokeInWorld: evt "A keystroke was hit when no keyboard focus was in set, so it is sent here to the world instead. This current implementation is regrettably hard-coded; until someone cleans this up, you may wish to edit this method to suit your personal taste in interpreting cmd-keys issued to the desktop." | aChar isCmd | aChar _ evt keyCharacter. isCmd _ evt commandKeyPressed and: [Preferences cmdKeysInText]. (evt commandKeyPressed and: [Preferences eToyFriendly]) ifTrue: [(aChar == $W) ifTrue: [^ self putUpWorldMenu: evt]]. (isCmd and: [Preferences honorDesktopCmdKeys]) ifTrue: [(aChar == $o) ifTrue: [^ ActiveWorld activateObjectsTool]. (aChar == $F) ifTrue: [^ CurrentProjectRefactoring currentToggleFlapsSuppressed]. (aChar == $N) ifTrue: [^ Preferences togglePreference: #showProjectNavigator]. (aChar == $r) ifTrue: [^ ActiveWorld restoreMorphicDisplay]. Preferences eToyFriendly ifFalse: [(aChar == $\) ifTrue: [^ SystemWindow sendTopWindowToBack]. (aChar == $b) ifTrue: [^ Browser openBrowser]. (aChar == $k) ifTrue: [^ Workspace open]. (aChar == $m) ifTrue: [^ TheWorldMenu new adaptToWorld: World; newMorph]. (aChar == $t) ifTrue: [^ self findATranscript: evt]. (aChar == $w) ifTrue: [^ SystemWindow closeTopWindow]. (aChar == $z) ifTrue: [^ self commandHistory undoOrRedoCommand]. (aChar == $C) ifTrue: [^ self findAChangeSorter: evt]. (aChar == $R) ifTrue: [^ self openRecentSubmissionsBrowser: evt]. (aChar == $P) ifTrue: [^ self findAPreferencesPanel: evt]. (aChar == $W) ifTrue: [^ self findAMessageNamesWindow: evt]]]! ! !ProjectNavigationMorph methodsFor: 'the actions' stamp: 'mir 8/24/2001 13:52'! soundUpEvt: a morph: b soundSlider ifNotNil: [soundSlider delete]. soundSlider _ nil. Smalltalk beep! !