'From Squeak3.2alpha of 2 October 2001 [latest update: #4528] on 20 November 2001 at 2:02:48 pm'! "Change Set: radioFlaps-sw Date: 20 November 2001 Author: Scott Wallace Brings radio-button-like of flap-tab action -- i.e. when one tab is pressed, other tabs get in effect unpressed, so that at any one time you only see one flap open along any given edge -- to the general flap regime -- formerly it had only been seen in viewer flap tabs. This gives a friendly behavior among a community of flaps lodged on the same edge, which will be particularly ingratiating after the arrival of Dan's forthcoming changes that offer the option of arraying all standard flaps along the bottom edge of the screen,"! !FlapTab methodsFor: 'show & hide' stamp: 'sw 11/20/2001 13:49'! showFlap "Open the flap up" | thicknessToUse flapOwner | "19 sept 2000 - going for all paste ups <- raa note" flapOwner _ self pasteUpMorph. self referentThickness <= 0 ifTrue: [thicknessToUse _ lastReferentThickness ifNil: [100]. self orientation == #horizontal ifTrue: [referent height: thicknessToUse] ifFalse: [referent width: thicknessToUse]]. inboard ifTrue: [self stickOntoReferent]. "makes referent my owner, and positions me accordingly" referent pasteUpMorph == flapOwner ifFalse: [flapOwner accommodateFlap: self. "Make room if needed" flapOwner addMorphFront: referent. flapOwner startSteppingSubmorphsOf: referent. self positionReferent. referent adaptToWorld: flapOwner]. inboard ifFalse: [self adjustPositionVisAVisFlap]. flapShowing _ true. self pasteUpMorph hideFlapsOtherThan: self ifClingingTo: edgeToAdhereTo. flapOwner bringFlapTabsToFront! ! !PasteUpMorph methodsFor: 'misc' stamp: 'sw 11/18/2001 18:36'! hideFlapsOtherThan: aFlapTab ifClingingTo: anEdgeSymbol "Hide flaps on the given edge unless they are the given one" self flapTabs do: [:aTab | (aTab edgeToAdhereTo == anEdgeSymbol) ifTrue: [aTab == aFlapTab ifFalse: [aTab hideFlap]]]! ! ViewerFlapTab removeSelector: #showFlap! PasteUpMorph removeSelector: #hideViewerFlapsOtherThanFor:ifClingingTo:! "Postscript:" Preferences expungePreferenceNamed: #oneViewerFlapAtATime. !