The Trunk: Collections-nice.324.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-nice.324.mcz

commits-2
Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.324.mcz

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

Name: Collections-nice.324
Author: nice
Time: 28 February 2010, 7:43:00.668 pm
UUID: 3bcc36b5-5ee2-c040-bc70-021f3ddfdc99
Ancestors: Collections-ar.323

Fix endOfRun and crossedX encodings in paragraph composition - Part 4 (clean-up)
EndOfRun and CrossedX now are unused TextConstants.

=============== Diff against Collections-ar.323 ===============

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 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"
 
- "location of non-character stop conditions"
- EndOfRun 257
- CrossedX 258
-
  "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 "!