package mosaic

  1. Overview
  2. Docs

Module Table.Props

type t

The type for the declarative property bundle used for reconciler diffing.

val make : ?columns:column list -> ?rows:cell array list -> ?selected_row:int -> ?border:bool -> ?border_style:Grid.Border.t -> ?show_header:bool -> ?show_column_separator:bool -> ?show_row_separator:bool -> ?cell_padding:int -> ?header_color:Ansi.Color.t -> ?header_background:Ansi.Color.t -> ?text_color:Ansi.Color.t -> ?background:Ansi.Color.t -> ?selected_text_color:Ansi.Color.t -> ?selected_background:Ansi.Color.t -> ?focused_selected_text_color:Ansi.Color.t -> ?focused_selected_background:Ansi.Color.t -> ?row_styles:Ansi.Style.t list -> ?wrap_selection:bool -> ?fast_scroll_step:int -> unit -> t

make () is a property set with:

  • columns the column specification list. Defaults to [].
  • rows the data rows, each a cell array. Defaults to [].
  • selected_row the initial selection index, clamped to the valid range. Defaults to 0.
  • border enables the outer border and header separator. Defaults to true.
  • border_style the border character set. Defaults to Grid.Border.single.
  • show_header shows the header row. Defaults to true.
  • show_column_separator shows vertical lines between columns. Defaults to false.
  • show_row_separator shows horizontal lines between rows. Defaults to false.
  • cell_padding the horizontal padding (in terminal columns) per side of each cell. Defaults to 0.
  • header_color the header text color. Defaults to white.
  • header_background the header background color. Defaults to dark gray.
  • text_color the default cell text color. Defaults to white.
  • background the table background color. Defaults to transparent.
  • selected_text_color the selected row text color. Defaults to yellow.
  • selected_background the selected row background. Defaults to dark blue.
  • focused_selected_text_color the focused-and-selected row text color. When None, selected_text_color is used instead.
  • focused_selected_background the focused-and-selected row background. When None, selected_background is used instead.
  • row_styles the list of alternating row styles, applied by modulo index. Defaults to [] (no alternation).
  • wrap_selection wraps selection at row boundaries. Defaults to false.
  • fast_scroll_step the number of rows to skip on 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.