package matrix

  1. Overview
  2. Docs

Module Grid.BorderSource

Box-drawing border character sets.

Box-drawing border character sets.

A border defines the 11 Unicode scalars needed to draw a complete box: four corners, horizontal and vertical edges, four T-junctions, and a cross intersection.

Borders

Sourcetype t = {
  1. top_left : Uchar.t;
  2. top_right : Uchar.t;
  3. bottom_left : Uchar.t;
  4. bottom_right : Uchar.t;
  5. horizontal : Uchar.t;
  6. vertical : Uchar.t;
  7. top_t : Uchar.t;
  8. bottom_t : Uchar.t;
  9. left_t : Uchar.t;
  10. right_t : Uchar.t;
  11. cross : Uchar.t;
}

The type for border character sets.

Presets

Sourceval single : t

Light box drawing: ┌ ┐ └ ┘ ─ │ ┬ ┴ ├ ┤ ┼

Sourceval double : t

Double box drawing: ╔ ╗ ╚ ╝ ═ ║ ╦ ╩ ╠ ╣ ╬

Sourceval rounded : t

Rounded box drawing: ╭ ╮ ╰ ╯ ─ │ ┬ ┴ ├ ┤ ┼

Sourceval heavy : t

Heavy box drawing: ┏ ┓ ┗ ┛ ━ ┃ ┳ ┻ ┣ ┫ ╋

Sourceval ascii : t

ASCII fallback: + + + + - | + + + + +.

Sourceval empty : t

Invisible border (spaces).

Customizing

Sourceval modify : ?top_left:Uchar.t -> ?top_right:Uchar.t -> ?bottom_left:Uchar.t -> ?bottom_right:Uchar.t -> ?horizontal:Uchar.t -> ?vertical:Uchar.t -> ?top_t:Uchar.t -> ?bottom_t:Uchar.t -> ?left_t:Uchar.t -> ?right_t:Uchar.t -> ?cross:Uchar.t -> t -> t

modify ?top_left ... base is base with the specified characters overridden.

Sides

Sourcetype side = [
  1. | `Top
  2. | `Right
  3. | `Bottom
  4. | `Left
]

The type for box sides.

Sourceval all : side list

all is [\`Top; \`Right; \`Bottom; \`Left].