Cringe.Layout.Node (cringe v0.4.0)

Copy Markdown View Source

Positioned result of laying out a document node.

Summary

Types

t()

@type t() :: %Cringe.Layout.Node{
  children: [t()],
  content_rect: Cringe.Rect.t(),
  cursor: {pos_integer(), pos_integer()} | nil,
  document: Cringe.Document.t(),
  focusable?: boolean(),
  id: term() | nil,
  lines: [String.t()],
  rect: Cringe.Rect.t(),
  role: atom() | nil,
  size: Cringe.Layout.Size.t()
}

Functions

new(document, lines, opts \\ [])

@spec new(Cringe.Document.t(), [String.t()], keyword()) :: t()

new_sized(document, size, opts \\ [])

@spec new_sized(Cringe.Document.t(), Cringe.Layout.Size.t(), keyword()) :: t()