[comp.lang.smalltalk] Smalltalk source examples 2

new@udel.edu (Darren New) (10/06/89)

Another one!   Oh No!!
This one can be referenced from the ScreenController menu.
If you don't hold the left shift, it will give you ten seconds
to bring up menus or whatever, and then will generate a 
screen print (hence the IOPriority).  If you hold the shift,
it will snapshot the screen right away.  Note the old version
of Smalltalk I'm using.... Your mileage may vary.
	-- Darren
---------------------------------------------


'From Smalltalk-80, Version 2.2 of July 4, 1987 on 5 October 1989 at 3:27:54 pm'!

!ScreenController methodsFor: 'menu messages'!

hardcopyDisplay
	"This will wait ten seconds, then send a copy of the display to the  
	postscript printer."

	| document scale form |
	
	[scale _ 2.
	Sensor leftShiftDown ifFalse: [(Delay forSeconds: 10) wait].
	form _ Display copy.
	Cursor write
		showWhile: 
			[document _ Document new.
			document startParagraph.
			document addImageOneToN: (Array with: form with: scale).
			document close.
			document toPrinter]]
		forkAt: Processor lowIOPriority! !