WHEEL_CB [Windows and Motif only]
Action generated when the mouse wheel is rotated. If this callback is not defined the wheel will automatically scroll the canvas in the vertical direction by some lines, the SCROLL_CB callback if defined will be called with the IUP_SBDRAGV operation.
Callback
int function(Ihandle *ih, float delta, int x, int y, char *r); [in C] elem:wheel_cb(delta, x, y: number, r: string) -> (ret: number) [in Lua]
ih:
identifier of the element that activated the event.
delta: the amount the wheel was rotated in notches.
x, y:
position in the canvas where the event has
occurred, in pixels.
r:
status of mouse buttons and certain keyboard
keys at the moment the event was generated. The following macros must be used for verification:
isshift(r)
iscontrol(r)
isbutton1(r)
isbutton2(r)
isbutton3(r)
isdouble(r)
Notes
In Motif delta is always 1or -1. In Windows is some situations delta can reach the value of two. In the future with more precise wheels this increment can be changed.
In GTK the wheel events are always translated into scrollbars events.
The wheel will only work if the focus is at the canvas.