struct
TUI::Markdown::Layout::Config
- TUI::Markdown::Layout::Config
- Struct
- Value
- Object
Overview
Bundles every MarkdownView style/spacing property Layout needs. Layout itself holds no state — it's a pure function of (blocks, width, config) — so this is just a parameter-passing convenience, not a second source of truth for defaults (those live on MarkdownView; Config's defaults here exist only so Layout is independently spec-able without constructing a view).
Defined in:
tui/markdown/layout.crConstructors
Instance Method Summary
- #clone
- #copy_with(heading_styles _heading_styles = @heading_styles, heading_indent_step _heading_indent_step = @heading_indent_step, list_marker_style _list_marker_style = @list_marker_style, list_indent_step _list_indent_step = @list_indent_step, list_bullet_glyphs _list_bullet_glyphs = @list_bullet_glyphs, quote_style _quote_style = @quote_style, quote_indent_step _quote_indent_step = @quote_indent_step, table_border_style _table_border_style = @table_border_style, table_header_style _table_header_style = @table_header_style, hrule_style _hrule_style = @hrule_style, table_max_col_width _table_max_col_width = @table_max_col_width, table_min_col_width _table_min_col_width = @table_min_col_width)
- #heading_indent_step : Int32
- #heading_styles : Array(Style)
- #hrule_style : Style
- #list_bullet_glyphs : Array(String)
- #list_indent_step : Int32
- #list_marker_style : Style
- #quote_indent_step : Int32
- #quote_style : Style
- #table_border_style : Style
- #table_header_style : Style
- #table_max_col_width : Int32
- #table_min_col_width : Int32
Constructor Detail
def self.new(heading_styles : Array(Style) = [Style.new(bold: true, fg: TUI.color(:cyan)), Style.new(bold: true), Style.new(bold: true, dim: true), Style.new(dim: true), Style.new(dim: true), Style.new(dim: true)], heading_indent_step : Int32 = 2, list_marker_style : Style = Style.new(fg: TUI.color(:gray)), list_indent_step : Int32 = 3, list_bullet_glyphs : Array(String) = ["•", "◦", "▪"], quote_style : Style = Style.new(fg: TUI.color(:gray), dim: true), quote_indent_step : Int32 = 2, table_border_style : Style = Style.new(fg: TUI.color(:gray)), table_header_style : Style = Style.new(bold: true), hrule_style : Style = Style.new(fg: TUI.color(:gray)), table_max_col_width : Int32 = 40, table_min_col_width : Int32 = 3)
#
Instance Method Detail
def copy_with(heading_styles _heading_styles = @heading_styles, heading_indent_step _heading_indent_step = @heading_indent_step, list_marker_style _list_marker_style = @list_marker_style, list_indent_step _list_indent_step = @list_indent_step, list_bullet_glyphs _list_bullet_glyphs = @list_bullet_glyphs, quote_style _quote_style = @quote_style, quote_indent_step _quote_indent_step = @quote_indent_step, table_border_style _table_border_style = @table_border_style, table_header_style _table_header_style = @table_header_style, hrule_style _hrule_style = @hrule_style, table_max_col_width _table_max_col_width = @table_max_col_width, table_min_col_width _table_min_col_width = @table_min_col_width)
#