'From Squeak3.3alpha of 18 January 2002 [latest update: #4883] on 5 June 2002 at 12:09:01 am'! "Change Set: tabPalFixes-sw Date: 4 June 2002 Author: Scott Wallace ¥ Makes the default tabbed palette (e.g. the one you get, from the Supplies flap) have its tabs pane be of conforming width right from the start, correcting a long-standing annoyance. ¥ Uses the better menu icon. ¥ Removes two ancient menu items from the sample menu tab"! !TabbedPalette methodsFor: 'palette menu' stamp: 'sw 6/5/2002 00:06'! addMenuTab "Add the menu tab. This is ancient code, not much in the spirit of anything current" | aMenu aTab aGraphic sk | aMenu _ MenuMorph new defaultTarget: self. aMenu stayUp: true. "aMenu add: 'clear' action: #showNoPalette." aMenu add: 'sort tabs' action: #sortTabs:. aMenu add: 'choose new colors for tabs' action: #recolorTabs. aMenu setProperty: #paletteMenu toValue: true. "aMenu add: 'make me the Standard palette' action: #becomeStandardPalette." aTab _ self addTabForBook: aMenu withBalloonText: 'a menu of palette-related controls'. aTab highlightColor: tabsMorph highlightColor; regularColor: tabsMorph regularColor. tabsMorph laySubpartsOutInOneRow; layoutChanged. aGraphic _ ScriptingSystem formAtKey: 'TinyMenu'. aGraphic ifNotNil: [aTab removeAllMorphs. aTab addMorph: (sk _ SketchMorph withForm: aGraphic). sk position: aTab position. sk lock. aTab fitContents]. self layoutChanged! ! !TabbedPalette class methodsFor: 'as yet unclassified' stamp: 'sw 6/4/2002 20:42'! authoringPrototype | aTabbedPalette aBook aTab | aTabbedPalette _ self new markAsPartsDonor. aTabbedPalette pageSize: 200 @ 300. aTabbedPalette tabsMorph highlightColor: Color red regularColor: Color blue. aTabbedPalette addMenuTab. aBook _ BookMorph new setNameTo: 'one'; pageSize: aTabbedPalette pageSize. aBook color: Color blue muchLighter. aBook removeEverything; insertPage; showPageControls. aBook currentPage addMorphBack: (SketchMorph withForm: ScriptingSystem squeakyMouseForm). aTab _ aTabbedPalette addTabForBook: aBook. aBook _ BookMorph new setNameTo: 'two'; pageSize: aTabbedPalette pageSize. aBook color: Color red muchLighter. aBook removeEverything; insertPage; showPageControls. aBook currentPage addMorphBack: CurveMorph authoringPrototype. aTabbedPalette addTabForBook: aBook. aTabbedPalette selectTab: aTab. aTabbedPalette beSticky. aTabbedPalette tabsMorph hResizing: #spaceFill. ^ aTabbedPalette! !