box_styles (cellium v0.1.0)
View SourceBox styles and rendering functions for various border types.
Summary
Functions
Renders a rectangular box with optional title in the top border.
Functions
-spec render_box(integer(), integer(), integer(), integer(), #box{top_left :: term(), top :: term(), top_divider :: term(), top_right :: term(), head_left :: term(), head_vertical :: term(), head_right :: term(), head_row_left :: term(), head_row_horizontal :: term(), head_row_cross :: term(), head_row_right :: term(), mid_left :: term(), mid_vertical :: term(), mid_right :: term(), row_left :: term(), row_horizontal :: term(), row_cross :: term(), row_right :: term(), foot_row_left :: term(), foot_row_horizontal :: term(), foot_row_cross :: term(), foot_row_right :: term(), foot_left :: term(), foot_vertical :: term(), foot_right :: term(), bottom_left :: term(), bottom :: term(), bottom_divider :: term(), bottom_right :: term(), is_ascii :: term()}, string() | binary(), left | center | right, atom(), atom(), map()) -> map().
Renders a rectangular box with optional title in the top border.
This is a generic box renderer that handles simple rectangular boxes with optional title text interrupting the top border.
X: Starting X coordinate (left edge)Y: Starting Y coordinate (top edge)Width: Total width of the box (including borders)Height: Total height of the box (including borders)BoxStyle: Box style record defining border charactersTitle: Optional title text (empty string or binary for no title)TitleAlign: Title alignment (left | center | right)Fg: Foreground colorBg: Background colorBuffer: Current frame buffer- Returns: Updated buffer