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/Text_buffer/Highlight/index.html

Module Text_buffer.HighlightSource

Character-range style overlays.

A highlight applies a style overlay to a range of grapheme offsets in the buffer. Highlights are layered by priority (higher wins) and grouped by ref_id for batch removal via remove_highlights_by_ref.

Sourcetype t

A highlight overlay.

Sourceval make : start_offset:int -> end_offset:int -> style:Ansi.Style.t -> ?priority:int -> ref_id:int -> unit -> t

make ~start_offset ~end_offset ~style ~ref_id () is a highlight covering grapheme offsets from start_offset (inclusive) to end_offset (exclusive).

priority defaults to 0. Higher values render on top. ref_id groups related highlights for batch removal via remove_highlights_by_ref.

Sourceval start_offset : t -> int

start_offset h is the inclusive start grapheme offset.

Sourceval end_offset : t -> int

end_offset h is the exclusive end grapheme offset.

Sourceval style : t -> Ansi.Style.t

style h is the style overlay.

Sourceval priority : t -> int

priority h is the rendering priority.

Sourceval ref_id : t -> int

ref_id h is the batch-removal reference.