JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
juce::Grid Class Referencefinal

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  Helpers
 
struct  Px
 A size in pixels. More...
 
struct  TrackInfo
 Represents a track. More...
 

Public Types

enum class  JustifyItems : int { start , end , center , stretch }
 Possible values for the justifyItems property. More...
 
enum class  AlignItems : int { start , 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...
 

Public Member Functions

 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.
 

Public Attributes

JustifyItems justifyItems
 Specifies the alignment of content inside the items along the rows.
 
AlignItems alignItems
 Specifies the alignment of content inside the items along the columns.
 
JustifyContent justifyContent
 Specifies the alignment of items along the rows.
 
AlignContent alignContent
 Specifies the alignment of items along the columns.
 
AutoFlow autoFlow
 Specifies how the auto-placement algorithm places items.
 
Array< TrackInfotemplateColumns
 The set of column tracks to lay out.
 
Array< TrackInfotemplateRows
 The set of row tracks to lay out.
 
StringArray templateAreas
 Template areas.
 
TrackInfo autoRows
 The row track for auto dimension.
 
TrackInfo autoColumns
 The column track for auto dimension.
 
Px columnGap
 The gap in pixels between columns.
 
Px rowGap
 The gap in pixels between rows.
 
Array< GridItemitems
 The set of items to lay-out.
 

Detailed Description

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

@tags{GUI}

Definition at line 39 of file juce_Grid.h.


Class Documentation

◆ juce::Grid::Helpers

struct juce::Grid::Helpers

Definition at line 37 of file juce_Grid.cpp.

Member Enumeration Documentation

◆ 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.

Definition at line 134 of file juce_Grid.h.

◆ 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.

Definition at line 113 of file juce_Grid.h.

◆ 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.

Definition at line 146 of file juce_Grid.h.

◆ 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.

Definition at line 122 of file juce_Grid.h.

◆ 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.

Definition at line 104 of file juce_Grid.h.

Member Function Documentation

◆ getNumberOfColumns()

int juce::Grid::getNumberOfColumns ( ) const
noexcept

Returns the number of columns.

Definition at line 210 of file juce_Grid.h.

◆ getNumberOfRows()

int juce::Grid::getNumberOfRows ( ) const
noexcept

Returns the number of rows.

Definition at line 212 of file juce_Grid.h.

◆ performLayout()

void juce::Grid::performLayout ( Rectangle< int targetArea)

Lays-out the grid's items within the given rectangle.

Definition at line 1104 of file juce_Grid.cpp.

◆ setGap()

void juce::Grid::setGap ( Px  sizeInPixels)
noexcept

Sets the gap between rows and columns in pixels.

Definition at line 198 of file juce_Grid.h.

Member Data Documentation

◆ alignContent

AlignContent juce::Grid::alignContent

Specifies the alignment of items along the columns.

Definition at line 170 of file juce_Grid.h.

◆ alignItems

AlignItems juce::Grid::alignItems

Specifies the alignment of content inside the items along the columns.

Definition at line 164 of file juce_Grid.h.

◆ autoColumns

TrackInfo juce::Grid::autoColumns

The column track for auto dimension.

Definition at line 190 of file juce_Grid.h.

◆ autoFlow

AutoFlow juce::Grid::autoFlow

Specifies how the auto-placement algorithm places items.

Definition at line 173 of file juce_Grid.h.

◆ autoRows

TrackInfo juce::Grid::autoRows

The row track for auto dimension.

Definition at line 187 of file juce_Grid.h.

◆ columnGap

Px juce::Grid::columnGap

The gap in pixels between columns.

Definition at line 193 of file juce_Grid.h.

◆ items

Array<GridItem> juce::Grid::items

The set of items to lay-out.

Definition at line 202 of file juce_Grid.h.

◆ justifyContent

JustifyContent juce::Grid::justifyContent

Specifies the alignment of items along the rows.

Definition at line 167 of file juce_Grid.h.

◆ justifyItems

JustifyItems juce::Grid::justifyItems

Specifies the alignment of content inside the items along the rows.

Definition at line 161 of file juce_Grid.h.

◆ rowGap

Px juce::Grid::rowGap

The gap in pixels between rows.

Definition at line 195 of file juce_Grid.h.

◆ templateAreas

StringArray juce::Grid::templateAreas

Template areas.

Definition at line 184 of file juce_Grid.h.

◆ templateColumns

Array<TrackInfo> juce::Grid::templateColumns

The set of column tracks to lay out.

Definition at line 178 of file juce_Grid.h.

◆ templateRows

Array<TrackInfo> juce::Grid::templateRows

The set of row tracks to lay out.

Definition at line 181 of file juce_Grid.h.


The documentation for this class was generated from the following files: