draw_tree.mli 1021 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. open Base
  2. open Math
  3. type tree and t = tree
  4. type dir = [`H | `V]
  5. type fig = Rect of Dim.t * Color.t
  6. val uninit : t
  7. val arm : dir -> t list -> t
  8. val figure : fig -> t
  9. val equal : t -> t -> bool
  10. val to_string : t -> string
  11. val is_init : t -> bool
  12. val event_ids : t -> Event.Id.t Sequence.t
  13. module Path : sig
  14. type t
  15. val root : unit -> t
  16. val of_list : int list -> t
  17. val of_list_rev : int list -> t
  18. val to_list : t -> int list
  19. val to_string : t -> string
  20. val equal : t -> t -> bool
  21. end
  22. val path : t -> Path.t
  23. val refresh_paths : ?rev_prefix:int list -> t -> unit
  24. module Update : sig
  25. type t = Set of fig | Mount of tree | Unmount
  26. val equal : t -> t -> bool
  27. val to_string : t -> string
  28. end
  29. type updates = (Path.t * Update.t) Sequence.t
  30. val apply_updates_exn : updates -> tree -> tree
  31. module Draw : sig
  32. type t = Rect of AABB.t * Color.t
  33. val equal : t -> t -> bool
  34. val to_string : t -> string
  35. end
  36. val render : tree -> Draw.t Sequence.t
  37. val capture_point : pos:Pos.t -> tree -> Event.Id.t option