package miaou-core

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Miaou_style.BorderSource

Border styles and characters for box drawing.

Defines the different border styles available (single, double, rounded, etc.) and the character sets used to render them.

Sourcetype style =
  1. | None_
    (*

    No border

    *)
  2. | Single
    (*

    Single line: ┌─┐ │ └─┘

    *)
  3. | Double
    (*

    Double line: ╔═╗ ║ ╚═╝

    *)
  4. | Rounded
    (*

    Rounded corners: ╭─╮ │ ╰─╯

    *)
  5. | Ascii
    (*

    ASCII-only: +-+ | +-+

    *)
  6. | Heavy
    (*

    Heavy/thick: ┏━┓ ┃ ┗━┛

    *)

Border style variants

Sourceval style_to_yojson : style -> Yojson.Safe.t

JSON encoding/decoding for border styles. Accepts string values ("Single", "Rounded", etc.) for convenience.

Sourceval style_of_yojson : Yojson.Safe.t -> (style, string) result
Sourcetype chars = {
  1. tl : string;
    (*

    Top-left corner

    *)
  2. tr : string;
    (*

    Top-right corner

    *)
  3. bl : string;
    (*

    Bottom-left corner

    *)
  4. br : string;
    (*

    Bottom-right corner

    *)
  5. h : string;
    (*

    Horizontal line

    *)
  6. v : string;
    (*

    Vertical line

    *)
  7. t_down : string;
    (*

    Top T junction ┬

    *)
  8. t_up : string;
    (*

    Bottom T junction ┴

    *)
  9. t_right : string;
    (*

    Left T junction ├

    *)
  10. t_left : string;
    (*

    Right T junction ┤

    *)
  11. cross : string;
    (*

    Cross junction ┼

    *)
}

Border character set

Sourceval chars_of_style : style -> chars

Get the character set for a border style

Sourceval default_style : style

Default border style