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