package tiny_appkits

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Html_layoutSource

Sourcetype metrics = Looks.t -> string -> float
Sourcetype picture = {
  1. src : string;
  2. height : float;
  3. middle : bool;
}
Sourcetype control = {
  1. element : Dom.element;
  2. control_height : float;
}
Sourcetype fragment = {
  1. text : string;
  2. look : Looks.t;
  3. x : float;
  4. width : float;
  5. baseline : float;
  6. picture : picture option;
  7. control : control option;
  8. element : Dom.element;
}
Sourcetype line = {
  1. top : float;
  2. height : float;
  3. baseline : float;
  4. fragments : fragment list;
  5. anchors : string list;
}
Sourcetype kind =
  1. | Block of Dom.element
  2. | Anonymous
  3. | Rule of Dom.element
Sourcetype marker =
  1. | Bullet
  2. | Number of int
Sourcetype box = {
  1. kind : kind;
  2. x : float;
  3. y : float;
  4. width : float;
  5. height : float;
  6. children : box list;
  7. lines : line list;
  8. floats : fragment list;
  9. marker : marker option;
  10. background : Looks.color option;
}
Sourcetype unit_ = {
  1. space : float;
  2. width : float;
}
Sourcetype breaker = measure:float -> unit_ array -> (int * int) list
Sourceval greedy : breaker
Sourceval layout : metrics -> ?breaker:breaker -> ?picture_size:(string -> (float * float) option) -> ?style:(Dom.element -> (string * string) list) -> root:Looks.t -> width:float -> Dom.element -> box
Sourceval control_size : metrics -> Looks.t -> Dom.element -> (float * float) option
Sourceval first_baseline : box -> float option
Sourceval fragments : box -> fragment list