Raxol.UI.Layout.Panels (Raxol v0.4.0)

View Source

Handles layout calculations for panel UI elements.

This module is responsible for:

  • Panel border rendering
  • Panel content layout
  • Panel title positioning
  • Panel-specific spacing and constraints

Summary

Functions

Measures the space required by a panel element.

Processes a panel element, calculating layout for it and its children.

Functions

measure_panel(map, available_space)

Measures the space required by a panel element.

Parameters

  • panel - The panel element to measure
  • available_space - The available space for the panel

Returns

The dimensions of the panel: %{width: w, height: h}

process(panel_element, space, acc)

Processes a panel element, calculating layout for it and its children.

Parameters

  • panel - The panel element to process
  • space - The available space for the panel
  • acc - The accumulator for rendered elements

Returns

A list of positioned elements with absolute coordinates.