Note_brr_kit.Mouse
SourceUser mouse.
Excepts for mouse ups, mouse events are only reported whenever the mouse is over the specified target.
By default coordinates are in target normalized coordinates with (0, 0) corresponding to the bottom left corner and (1,1) to the top right corner.
pt x y
is (x, y)
.
The type for gathering mouse events on a given target and using 'a
to represent points.
val on_target :
?capture:bool ->
?propagate:bool ->
?default:bool ->
?normalize:bool ->
(float -> float -> 'a) ->
Brr.Ev.target ->
'a events
on_target pt t
is mouse events for target t
using pt
to construct points. If normalize
is true
(default) coordinates are reported in target normalized coordinates (see above), if false
they are reported in pixels with the origin at the top-left of the element. The other parameters are those from Brr_note.Evr.on_target
.
pos evs
is the current mouse position in the target.
dpos evs
occurs on mouse moves with current mouse position minus the previous position.
mem evs
is true
whenever the mouse position is inside the target.