[squeak-dev] Mouse Wheel Events - Step 2 of 3: EventSensor

marcel.taeumel Marcel.Taeumel at hpi.de
Fri Jun 10 13:47:09 UTC 2016


Hi, there.

Please find attached a change set that:

(0. Merges several peek* and prim* methods in EventSensor as a clean-up.)
1. Extends EventSensor to be prepared for VMs to really send mouse-wheel
events.
2. Account for those changes in HandMorph.
3. Support #wheelDelta in MouseWheelEvent instances for fine-granular
scrolling. Do only raise flags for, e.g., #isWheelUp and #isWheelDown if the
delta is above 120 units [1]. Accumulate this in MouseWheelState.

Thanks to Bert and Tim (F.) for the discuss to specify the low-level format:

{
   7. "EventTypeMouseWheel"
   stamp.
   deltaX. "VM converts OS values into multiples of 120 units per notch"
   deltaY. "(see above)"
   buttons. "like mouse event"
   modifiers. "like mouse event"
   nil. "unused"
   window index.
}

Here is the change set:  mouse-wheel-event-sensor.cs
<http://forum.world.st/file/n4900411/mouse-wheel-event-sensor.cs>  

Step 3 of 3 is to extend the VMs. :-)

Best,
Marcel

[1] https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel#Chrome



--
View this message in context: http://forum.world.st/Mouse-Wheel-Events-Step-2-of-3-EventSensor-tp4900411.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.


More information about the Squeak-dev mailing list