Raxol.UI.Layout.PreparedElement (Raxol v2.6.0)

View Source

An element with pre-computed text measurements.

Inspired by Pretext's two-phase prepare/layout architecture: the expensive text measurement step (prepare) is separated from the cheap position arithmetic step (layout). PreparedElements carry cached measurements so that re-layout on resize only needs arithmetic, not re-measurement.

Summary

Types

t()

@type t() :: %Raxol.UI.Layout.PreparedElement{
  animation_hints: [Raxol.Animation.Hint.t()],
  children: [t()] | nil,
  content_hash: integer() | nil,
  element: map(),
  measured_height: non_neg_integer(),
  measured_width: non_neg_integer(),
  type: atom()
}