Grid layout properties (CSS Grid Level 1 subset). More...
#include <geometry.hpp>
Classes | |
| struct | NamedArea |
| Named-area grid. More... | |
Public Types | |
| enum class | AutoFlow { row , column , row_dense , column_dense } |
| Auto-flow direction. More... | |
Static Public Member Functions | |
| static std::vector< GridTrack > | parse_template (const std::string &tmpl, int depth=0) |
| Parse "1fr 2fr auto 100px" into track list. | |
| static std::vector< NamedArea > | parse_template_areas (const std::string &css) |
| Parse the CSS named-area grid string (e.g. | |
| static AutoFlow | parse_auto_flow (const std::string &s) |
| Parse the auto-flow keyword string. Unrecognized → row. | |
Public Attributes | |
| std::vector< GridTrack > | template_columns |
| grid-template-columns | |
| std::vector< GridTrack > | template_rows |
| grid-template-rows | |
| GridTrack | auto_columns = GridTrack::auto_size() |
| Implicit-track sizing for auto-placed items that overflow the explicit grid. | |
| GridTrack | auto_rows = GridTrack::auto_size() |
| AutoFlow | auto_flow = AutoFlow::row |
| float | column_gap = 0 |
| grid-column-gap | |
| float | row_gap = 0 |
| grid-row-gap | |
| std::vector< NamedArea > | template_areas |
| int | grid_column_start = 0 |
| 0 = auto placement | |
| int | grid_column_end = 0 |
| 0 = span 1 | |
| int | grid_row_start = 0 |
| int | grid_row_end = 0 |
| std::string | grid_area_name |
| grid-area: header references the parent's NamedArea by name. | |
Grid layout properties (CSS Grid Level 1 subset).
Supports: • grid-auto-columns / grid-auto-rows — implicit-track sizing • grid-auto-flow — row / column / dense • grid-template-areas — named-area string parser • grid-area shorthand — single token reference into the named-area map (resolves to the matching cell range)
|
strong |
|
inlinestatic |
Parse the auto-flow keyword string. Unrecognized → row.
|
static |
Parse "1fr 2fr auto 100px" into track list.
depth bounds recursion into nested repeat(...) bodies from untrusted design-tool input.
|
static |
Parse the CSS named-area grid string (e.g.
"'h h h' 'm c c' 'f f f'") into the NamedArea list. Each row is wrapped in single quotes; cells within a row are space-separated. Cells that share a name across adjacent rows or columns merge into a single rectangular area. '.' is the CSS spec spacer token (skipped entirely).
| GridTrack pulp::view::GridStyle::auto_columns = GridTrack::auto_size() |
Implicit-track sizing for auto-placed items that overflow the explicit grid.
CSS spec: a single track template that's repeated for every implicit row/column.
| AutoFlow pulp::view::GridStyle::auto_flow = AutoFlow::row |
| GridTrack pulp::view::GridStyle::auto_rows = GridTrack::auto_size() |
| float pulp::view::GridStyle::column_gap = 0 |
grid-column-gap
| std::string pulp::view::GridStyle::grid_area_name |
grid-area: header references the parent's NamedArea by name.
Empty string means "no named-area reference; use the explicit start/end fields above."
| int pulp::view::GridStyle::grid_column_end = 0 |
0 = span 1
| int pulp::view::GridStyle::grid_column_start = 0 |
0 = auto placement
| int pulp::view::GridStyle::grid_row_end = 0 |
| int pulp::view::GridStyle::grid_row_start = 0 |
| float pulp::view::GridStyle::row_gap = 0 |
grid-row-gap
| std::vector<NamedArea> pulp::view::GridStyle::template_areas |
| std::vector<GridTrack> pulp::view::GridStyle::template_columns |
grid-template-columns
| std::vector<GridTrack> pulp::view::GridStyle::template_rows |
grid-template-rows