Module Widget

type box = {
  1. x : float;
  2. y : float;
  3. w : float;
  4. h : float;
}
val contains : box -> float -> float -> bool
type id = float * float
val id : box -> id
val inset : float -> box -> box
val left : box -> float
val right : box -> float
val top : box -> float
val bottom : box -> float
type input = {
  1. mx : float;
  2. my : float;
  3. mdown : bool;
  4. mclick : bool;
  5. mrdown : bool;
  6. typed : string;
  7. wheel : float;
  8. keys : string list;
}
val no_input : input
type canvas_event =
  1. | Hover of float * float
  2. | Press of float * float
  3. | Right_press of float * float
type paint =
  1. | Fill of Color.t * box
  2. | Text of Color.t * box * string
  3. | Disc of Color.t * float * float * float
  4. | Segment of Color.t * float * float * float * float * float
val frame : Color.t -> float -> box -> paint list
val text_width : size:float -> string -> float