package mosaic
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=9e4e90d17f9b2af1b07071fe425bc2c519c849c4f1d1ab73cde512be2d874849
sha512=06e9c4a741590942e81a27738d0b5c0413fafec8cf3b7dae047ad69f155e7b718aa4223818dc161b7d028efffcfd3365905e264d6fd31d453910ddfa91dcf9b9
doc/mosaic.ui/Mosaic_ui/Line_number/index.html
Module Mosaic_ui.Line_number
Line-number gutter with per-line colours, signs, and custom numbering.
Line number gutter for code display.
A composite container that pairs a line number gutter with a content area. Children are routed to the content area via Renderable.child_target. On render, the gutter discovers the first child with a Line information provider and draws line numbers accordingly.
The gutter renders line numbers, optional signs, and per-line background colors. Content area colors are applied via a render_before callback on the content node. Setting show_line_numbers to false hides the gutter entirely; it then takes no layout space.
Types
type line_sign = {before : string option;after : string option;before_color : Ansi.Color.t option;after_color : Ansi.Color.t option;
}The type for gutter signs rendered before and after the line number. Before signs are right-aligned within their column for visual consistency.
Props
module Props : sig ... endConstructors
val create :
parent:Renderable.t ->
?index:int ->
?id:string ->
?style:Toffee.Style.t ->
?visible:bool ->
?z_index:int ->
?opacity:float ->
?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 ->
tcreate ~parent () is a line number gutter container attached to parent. Optional parameters have the same defaults as Props.make.
Accessors
val node : t -> Renderable.tnode t is t's underlying renderable.