package mosaic

  1. Overview
  2. Docs
Terminal UI framework for OCaml with The Elm Architecture

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mosaic-0.1.0.tbz
sha256=9e4e90d17f9b2af1b07071fe425bc2c519c849c4f1d1ab73cde512be2d874849
sha512=06e9c4a741590942e81a27738d0b5c0413fafec8cf3b7dae047ad69f155e7b718aa4223818dc161b7d028efffcfd3365905e264d6fd31d453910ddfa91dcf9b9

doc/mosaic.ui/Mosaic_ui/Line_number/Props/index.html

Module Line_number.Props

type t

The type for declarative property bundles. Used for reconciler diffing.

val make : ?fg:Ansi.Color.t -> ?bg:Ansi.Color.t -> ?min_width:int -> ?padding_right:int -> ?show_line_numbers:bool -> ?line_number_offset:int -> ?line_colors:(int * line_color) list -> ?line_signs:(int * line_sign) list -> ?line_numbers:(int * int) list -> ?hidden_line_numbers:int list -> unit -> t

make () is a line number props value with:

  • fg is the line number foreground color. Defaults to medium gray.
  • bg is the gutter background color. Defaults to None (transparent).
  • min_width is the minimum gutter width in columns. Defaults to 3.
  • padding_right is the padding between the number and the content area. Defaults to 1.
  • show_line_numbers controls whether the gutter is displayed. When false, the gutter is hidden and takes no layout space. Defaults to true.
  • line_number_offset is added to each logical line index. Defaults to 0. Use to display line numbers starting from a value other than 1.
  • line_colors are per-line background colors, keyed by logical line index. Defaults to [].
  • line_signs are per-line gutter signs, keyed by logical line index. Defaults to [].
  • line_numbers are custom line number overrides, keyed by logical line index. When set for a line, the custom number is displayed instead of the computed logical_line + 1 + line_number_offset. Also affects gutter width calculation. Defaults to [].
  • hidden_line_numbers is the list of logical line indices whose numbers are hidden, leaving a blank gutter. Defaults to [].
val default : t

default is make ().

val equal : t -> t -> bool

equal a b is true iff a and b describe identical visual properties.