MingaEditor.State.Render (Minga v0.1.0)

Copy Markdown View Source

Editor-owned render orchestration state.

This value owns the renderer connection, render correlation, semantic message store, and layout observations committed from one editor revision. Renderer process caches remain owned by MingaEditor.Renderer.Server.

Summary

Functions

Commits correlation state produced by a render scheduling transition.

Commits a semantic message store transition.

Appends a structured editor log message to the semantic message store.

Commits layout and focus observations derived from the same editor revision.

Records the renderer process currently serving this editor.

Invalidates layout observations after a shell transition.

Creates render state with a fresh semantic message store.

Remembers the last cursor line included in frontend presentation.

Stages a layout while its focus tree is derived from the full editor state.

Types

t()

@type t() :: %MingaEditor.State.Render{
  focus_tree: MingaEditor.FocusTree.t() | nil,
  last_cursor_line: non_neg_integer() | nil,
  layout: MingaEditor.Layout.t() | nil,
  message_store: MingaEditor.UI.Panel.MessageStore.t(),
  render_correlation: term(),
  renderer: pid() | nil
}

Functions

accept_correlation(render, correlation)

@spec accept_correlation(t(), MingaEditor.State.RenderCorrelation.t()) :: t()

Commits correlation state produced by a render scheduling transition.

accept_message_store(render, message_store)

@spec accept_message_store(t(), MingaEditor.UI.Panel.MessageStore.t()) :: t()

Commits a semantic message store transition.

append_message(render, text, level, subsystem)

@spec append_message(
  t(),
  String.t(),
  MingaEditor.UI.Panel.MessageStore.level(),
  atom() | nil
) :: t()

Appends a structured editor log message to the semantic message store.

cache_layout(render, layout, focus_tree)

@spec cache_layout(t(), MingaEditor.Layout.t() | nil, MingaEditor.FocusTree.t() | nil) ::
  t()

Commits layout and focus observations derived from the same editor revision.

connect_renderer(render, renderer)

@spec connect_renderer(t(), pid() | nil) :: t()

Records the renderer process currently serving this editor.

invalidate_layout(render)

@spec invalidate_layout(t()) :: t()

Invalidates layout observations after a shell transition.

new()

@spec new() :: t()

Creates render state with a fresh semantic message store.

observe_cursor_line(render, line)

@spec observe_cursor_line(t(), non_neg_integer() | nil) :: t()

Remembers the last cursor line included in frontend presentation.

stage_layout(render, layout)

@spec stage_layout(t(), MingaEditor.Layout.t()) :: t()

Stages a layout while its focus tree is derived from the full editor state.