Hi,

Ideally we need to change EventHandler to support mouseWheel events and at the same time,
perhaps, integrate EventHandlerPlus upwards too.

Otherwise, you will need to do as you suggested, make a Morph subclass
to handle stuff and use that as the in-betweener.

Regards, Gary

----- Original Message ----- From: "Martin Drautzburg" <[email protected]>
To: <[email protected]>
Sent: Saturday, May 05, 2012 7:49 PM
Subject: Re: [Pharo-project] How to dispatch mouseWheel?


On Saturday, 5. May 2012 19:06:38 Martin Drautzburg wrote:
Sorry, that was a bit fuzzy.

My Morph is in a GeneralScrollPane. The GeneralScrollPane first sends
mouseWheel event to the scroller (my Morph). My Morph can scroll horizonally infinitely and handles the horizontal scrolling itself. Its mouseWheel method makes sure this only happens when the mouse is over it. Otherwise the event remains unhandled and the GeneralScrollPane handles it and scrolls vertically.

Now I have another Morph (really just a plain Morph) in betwen. The scroller again sends it a mouseWheel, but its just a plain Morph and it does not handle it. The effect is that scrolling is always controlled by the scroll pane (i.e. vertically). I cannot seem to tell the scroll pane: don't ask your scroller, ask my Morph, nor can I tell this plain Morph: when someone asks you to handle
a mouseWheel, don't just say no, ask my Morph instead.

Of course I can just create another Morph Class which passes all events to its
owner. Is there anything more elegant?

--
Martin



Reply via email to