'From Squeakland 3.8.5976 of 25 August 2004 [latest update: #286] on 1 September 2004 at 6:15:56 pm'! "Change Set: FlapsAndThumbnailsFixAgain-nk Date: 1 September 2004 Author: Ned Konz More work getting everything to display right at multiple resolutions, even in translucent flaps. Postscript regenerates the thumbnails. "! !DescriptionForPartsBin methodsFor: 'initialization' stamp: 'nk 9/1/2004 16:52'! sampleImageForm "If I have a sample image form override stored, answer it, else answer one obtained by launching an actual instance" ^ sampleImageForm ifNil: [((Smalltalk at: globalReceiverSymbol) perform: nativitySelector) imageFormDepth: 32]! ! !Morph methodsFor: 'drawing' stamp: 'nk 9/1/2004 15:08'! imageForm: depth backgroundColor: aColor forRectangle: rect | canvas | canvas _ Display defaultCanvasClass extent: rect extent depth: depth. canvas translateBy: rect topLeft negated during:[:tempCanvas| tempCanvas fillRectangle: rect color: aColor. tempCanvas fullDrawMorph: self]. ^ canvas form offset: rect topLeft! ! !IconicButton methodsFor: 'initialization' stamp: 'nk 9/1/2004 17:14'! initializeToShow: aMorph withLabel: aLabel andSend: aSelector to: aReceiver "Initialize the receiver to show the current appearance of aMorph on its face, giving it the label supplied and arranging for it, when the button goes down on it, to obtain a new morph by sending the specified selector to the specified receiver" | aThumbnail | aThumbnail _ Thumbnail new. aThumbnail makeThumbnailFromForm: (aMorph imageFormDepth: 32). ^ self initializeWithThumbnail: aThumbnail withLabel: aLabel andColor: self color andSend: aSelector to: aReceiver ! ! !IconicButton methodsFor: 'initialization' stamp: 'nk 9/1/2004 17:45'! initializeWithThumbnail: aThumbnail withLabel: aLabel andColor: aColor andSend: aSelector to: aReceiver "Initialize the receiver to show aThumbnail on its face, giving it the label supplied and arranging for it, when the button goes down on it, to obtain a new morph by sending the supplied selector to the supplied receiver" | labeledItem | labeledItem _ AlignmentMorph newColumn. labeledItem color: aColor. labeledItem borderWidth: 0. labeledItem layoutInset: 4@0; cellPositioning: #center. labeledItem addMorph: aThumbnail. labeledItem addMorphBack: (Morph new extent: (4@4)) beTransparent. labeledItem addMorphBack: (TextMorph new backgroundColor: aColor asNontranslucentColor; contentsAsIs: aLabel; beAllFont: Preferences standardEToysFont; centered). self beTransparent; labelGraphic: ((labeledItem imageForm: 32 backgroundColor: aColor forRectangle: labeledItem fullBounds) replaceColor: aColor withColor: Color transparent); borderWidth: 0; target: aReceiver; actionSelector: #launchPartVia:label:; arguments: {aSelector. aLabel}; actWhen: #buttonDown. self stationarySetup.! ! !PartsBin methodsFor: 'initialization' stamp: 'nk 9/1/2004 17:28'! listDirection: aListDirection quadList: quadList "Initialize the receiver to run horizontally or vertically, obtaining its elements from the list of tuples of the form: (