Raxol.UI.Layout.Table (Raxol v2.0.1)

View Source

Table layout operations for the UI system.

Provides advanced table layout functionality including:

  • Column width calculation
  • Row height computation
  • Cell positioning
  • Table scrolling support
  • Responsive column sizing

Summary

Functions

Measures a table element.

Measures and positions a table element.

Functions

measure(attrs_map, available_space)

@spec measure(map(), map()) :: map()

Measures a table element.

Calculates the required dimensions for a table based on:

  • Column widths (auto-sized or fixed)
  • Row count and height
  • Headers and borders
  • Available space constraints

measure_and_position(table_element, space, acc)

@spec measure_and_position(map(), map(), map() | list()) :: map() | list()

Measures and positions a table element.

Performs full layout calculation including:

  • Cell positioning within the table grid
  • Header row positioning
  • Border and separator positioning
  • Scrollable area configuration