[squeak-dev] Morph wants to know when it loses focus

Jecel Assumpcao Jr. jecel at merlintec.com
Thu Feb 13 14:19:34 UTC 2014


Bert Freudenberg wrote:
> What is mouse focus anyway? This only applies to some modal thingy, no?
> 
> I would think of mouse focus as the morph that handled the last mouse-down
> event: all mouse events should be routed to that morph until all mouse
> buttons are released. Something more permanent than this fleeting mode
> seems odd to me to call "mouse focus". 
> 
> Having a "unified" framework for handling halos/menus/balloons etc sounds
> good, but it's not there, yet.

I really liked how the original Objective-C GUI "IC Pak" handled modal
stuff. It would just put a transparent "morph" the size of the screen on
top of everything and then put the modal dialog box, menu, help balloon
or whatever on top of that. As long as you stayed within the modal
morph, everything would work normally. But as soon as you clicked
outside of it, the transparent morph would intercept that, dismiss the
modal morph and itself (or whatever was the right thing to do with it)
and then resend the click event to whatever was under it (again, if this
was the right thing to do).

This has a very object-oriented feel to it compared to some state
machine or something like that.

-- Jecel



More information about the Squeak-dev mailing list