Container that handles geometry for grid layouts (fixed columns and rows) using a set of declarative rules. More...
#include <juce_Grid.h>

Classes | |
| struct | Fr |
| A fractional ratio integer. More... | |
| struct | Px |
| A size in pixels. More... | |
| struct | TrackInfo |
| Represents a track. More... | |
Public Types | |
| enum class | AlignContent { start , end , center , stretch , spaceAround , spaceBetween , spaceEvenly } |
| Possible values for the alignContent property. More... | |
| enum class | AlignItems : int { start = 0 , end , center , stretch } |
| Possible values for the alignItems property. More... | |
| enum class | AutoFlow { row , column , rowDense , columnDense } |
| Possible values for the autoFlow property. More... | |
| enum class | JustifyContent { start , end , center , stretch , spaceAround , spaceBetween , spaceEvenly } |
| Possible values for the justifyContent property. More... | |
| enum class | JustifyItems : int { start = 0 , end , center , stretch } |
| Possible values for the justifyItems property. More... | |
Public Member Functions | |
| Grid ()=default | |
| Creates an empty Grid container with default parameters. | |
| int | getNumberOfColumns () const noexcept |
| Returns the number of columns. | |
| int | getNumberOfRows () const noexcept |
| Returns the number of rows. | |
| void | performLayout (Rectangle< int >) |
| Lays-out the grid's items within the given rectangle. | |
| void | setGap (Px sizeInPixels) noexcept |
| Sets the gap between rows and columns in pixels. | |
Public Attributes | |
| AlignContent | alignContent = AlignContent::stretch |
| Specifies the alignment of items along the columns. | |
| AlignItems | alignItems = AlignItems::stretch |
| Specifies the alignment of content inside the items along the columns. | |
| TrackInfo | autoColumns |
| The column track for auto dimension. | |
| AutoFlow | autoFlow = AutoFlow::row |
| Specifies how the auto-placement algorithm places items. | |
| TrackInfo | autoRows |
| The row track for auto dimension. | |
| Px | columnGap { 0 } |
| The gap in pixels between columns. | |
| Array< GridItem > | items |
| The set of items to lay-out. | |
| JustifyContent | justifyContent = JustifyContent::stretch |
| Specifies the alignment of items along the rows. | |
| JustifyItems | justifyItems = JustifyItems::stretch |
| Specifies the alignment of content inside the items along the rows. | |
| Px | rowGap { 0 } |
| The gap in pixels between rows. | |
| StringArray | templateAreas |
| Template areas. | |
| Array< TrackInfo > | templateColumns |
| The set of column tracks to lay out. | |
| Array< TrackInfo > | templateRows |
| The set of row tracks to lay out. | |
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/
@tags{GUI}
|
strong |
Possible values for the alignContent property.
|
strong |
|
strong |
Possible values for the autoFlow property.
|
strong |
Possible values for the justifyContent property.
|
strong |
Possible values for the justifyItems property.
|
default |
Creates an empty Grid container with default parameters.
|
inlinenoexcept |
Returns the number of columns.
References juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::size().
|
inlinenoexcept |
Returns the number of rows.
References juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::size().
| void juce::Grid::performLayout | ( | Rectangle< int > | ) |
Lays-out the grid's items within the given rectangle.
|
inlinenoexcept |
Sets the gap between rows and columns in pixels.
| AlignContent juce::Grid::alignContent = AlignContent::stretch |
Specifies the alignment of items along the columns.
| AlignItems juce::Grid::alignItems = AlignItems::stretch |
Specifies the alignment of content inside the items along the columns.
| TrackInfo juce::Grid::autoColumns |
The column track for auto dimension.
| AutoFlow juce::Grid::autoFlow = AutoFlow::row |
Specifies how the auto-placement algorithm places items.
| TrackInfo juce::Grid::autoRows |
The row track for auto dimension.
| Px juce::Grid::columnGap { 0 } |
The gap in pixels between columns.
| JustifyContent juce::Grid::justifyContent = JustifyContent::stretch |
Specifies the alignment of items along the rows.
| JustifyItems juce::Grid::justifyItems = JustifyItems::stretch |
Specifies the alignment of content inside the items along the rows.
| Px juce::Grid::rowGap { 0 } |
The gap in pixels between rows.
| StringArray juce::Grid::templateAreas |
Template areas.