'From Squeak3.2alpha of 3 October 2001 [latest update: #4575] on 3 December 2001 at 3:13:41 pm'! "Change Set: squeakFlap-sw Date: 3 December 2001 Author: Scott Wallace Redefines the default Squeak flap, removing a few items that are now readily available elsewhere. NOTE: if you have the #okToReinitializeFlaps preference set to true, then the existing Squeak flap in your image will be replaced in the postscript of the update. "! !Flaps class methodsFor: 'predefined flaps' stamp: 'sw 11/29/2001 19:52'! newSqueakFlap "Answer a new default 'Squeak' flap for the left edge of the screen" | aFlap aFlapTab aButton aClock buttonColor anOffset bb aFont | aFlap _ PasteUpMorph newSticky borderWidth: 0. aFlapTab _ FlapTab new referent: aFlap. aFlapTab setName: 'Squeak' edge: #left color: Color brown lighter lighter. aFlapTab position: (0 @ ((Display height - aFlapTab height) // 2)). aFlapTab setBalloonText: aFlapTab balloonTextForFlapsMenu. aFlap cellInset: 14@14. aFlap beFlap: true. aFlap color: (Color brown muchLighter lighter "alpha: 0.3"). aFlap extent: 150 @ self currentWorld height. aFlap layoutPolicy: TableLayout new. aFlap wrapCentering: #topLeft. aFlap layoutInset: 2. aFlap listDirection: #topToBottom. aFlap wrapDirection: #leftToRight. "self addProjectNavigationButtonsTo: aFlap." anOffset _ 16. aClock _ ClockMorph newSticky. aClock color: Color red. aClock showSeconds: false. aClock font: (TextStyle default fontAt: 3). aClock step. aClock setBalloonText: 'The time of day. If you prefer to see seconds, check out my menu.'. aFlap addCenteredAtBottom: aClock offset: anOffset. buttonColor _ Color cyan muchLighter. bb _ SimpleButtonMorph new target: Smalltalk. bb color: buttonColor. aButton _ bb copy. aButton actionSelector: #saveSession. aButton setBalloonText: 'Make a complete snapshot of the current state of the image onto disk.'. aButton label: 'save' font: (aFont _ ScriptingSystem fontForTiles). aFlap addCenteredAtBottom: aButton offset: anOffset. aButton _ bb copy target: Utilities. aButton actionSelector: #updateFromServer. aButton label: 'load code updates' font: aFont. aButton color: buttonColor. aButton setBalloonText: 'Check the Squeak server for any new code updates, and load any that are found.'. aFlap addCenteredAtBottom: aButton offset: anOffset. aButton _ SimpleButtonMorph new target: Smalltalk; actionSelector: #aboutThisSystem; label: 'about this system' font: aFont. aButton color: buttonColor. aButton setBalloonText: 'click here to find out version information'. aFlap addCenteredAtBottom: aButton offset: anOffset. aButton _ TrashCanMorph newSticky. aFlap addCenteredAtBottom: aButton offset: anOffset. aButton startStepping. ^ aFlapTab "Flaps replaceGlobalFlapwithID: 'Squeak' "! ! Flaps class removeSelector: #addSystemStatusLinesTo:! "Postscript:" Preferences okToReinitializeFlaps ifTrue: [Flaps replaceGlobalFlapwithID: 'Squeak']. !