[squeak-dev] Re: How difficult is it to change focus on scroll?

Bert Freudenberg bert at freudenbergs.de
Mon Aug 11 15:13:33 UTC 2014


On 08.08.2014, at 21:43, Marcel Taeumel <marcel.taeumel at student.hpi.uni-potsdam.de> wrote:

> As long as mouse wheel events are actually keyboard events (ctrl+up/down),
> this would be tricky. :) You need keyboard focus for them to be effective.

(Ab-)using keyboard events for scrolling was a hack to get scroll events from the VM to the image without having to define a new VM event type. And dispatching them in the image as keyboard events was also TSTTCPW.

The Right Thing to do now would be to define a completely new Morphic event type for scroll events. They would be dispatched similar to mouse events, so you always scroll the pane under the mouse pointer, even if it is not active.

This does not necessitate a VM change. HandMorph>>processEvents could look for scrolling keyboard events and create a ScrollEvent for them.

Eventually VMs could generate native scroll events, of course, but that's independent of creating a real scrolling framework inside the image.

- Bert -

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4142 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140811/cc3eaf6a/smime.bin


More information about the Squeak-dev mailing list