[ENH] Halo menu picks for manipulating TextMorph attributes

Robert M. Fuhrer rfuhrer at watson.ibm.com
Thu Sep 23 22:39:01 UTC 1999


At 05:54 PM 9/23/99, you wrote:
>At 5:28 PM -0400 9/23/99, Robert M. Fuhrer wrote:
>Note that TextMorphs already sport three special halo handles specifically 
>to manipulate text attributes -- they're down at the bottom (pale green, 
>pinkish, light brown); these let you choose the font, the style, and the 
>emphasis.

Oh, I never noticed that!  Thanks!

Somehow I had gotten it in my mind that the set of halo handles doesn't
vary across morph types.  Admittedly I'm a Morphic virgin, but I think
there may be some more structural reason why it didn't occur to me in
the first place (e.g. the handles' presentation isn't visually suggestive
of that fact).

>The one thing missing from the halo interface for TextMorphs is alignment 
>choice -- indeed note that there are no senders of #chooseAlignment in the 
>image.  This is an oversight which we should probably remedy either by 
>adding a #chooseAlignment item to the red-dot halo menu, as Robert suggests, 
>or else maybe, better, we should package it alongside the emphasis choices 
>in the light-brown menu.

How about this then?  It adds another handle to the halo with the alignment
choices.  Not quite what you suggested, but I think I like it better.

The only problem now is that the new handle has no balloon.  I haven't yet
seen where balloons get hooked in; I would have expected to see code to
associate a balloon where the handle gets created, but that isn't the case.

=================================================================

'From Squeak 2.5 of August 6, 1999 on 23 September 1999 at 6:25:08 pm'!

!Morph methodsFor: 'halos and balloon help' stamp: 'RMF 9/23/1999 18:17'!
addFontHandlesTo: aHalo box: box 
        "Add handles for controlling font, style, and emphasis choices to the
halo"
        | s |
        s _ aHalo handleSize.
        aHalo
                addHandleAt: box bottomLeft + (s + 2 @ 0)
                color: Color lightGreen
                on: #mouseDown
                send: #chooseFont
                to: self.
        aHalo
                addHandleAt: box bottomLeft + (s + 2 * 2 @ 0)
                color: Color lightRed
                on: #mouseDown
                send: #chooseStyle
                to: self.
        aHalo
                addHandleAt: box bottomRight - (s + 2 @ 0)
                color: Color lightBrown darker
                on: #mouseDown
                send: #chooseEmphasis
                to: self.
        aHalo
                addHandleAt: box bottomRight - (s + 2*2 @ 0)
                color: Color lightGray darker
                on: #mouseDown
                send: #chooseAlignment
                to: self! !

--------------------------------
Robert M. Fuhrer                                       34-231  (914) 945-3830
IBM T. J. Watson Research Center                       rfuhrer at watson.ibm.com
Yorktown Heights, NY 10598                PGP Public Key available on request





More information about the Squeak-dev mailing list