1.218 class wheel_data

A wheel_data is the event<-detail of the wheel and horizontal_wheel events. event<-rotation reports whole notches in the dominant direction. A wheel_data holds the precise scroll distance in both directions since the previous wheel event, as reported by trackpads and high resolution wheels. As the event delegates to its detail, the methods below are normally called on the event:

get(Ev, dy, DY)

The distances use the same sign as event<-rotation and the unit is a notch: positive dy scrolls up (the wheel is rotated away from the user) and positive dx scrolls right.

See also
- event<-detail
- event-rotation
- class event_detail

1.218.1 Instance variables

wheel_data <- dx: num
Horizontal scroll distance in notches. Positive is to the right.
wheel_data <- dy: num
Vertical scroll distance in notches. Positive is up.
wheel_data <- flipped: bool
@on if the system uses "natural" scrolling, where the content follows the fingers. wheel_data<-dx and wheel_data<-dy are as reported by the system; negate them to obtain the physical direction of the movement.

1.218.2 Send methods

wheel_data ->initialise: dx=num, dy=num, flipped=[bool]
Create from the given distances. flipped defaults to @off.