package matrix

Build not yet checked
  1. Overview
  2. Docs
Fast, modern terminal toolkit for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mosaic-0.3.0.tbz
sha256=a92cbbcbe016fb19fb0a749222da0e459a9567aef3f4c7340d9bd6b71c53ed6f
sha512=6a7ab054605538bb31a2b73a1a6d093981a2704c9f0af5852221c05735290d74aca7c7282298c4d0f91e86a800e2ccd94b4918af883cd963449c758eb6b272b3

doc/matrix.grid/Matrix_grid/Border/index.html

Module Matrix_grid.BorderSource

Box-drawing characters.

Box-drawing characters, the sets Matrix_grid.draw_box draws borders with.

A border gives the 11 scalars that draw a box and the lines that divide it. These are the four corners, the horizontal and vertical edges, the four T-junctions, and the cross. Each must be one cell wide, since a box gives each one cell.

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 borders.

Presets

Sourceval single : t

single is the light border ┌ ┐ └ ┘ ─ │ ┬ ┴ ├ ┤ ┼.

Sourceval double : t

double is the double border ╔ ╗ ╚ ╝ ═ ║ ╦ ╩ ╠ ╣ ╬.

Sourceval rounded : t

rounded is the light border with round corners ╭ ╮ ╰ ╯ ─ │ ┬ ┴ ├ ┤ ┼.

Sourceval heavy : t

heavy is the heavy border ┏ ┓ ┗ ┛ ━ ┃ ┳ ┻ ┣ ┫ ╋.

Sourceval ascii : t

ascii is the border of ASCII characters + + + + - | + + + + +, for terminals without box-drawing characters.

Sourceval empty : t

empty is the border of 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 characters given in place of its own.

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].