Module Useri.Mouse

module Mouse: sig .. end
User mouse.

Mouse events are only reported whenever the mouse is in the application surface. Coordinates are in surface normalized coordinates with (0,0) corresponding to the bottom left corner and (1,1) to the top right corner.



Mouse position


val pos : Gg.p2 React.signal
pos is the current mouse position.
val dpos : Gg.v2 React.event
dpos occurs on mouse moves with current mouse position minus the previous position.

Mouse buttons


val left : bool React.signal
left is true whenever the left mouse button is down.
val left_down : Gg.p2 React.event
left_down has an occurence whenever the left mouse button goes down.
val left_up : Gg.p2 React.event
left_up has an occurence whenever the left mouse button goes up.
val middle : bool React.signal
middle is true whenever the middle mouse button is down.
val middle_down : Gg.p2 React.event
middle_down has an occurence whenever the middle mouse button goes down.
val middle_up : Gg.p2 React.event
middle_up has an occurence whenever the middle mouse button goes up.
val right : bool React.signal
right is true whenever the right mouse button is down.
val right_up : Gg.p2 React.event
right_up has an occurence whenever the right mouse button goes up.
val right_down : Gg.p2 React.event
right_down has an occurence whenever the right mouse button goes down.