'From Squeak3.1alpha of 29 April 2001 [latest update: #4173] on 16 August 2001 at 3:18:49 pm'! "Change Set: collapseBalloon-apb Date: 16 August 2001 Author: Andrew P. Black Updates the balloon text on collapse and expand of the window, so that it says the right thing for a collapsed window. Tweaked by sw to make it robust in the face of a window without the title-bar buttons."! !SystemWindow methodsFor: 'resize/collapse' stamp: 'apb 8/16/2001 15:15'! collapseOrExpand "Collapse or expand the window, depending on existing state" isCollapsed ifTrue: ["Expand -- restore panes to morphics structure" isCollapsed _ false. collapsedFrame _ self getBoundsWithFlex. collapseBox ifNotNil: [collapseBox setBalloonText: 'collapse this window']. "First save latest collapsedFrame" self setBoundsWithFlex: fullFrame. paneMorphs reverseDo: [:m | self addMorph: m. self world startSteppingSubmorphsOf: m]. self activate "-- mainly for findWindow"] ifFalse: ["Collapse -- remove panes from morphics structure" isCollapsed _ true. fullFrame _ self getBoundsWithFlex. "First save latest fullFrame" paneMorphs do: [:m | m delete; releaseCachedState]. model modelSleep. collapsedFrame ifNil: [collapsedFrame _ RealEstateAgent assignCollapseFrameFor: self]. self setBoundsWithFlex: collapsedFrame. collapseBox ifNotNil: [collapseBox setBalloonText: 'expand this window']. expandBox ifNotNil: [expandBox setBalloonText: 'expand to full screen']]. self layoutChanged! !