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/Tree/Props/index.html

Module Tree.Props

type t

The type for declarative property bundles used for reconciler diffing.

val make : ?items:item list -> ?selected_index:int -> ?expand_depth:int -> ?indent_size:int -> ?show_guides:bool -> ?guide_style:Grid.Border.t -> ?expand_icon:string -> ?collapse_icon:string -> ?leaf_icon:string -> ?background:Ansi.Color.t -> ?text_color:Ansi.Color.t -> ?selected_background:Ansi.Color.t -> ?selected_text_color:Ansi.Color.t -> ?focused_selected_background:Ansi.Color.t -> ?focused_selected_text_color:Ansi.Color.t -> ?guide_color:Ansi.Color.t -> ?icon_color:Ansi.Color.t -> ?wrap_selection:bool -> ?fast_scroll_step:int -> unit -> t

make () is a property bundle with defaults:

  • items: [].
  • selected_index: 0-based index in the visible list; defaults to 0.
  • expand_depth: initial expansion depth. 0 means all nodes collapsed (default); 1 means the first level expanded; -1 means all nodes expanded.
  • indent_size: columns per depth level; defaults to 2.
  • show_guides: draw box-drawing guide lines; defaults to false.
  • guide_style: border character set for guide lines; defaults to Grid.Border.single.
  • expand_icon: icon for collapsed expandable nodes; defaults to "\xe2\x96\xb6" (U+25B6 BLACK RIGHT-POINTING TRIANGLE).
  • collapse_icon: icon for expanded nodes; defaults to "\xe2\x96\xbc" (U+25BC BLACK DOWN-POINTING TRIANGLE).
  • leaf_icon: icon for leaf nodes; defaults to " ".
  • background: background color; defaults to transparent.
  • text_color: text color; defaults to white.
  • selected_background: background color of the selected node; defaults to dark blue.
  • selected_text_color: text color of the selected node; defaults to yellow.
  • focused_selected_background: background color of the selected node when the widget is focused; when unset, falls back to selected_background.
  • focused_selected_text_color: text color of the selected node when the widget is focused; when unset, falls back to selected_text_color.
  • guide_color: guide line color; defaults to gray.
  • icon_color: expand/collapse icon color; defaults to gray.
  • wrap_selection: wrap selection at list boundaries; defaults to false.
  • fast_scroll_step: rows to skip with Shift+Up/Down; defaults to 5.
val default : t

default is make ().

val equal : t -> t -> bool

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