MingaEditor.DisplayList (Minga v0.1.0)

Copy Markdown View Source

Raw cell-grid draw tuple types retained for extension shell renderers.

The buffer/window render path is fully semantic: editor windows build Minga.RenderModel.Window models that frontend adapters encode directly (see MingaEditor.RenderPipeline.Content and RenderModel.Window.Builder). The dead cell-grid window carriers (Frame, WindowFrame) and their line producers were removed in #2241.

The per-surface chrome painters (completion menu, dashboard, hover/signature popups, modeline, tab bar, float popups, etc.) were deleted in #2311; the semantic frontends render those surfaces natively. draw/4 remains for the Git Porcelain extension shell renderer. The nested Overlay type is a legacy carrier with no live producer; the semantic chrome path supplies an empty overlay list.

Types

  • draw() — a pending draw: {row, col, text, style}.
  • text_run() — column + text + style (no row; row is the map key).
  • display_line() — a list of text runs for one screen row.
  • render_layer() — rows mapped to their display lines.

Summary

Types

RGB color as a 24-bit integer (e.g. 0xFF6C6B).

All text runs on one screen row.

A pending raw draw command: {row, col, text, Face.t()}.

Screen rows mapped to their display lines.

Style: a resolved Face struct.

A single styled text span at a specific column.

Functions

Creates a draw tuple with a Face style.

Types

color()

@type color() :: non_neg_integer()

RGB color as a 24-bit integer (e.g. 0xFF6C6B).

display_line()

@type display_line() :: [text_run()]

All text runs on one screen row.

draw()

A pending raw draw command: {row, col, text, Face.t()}.

render_layer()

@type render_layer() :: %{required(non_neg_integer()) => display_line()}

Screen rows mapped to their display lines.

style()

@type style() :: Minga.Core.Face.t()

Style: a resolved Face struct.

text_run()

@type text_run() ::
  {col :: non_neg_integer(), text :: String.t(), style :: Minga.Core.Face.t()}

A single styled text span at a specific column.

Functions

draw(row, col, text, face \\ Face.new())

Creates a draw tuple with a Face style.

Examples

iex> DisplayList.draw(0, 5, "hello")
{0, 5, "hello", %Face{name: "_"}}

iex> DisplayList.draw(0, 5, "hello", Face.new(fg: 0xFF0000, bold: true))
{0, 5, "hello", %Face{name: "_", fg: 0xFF0000, bold: true}}