Squeak Accessibility for the blind

Thomas A Petersen tpeterse at csc.com
Thu Dec 9 19:50:52 UTC 2004





Steph, ett. Al,

To paraphrase you, “What do you do to Squeak to make it useful for you?


I actually put a lot of what I do to Squeak to make it “tom friendly” on
the SWIKI in the Squeak cookbook under “making Squeak your own”.  Since the
evil little minds have blasted it off the web for now, I will pass on a
highlight or two here.

I worked out how to rather directly work with some brute force manipulation
of the Preferences class.  After a bit of “hard play” I came up with a
preferences workspace I play into a new image.  Let me emphasize that the
best colors and fonts for one person don’t necessarily work for someone
else.  So, here goes.

I set up some preferences and colors using the workspace and .cs shown
below.  Note that I have a TomsFixes subdirectory with these files in my
Squeak directory.  The message continues between and after the workspace
and .cs insertions.

 “-------------------------------------------------“
"  Tom's Preferences for settings and some colors.  2004 03 09"

| style |

Preferences
    disable: #alternativeScrollbarLook;
    disable: #menuColorFromWorld;
    enable: #scrollBarsNarrow;
    disable: #roundedWindowCorners;
    disable: #roundedMenuCorners;
    enable: #hiddenScrollBars;
    enable: #inboardScrollbars;
    enable: #scrollBarsOnRight;
    "  after Diego's look enhancements "
    disable: #menuAppearance3d;
    disable: #gradientMenu;
    "  after ShrinkingSelection "
    enable: #selectionsMayShrink;
    enable: #wordStyleCursorMovement;
    enable:  #duplicateControlAndAltKeys.

Preferences
    desktopColor: ( Color r: 0.9 g: 0.92 b: 0.99 );
    insertionPointColor: ( Color r: 1.00 g: 0.55 b: 0.0 );
    keyboardFocusColor: ( Color r: 0.7 g: 0.75 b: 0.99 );
    textHighlightColor: ( Color r: 0.75 g: 0.95 b: 0.65).

Preferences
    setParameter: #menuColor to: ( Color r: 0.98 g: 0.94 b: 0.81 );
    setParameter: #menuTitleColor to: ( Color r: 0.90 g: 0.88 b: 0.71 );
    setParameter: #menuBorderColor to: ( Color r: 0.30 g: 0.27 b: 0.11 );
    setParameter: #menuLineLowerColor to: ( Color r: 0.30 g: 0.27 b: 0.11
);
    setParameter: #menuLineUpperColor to: ( Color r: 0.40 g: 0.37 b: 0.21
);
    setParameter: #menuTitleBorderColor to: ( Color r: 0.30 g: 0.27 b: 0.11
);
    setParameter: #menuLineColor to: ( Color r: 0.30 g: 0.27 b: 0.11 ).

( Preferences parameterAt: #windowColors )
    at: #FileList put: ( Color white ).

“  See later on in this message for this .cs file  that seems to work in
   3.6, 3.7, and 3.8. “
FileStream fileIn: 'TomsFixes\TomsFixups.cs'.


“ I’m not allowed to hand out the font files for copyright reasons.  Most
  of these are standard fonts except for  Coursqk  which has a few of the
  characters tinkered to my liking.  ”
TTCFont
    newTextStyleFromTTFile: 'fonts\Arial.TTF';
    newTextStyleFromTTFile: 'fonts\Coursqk.TTF';
    newTextStyleFromTTFile: 'fonts\Century.TTF';
    newTextStyleFromTTFile: 'fonts\LuCon.TTF';
    newTextStyleFromTTFile: 'fonts\Times.TTF'.

“When you doit on this workspace, the newTextStyleFromTTFile:sizes:
  method will be unknown.  Tell Squeak that this is the right method name
  by clicking the highlighted choice it will work fine.”
TTCFont
    newTextStyleFromTTFile: 'fonts\GillShad.TTF'
                     sizes: #( 14 18 20 24 36).

TTCFont
    newTextStyleFromTTFile: 'fonts\Keystrok.TTF'
                     sizes: #( 14 18 20 24).

style := (TextConstants at: #Century) fontOfPointSize: 14.
style ifNotNil: [Preferences setMenuFontTo: style].

style := (TextConstants at: #Accuny) fontOfPointSize: 14.
style ifNotNil: [Preferences setSystemFontTo: style].

“ I have been trying this one instead of courier squeak”
style := (TextConstants at: #Accumon) fontOfPointSize: 14.
style ifNotNil: [Preferences setCodeFontTo: style].

style := (TextConstants at: #Accujen) fontOfPointSize: 14.
style ifNotNil: [Preferences setListFontTo: style].
"style ifNotNil: [Preferences setWindowTitleFontTo: style]."

“-------------------------------------------------“
There have been some recent odd behaviors from our mail system when it
comes to handling attachments.  So here is the TomsFixups.cs file.

“-------------------------------------------------“

'From Squeak3.6beta of ''4 July 2003'' [latest update: #5402] on 25 August
2003 at 5:56:15 pm'!

!ColorPickerMorph class methodsFor: 'class initialization' stamp: 'TAP
8/25/2003 14:58'!
initialize
      "ColorPickerMorph initialize"

ColorChart _ Color colorPaletteForDepth: 16 extent: 300 at 100.
      DragBox _  (11 at 0) extent: 9 at 8.
      RevertBox _ (ColorChart width - 28)@1 extent: 14 at 8.
      FeedbackBox _ (ColorChart width - 15)@1 extent: 14 at 8.
      TransparentBox _ DragBox topRight corner: RevertBox bottomLeft.

      ColorChart fillBlack: ((DragBox left - 1)@0 extent: 1 at 9).
      ColorChart fillBlack: ((TransparentBox left)@0 extent: 1 at 9).
      ColorChart fillBlack: ((FeedbackBox left - 1)@0 extent: 1 at 9).
      ColorChart fillBlack: ((RevertBox left - 1)@0 extent: 1 at 9).
      (Form dotOfSize: 5) displayOn: ColorChart at: DragBox center + (0 at 1).

      TransText _ (Form extent: 63 at 8 depth: 1   "Where there's a will
there's a way..."
                  fromArray: #(4194306 1024 4194306 1024 15628058
2476592640
                              4887714 2485462016 1883804850 2486772764
4756618
                              2485462016 4748474 1939416064 0 0)
                  offset: 0 at 0).
      TransText _ ColorForm mappingWhiteToTransparentFrom: TransText
! !


!FillInTheBlankMorph class methodsFor: 'default constants' stamp: 'TAP
8/25/2003 17:44'!
defaultAnswerExtent
      ^ 350 at 60.! !


!TTCFont class methodsFor: 'instance creation' stamp: 'TAP 8/25/2003
16:59'!
newTextStyleFromTT: description sizes: sizeArray
      "Create a new TextStyle from specified TTFontDescription instance."
      | array f |

      array _ sizeArray collect: [:pt |
            f _ self new initialize.
            f ttcDescription: description.
            f pointSize: pt.
      ].

      ^ self reorganizeForNewFontArray: array name: array first name
asSymbol.
! !

!TTCFont class methodsFor: 'instance creation' stamp: 'TAP 8/25/2003
17:01'!
newTextStyleFromTTFile: fileName sizes: sizeArray
      "Create a new TextStyle from specified file name.  On certain
versions of Windows, you can evaluate following to get Arial font into the
image.  On other platforms, wait and see someone implements the support
code for FontPlugin then we can start relying on the generic font lookup
mechanism.
      self newTextStyleFromTTFile: 'C:\WINDOWS\Fonts\ARIAL.TTF' sizes: #(10
12 14 16 18 20 24 36)
      "

      | description |
      description _ TTFontDescription addFromTTFile: fileName.
      ^ self newTextStyleFromTT: description sizes: sizeArray.
! !

!TTCFont class methodsFor: 'other' stamp: 'TAP 8/25/2003 15:14'!
pointSizes

      "The default sizes that are created when a TextStyle is created.  You
can add new sizes by the new-size feature."
      ^ #(10 12 14 15 16 18 20 24 36).
! !

ColorPickerMorph initialize!


“-------------------------------------------------“

I suspect there may be a better way of doing some of this and I really
should make the picker size a preference and put it on Squeakmap.

The additions to the TTCFont class were to my taste and to make my
preferences workspace neater.

Anyway, I hope this addresses your question,
Tap

P.S.  Unless there is something chemically or genetically wrong,  eye
surgery for senile cataracts and retinal detachment have really improved
over the years


More information about the Squeak-dev mailing list