[squeak-dev] The Trunk: Tools-mt.971.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jun 9 13:48:38 UTC 2020


Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.971.mcz

==================== Summary ====================

Name: Tools-mt.971
Author: mt
Time: 9 June 2020, 3:48:35.364373 pm
UUID: 229a24af-36d4-ef41-bb06-07b7ffeb9486
Ancestors: Tools-mt.970

Adds an inspector for forms with a "pixels" field that embeds the form as special font to see the pixels in the value pane. I think that there is no alpha support in FormSetFont ...

=============== Diff against Tools-mt.970 ===============

Item was added:
+ ----- Method: Form>>inspectorClass (in category '*Tools-Inspector') -----
+ inspectorClass
+ 
+ 	^ FormInspector!

Item was added:
+ Inspector subclass: #FormInspector
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Tools-Inspector'!

Item was added:
+ ----- Method: FormInspector>>embedForm:inText: (in category 'support') -----
+ embedForm: aForm inText: stringOrText
+ 
+ 	^ stringOrText asText, String cr,
+ 		(Text string: ' ' attribute:
+ 			(TextFontReference toFont: 
+ 				(FormSetFont new
+ 					fromFormArray: (Array with: (aForm copy offset: 0 at 0))
+ 					asciiStart: Character space asInteger
+ 					ascent: aForm height)))!

Item was added:
+ ----- Method: FormInspector>>fieldPixels (in category 'fields') -----
+ fieldPixels
+ 
+ 	^ (self newFieldForType: #misc key: #extent)
+ 		name: 'pixels' translated; emphasizeName;
+ 		shouldPrintValueAsIs: true;
+ 		valueGetter: [:form | self embedForm: form inText: form printString];
+ 		yourself!

Item was added:
+ ----- Method: FormInspector>>streamBaseFieldsOn: (in category 'fields - streaming') -----
+ streamBaseFieldsOn: aStream
+ 
+ 	super streamBaseFieldsOn: aStream.
+ 	aStream nextPut: self fieldPixels.!



More information about the Squeak-dev mailing list