draw_tree.mli 712 B

1234567891011121314151617181920212223242526272829303132333435
  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 arm : dir -> t list -> t
  7. val figure : fig -> t
  8. val capture : Event.Id.t -> t -> t
  9. val equal : t -> t -> bool
  10. val to_string : t -> string
  11. module Path : sig
  12. type t = int list
  13. val root : t
  14. val of_list_rev : int list -> t
  15. val to_string : t -> string
  16. include Base.Comparable.S with type t := t
  17. end
  18. type update = Path.t * fig
  19. val apply_updates_exn : update Sequence.t -> tree -> tree
  20. module Draw : sig
  21. type t = Rect of AABB.t * Color.t
  22. val equal : t -> t -> bool
  23. val to_string : t -> string
  24. end
  25. val render : tree -> Draw.t Sequence.t
  26. val capture_point : pos:Pos.t -> tree -> Event.Id.t list