Note_brr_kit.MouseUser 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.
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 eventson_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.
val on_el :
?capture:bool ->
?propagate:bool ->
?default:bool ->
?normalize:bool ->
(float -> float -> 'a) ->
Brr.El.t ->
'a eventsval destroy : 'a events -> unitdestroy evs removes the callbacks registred by evs. It's important to perform this whenever you no longer need the events as evs needs to register callbacks with the document to correctly capture mouse ups.
val pos : 'a events -> 'a Note.signalpos evs is the current mouse position in the target.
val dpos : 'a events -> 'a Note.eventdpos evs occurs on mouse moves with current mouse position minus the previous position.
val mem : 'a events -> bool Note.signalmem evs is true whenever the mouse position is inside the target.
val left : 'a events -> bool Note.signalleft evs is true whenever the left mouse button went down in the target and did not go up yet.
val left_down : 'a events -> 'a Note.eventleft_down evs has an occurence with the mouse position whenever the button goes down in the target.
val left_up : 'a events -> 'a Note.eventleft_up evs is true whenever the left mouse button went down in the target and goes back up anywhere. Note that the reported position might not be in the target.
val mid : 'a events -> bool Note.signalmid is like left but the middle button.
val mid_down : 'a events -> 'a Note.eventmid_downis like left_down but for the middle button.
val mid_up : 'a events -> 'a Note.eventmid_up is like left_up but for the middle button.
val right : 'a events -> bool Note.signalright is like left but the right button.
val right_down : 'a events -> 'a Note.eventright_downis like left_down but for the right button.
val right_up : 'a events -> 'a Note.eventright_up is like left_up but for the right button.
module Cursor : sig ... endMouse cursors.