MouseClick

trait MouseClick[Canvas]

Algebra for generating a stream of events corresponding to mouse clicks. Whenever the mouse is clicked a new event is generated with the location of the click.

This algebra applies to a Renderer's Canvas data types instead of the F data type, and hence gives mouse click locations in the canvas rather than relative to any Picture rendered on the Canvas.

class Object
trait Matchable
class Any

Value members

Abstract methods

def mouseClick(canvas: Canvas): Stream[IO, Point]

Return a stream that has an event every time the mouse is clicked on the canvas. The coordinate system used is the global coordinate system used by the Canvas, which usually means the origin is centered on the canvas.

Return a stream that has an event every time the mouse is clicked on the canvas. The coordinate system used is the global coordinate system used by the Canvas, which usually means the origin is centered on the canvas.

On systems, such as the browser, that will emulate touch events as mouse events this will also return such touch events.