MOTION_CB

IUP - Portable User Interface

MOTION_CB

Action generated when the mouse moves.

Callback

int function(Ihandle *ih, int x, int y, char *status); [in C]
elem:motion_cb(x, y: number, status: string) -> (ret: number) [in Lua]

ih: identifier of the element that activated the event.
x, y: position in the canvas where the event has occurred, in pixels.
status: status of mouse buttons and certain keyboard keys at the moment the event was generated. The following macros must be used for verification:

isshift(status)
iscontrol(status)
isbutton1(status)
isbutton2(status)
isbutton3(status)

They return 1 if the respective key or button is pressed, and 0 otherwise. These macros are also available in Lua.

Affects

IupCanvas, IupGLCanvas