Can you help me? (Work-in-Progress, Zooming Browser Panes)

Karl Ramberg karl.ramberg at chello.se
Sat May 13 13:10:44 UTC 2000


Here is my contribution. It comments out mouseEnter mouseLeave in
PluggableListMorph
and PluggableTextMorph. It works fine when you have inboard scrollbars. A few
rough edges
doug and not as smooth as my mac; when I click on another window, the keyboard
focus should
follow in one click, not two. That means you can end up typing to a window in
the background.
Otherwise this change set works fine for spastic people who can't
let the mouse sit in one place. :-). With the keyboard focus fixed this would
be a nice
sub preference to inboard scrollbars.

Karl

"Norton, Chris" wrote:

> Hello friends!
>
> I was coding merrily along one day and I got a bit frustrated with the
> teensy little window pane I was working in.  My mouse kept sliding off of
> the pane and my typing kept getting lost.  So I thought... "well, I'll just
> zoom the pane" (zoom = enlarge the pane to the extent of the window).  I
> brought up the Squeak shortcuts list and discovered that zoom is not
> implemented!  "Oh ho!" I thought.  "An opportunity to improve Squeak."
> Dropping everything, I gleefully set about to implement zoom...
>
> Now, I am not that experienced with morphic, so I've probably gone about
> this the wrong way, but I figured that I would associate command-t (Alt-t on
> Windows) with the ability to zoom (I chose 't', because it's the last letter
> available... oh drat!).  I added behavior to PluggableListMorph and to
> PluggableTextMorph that I believe will do the zooming/unzooming, but I've
> had some trouble making it work properly.  If I try to zoom from a Browser's
> text pane, it maximizes/minimizes the pane splendidly.  But if I try to zoom
> from the Browser's scroll panes, it doesn't zoom properly.  Herein lies
> confusion #1.
>
> Another strange thing that I've had some trouble identifying is what the
> inner boundary of a system window is.  I mean the stuff inside the frame and
> underneath the title bar.  This is the ideal space I'd like to use for
> zooming (confusion #2).
>
> The last part I'd like a bit of advice on is where this code should live.
> Clearly, it is not nice to have duplicate code sprinkled here and there
> throughout the image.  I'd prefer to put this in one place... but I don't
> know where that place is (confusion #3).
>
> Thanks in advance for your consideration/ideas and help!    :-)
>
> ---==> Chris
>
>  <<BrowserZoom-ccn.1.cs>>
>
>   ------------------------------------------------------------------------
>                            Name: BrowserZoom-ccn.1.cs
>    BrowserZoom-ccn.1.cs    Type: unspecified type (application/octet-stream)
>                        Encoding: quoted-printable
-------------- next part --------------
'From Squeak2.8alpha of 19 February 2000 [latest update: #2098] on 13 May 2000 at 2:59:51 pm'!

!PluggableListMorph methodsFor: 'events' stamp: 'kfr 4/30/2000 22:55'!
mouseEnter: event
	"super mouseEnter: event.
	event hand newKeyboardFocus: self"! !


!PluggableTextMorph methodsFor: 'pane events' stamp: 'kfr 4/30/2000 22:52'!
mouseEnter: event
	"super mouseEnter: event.
	selectionInterval ifNotNil:
		[textMorph handleEdit: [textMorph editor selectInterval: selectionInterval.
			textMorph editor setEmphasisHere]].
	event hand newKeyboardFocus: textMorph"! !

!PluggableTextMorph methodsFor: 'pane events' stamp: 'kfr 4/30/2000 22:53'!
mouseLeave: event

	"textMorph ifNotNil: [selectionInterval _ textMorph editor selectionInterval].
	super mouseLeave: event.
	event hand newKeyboardFocus: nil."
! !



More information about the Squeak-dev mailing list