package textutils

  1. Overview
  2. Docs

Source file grid_intf.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
(** A grid lays out cells with concrete dimensions. *)

open! Core
open! Import

module Display = struct
  type t =
    | Short_box
    | Tall_box
    | Line
    | Blank
    | Column_titles
  [@@deriving compare, sexp_of]
end

module type Grid = sig
  module Display = Display

  type t [@@deriving sexp_of]

  val create
    :  'a Column.t list
    -> 'a list
    -> display:Display.t
    -> display_empty_rows:bool
    -> header_attr:Attr.t list
    -> max_width:int
    -> spacing:int
    -> prefer_split_on_spaces:bool
    -> t

  val to_screen : t -> prefer_split_on_spaces:bool -> Screen.t
end
OCaml

Innovation. Community. Security.