[squeak-dev] The Trunk: Collections-mt.988.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Feb 11 09:18:00 UTC 2022


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

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

Name: Collections-mt.988
Author: mt
Time: 11 February 2022, 10:17:57.983479 am
UUID: 557df9ff-8077-e844-8541-39919aefde1a
Ancestors: Collections-mt.987

Complements Graphics-mt.479.

=============== Diff against Collections-mt.987 ===============

Item was changed:
  ----- Method: Text class>>initTextConstants (in category 'class initialization') -----
  initTextConstants 
  	"Initialize constants shared by classes associated with text display, e.g., 
  	Space, Tab, Cr, Bs, ESC."
  		"1/24/96 sw: in exasperation and confusion, changed cmd-g mapping from 231 to 232 to see if I could gain any relief?!!"
  
  
+ 	| letter varAndValue |
- 	| letter varAndValue tempArray width |
  	"CtrlA..CtrlZ, Ctrla..Ctrlz"
  	letter := $A.
   	#(		212 230 228 196 194 226 241 243 214 229 200 217 246 
  			245 216 202 210 239 211 240 197 198 209 215 242 231
  	 		1 166 228 132 130 12 232 179 150 165 136 153 182 
  			14 15 138 17 18 19 11 21 134 145 151 178 167 ) do:
  		[:kbd |
  		TextConstants at: ('Ctrl', letter asSymbol) asSymbol put: kbd asCharacter.
  		letter := letter == $Z ifTrue: [$a] ifFalse: [(letter asciiValue + 1) asCharacter]].
  
  	varAndValue := #(
  		Space	32
  		Tab		9
  		CR		13
  		Enter	3
  		BS		8
  		BS2		158
  		ESC		160
  		Clear 	173
  	).
  
  	varAndValue size odd ifTrue: [self error: 'unpaired text constant'].
  	(2 to: varAndValue size by: 2) do:
  		[:i | TextConstants at: (varAndValue at: i - 1) put: (varAndValue at: i) asCharacter].
  
  	varAndValue := #(
  		CtrlDigits 			(159 144 143 128 127 129 131 180 149 135)
  		CtrlOpenBrackets	(201 7 218 249 219 15)
  			"lparen gottn by ctrl-:= = 201; should be 213 but can't type that on Mac"
  
  			"values for alignment"
  		LeftFlush	0
  		RightFlush	1
  		Centered	2
  		Justified	3
  
  			"subscripts for a marginTabsArray tuple"
  		LeftMarginTab	1
  		RightMarginTab	2
  
  			"font faces"
  		Basal	0
  		Bold	1
  		Italic	2
  
- 			"in case font doesn't have a width for space character"
- 			"some plausible numbers-- are they the right ones?"
- 		DefaultSpace			4
- 		DefaultTab				24
- 		DefaultLineGrid			16
- 		DefaultBaseline			12
- 		DefaultFontFamilySize	3	"basal, bold, italic"
  	).
  
  	varAndValue size odd ifTrue: [self error: 'unpaired text constant'].
  	(2 to: varAndValue size by: 2) do:
  		[:i | TextConstants at: (varAndValue at: i - 1) put: (varAndValue at: i)].
  
  	TextConstants at: #DefaultRule	put: Form over.
  	TextConstants at: #DefaultMask	put: Color black.
  
- 	width := Display width max: 720.
- 	tempArray := Array new: width // DefaultTab.
- 	1 to: tempArray size do:
- 		[:i | tempArray at: i put: DefaultTab * i].
- 	TextConstants at: #DefaultTabsArray put: tempArray.
- 	tempArray := Array new: (width // DefaultTab) // 2.
- 	1 to: tempArray size do:
- 		[:i | tempArray at: i put: (Array with: (DefaultTab*i) with: (DefaultTab*i))].
- 	TextConstants at: #DefaultMarginTabsArray put: tempArray.
- 
  "Text initTextConstants "!



More information about the Squeak-dev mailing list