Container that handles geometry for grid layouts (fixed columns and rows) using a set of declarative rules.
Implemented from the CSS Grid Layout specification as described at: https://css-tricks.com/snippets/css/complete-guide-grid/
- See also
- GridItem
|
enum class | JustifyItems : int { start = 0
, end
, center
, stretch
} |
| Possible values for the justifyItems property. More...
|
enum class | AlignItems : int { start = 0
, end
, center
, stretch
} |
| Possible values for the alignItems property. More...
|
enum class | JustifyContent {
start
, end
, center
, stretch
,
spaceAround
, spaceBetween
, spaceEvenly
} |
| Possible values for the justifyContent property. More...
|
enum class | AlignContent {
start
, end
, center
, stretch
,
spaceAround
, spaceBetween
, spaceEvenly
} |
| Possible values for the alignContent property. More...
|
enum class | AutoFlow { row
, column
, rowDense
, columnDense
} |
| Possible values for the autoFlow property. More...
|
|
| Grid ()=default |
| Creates an empty Grid container with default parameters.
|
void | setGap (Px sizeInPixels) noexcept |
| Sets the gap between rows and columns in pixels.
|
void | performLayout (Rectangle< int >) |
| Lays-out the grid's items within the given rectangle.
|
int | getNumberOfColumns () const noexcept |
| Returns the number of columns.
|
int | getNumberOfRows () const noexcept |
| Returns the number of rows.
|
◆ JustifyItems
Possible values for the justifyItems property.
Enumerator |
---|
start | Content inside the item is justified towards the left.
|
end | Content inside the item is justified towards the right.
|
center | Content inside the item is justified towards the center.
|
stretch | Content inside the item is stretched from left to right.
|
◆ AlignItems
Possible values for the alignItems property.
Enumerator |
---|
start | Content inside the item is aligned towards the top.
|
end | Content inside the item is aligned towards the bottom.
|
center | Content inside the item is aligned towards the center.
|
stretch | Content inside the item is stretched from top to bottom.
|
◆ JustifyContent
Possible values for the justifyContent property.
Enumerator |
---|
start | Items are justified towards the left of the container.
|
end | Items are justified towards the right of the container.
|
center | Items are justified towards the center of the container.
|
stretch | Items are stretched from left to right of the container.
|
spaceAround | Items are evenly spaced along the row with spaces between them.
|
spaceBetween | Items are evenly spaced along the row with spaces around them.
|
spaceEvenly | Items are evenly spaced along the row with even amount of spaces between them.
|
◆ AlignContent
Possible values for the alignContent property.
Enumerator |
---|
start | Items are aligned towards the top of the container.
|
end | Items are aligned towards the bottom of the container.
|
center | Items are aligned towards the center of the container.
|
stretch | Items are stretched from top to bottom of the container.
|
spaceAround | Items are evenly spaced along the column with spaces between them.
|
spaceBetween | Items are evenly spaced along the column with spaces around them.
|
spaceEvenly | Items are evenly spaced along the column with even amount of spaces between them.
|
◆ AutoFlow
Possible values for the autoFlow property.
Enumerator |
---|
row | Fills the grid by adding rows of items.
|
column | Fills the grid by adding columns of items.
|
rowDense | Fills the grid by adding rows of items and attempts to fill in gaps.
|
columnDense | Fills the grid by adding columns of items and attempts to fill in gaps.
|
◆ Grid()
Creates an empty Grid container with default parameters.
◆ setGap()
void juce::Grid::setGap |
( |
Px | sizeInPixels | ) |
|
|
noexcept |
Sets the gap between rows and columns in pixels.
References columnGap, and rowGap.
◆ performLayout()
void juce::Grid::performLayout |
( |
Rectangle< int > | | ) |
|
Lays-out the grid's items within the given rectangle.
◆ getNumberOfColumns()
int juce::Grid::getNumberOfColumns |
( |
| ) |
const |
|
noexcept |
◆ getNumberOfRows()
int juce::Grid::getNumberOfRows |
( |
| ) |
const |
|
noexcept |
◆ justifyItems
Specifies the alignment of content inside the items along the rows.
◆ alignItems
Specifies the alignment of content inside the items along the columns.
◆ justifyContent
Specifies the alignment of items along the rows.
◆ alignContent
Specifies the alignment of items along the columns.
◆ autoFlow
Specifies how the auto-placement algorithm places items.
◆ templateColumns
◆ templateRows
◆ templateAreas
◆ autoRows
The row track for auto dimension.
◆ autoColumns
The column track for auto dimension.
◆ columnGap
Px juce::Grid::columnGap { 0 } |
The gap in pixels between columns.
Referenced by setGap().
◆ rowGap
Px juce::Grid::rowGap { 0 } |
The gap in pixels between rows.
Referenced by setGap().
◆ items
The set of items to lay-out.