JUCE
|
Defines an item in a Grid. More...
Classes | |
struct | Margin |
Represents a margin. More... | |
struct | Property |
Represents a property. More... | |
struct | Span |
Represents a span. More... | |
struct | StartAndEndProperty |
Represents start and end properties. More... | |
Public Types | |
enum | Keyword { Keyword::autoValue } |
enum | JustifySelf : int { JustifySelf::start = 0, JustifySelf::end, JustifySelf::center, JustifySelf::stretch, JustifySelf::autoValue } |
Possible values for the justifySelf property. More... | |
enum | AlignSelf : int { AlignSelf::start = 0, AlignSelf::end, AlignSelf::center, AlignSelf::stretch, AlignSelf::autoValue } |
Possible values for the alignSelf property. More... | |
enum | { useDefaultValue = -2, notAssigned = -1 } |
Public Member Functions | |
GridItem () noexcept | |
Creates an item with default parameters. More... | |
GridItem (Component &componentToUse) noexcept | |
Creates an item with a given Component to use. More... | |
GridItem (Component *componentToUse) noexcept | |
Creates an item with a given Component to use. More... | |
~GridItem () noexcept | |
Destructor. More... | |
void | setArea (Property rowStart, Property columnStart, Property rowEnd, Property columnEnd) |
Short-hand. More... | |
void | setArea (Property rowStart, Property columnStart) |
Short-hand, span of 1 by default. More... | |
void | setArea (const String &areaName) |
Short-hand. More... | |
GridItem | withArea (Property rowStart, Property columnStart, Property rowEnd, Property columnEnd) const noexcept |
Short-hand. More... | |
GridItem | withArea (Property rowStart, Property columnStart) const noexcept |
Short-hand, span of 1 by default. More... | |
GridItem | withArea (const String &areaName) const noexcept |
Short-hand. More... | |
GridItem | withRow (StartAndEndProperty row) const noexcept |
Returns a copy of this object with a new row property. More... | |
GridItem | withColumn (StartAndEndProperty column) const noexcept |
Returns a copy of this object with a new column property. More... | |
GridItem | withAlignSelf (AlignSelf newAlignSelf) const noexcept |
Returns a copy of this object with a new alignSelf property. More... | |
GridItem | withJustifySelf (JustifySelf newJustifySelf) const noexcept |
Returns a copy of this object with a new justifySelf property. More... | |
GridItem | withWidth (float newWidth) const noexcept |
Returns a copy of this object with a new width. More... | |
GridItem | withHeight (float newHeight) const noexcept |
Returns a copy of this object with a new height. More... | |
GridItem | withSize (float newWidth, float newHeight) const noexcept |
Returns a copy of this object with a new size. More... | |
GridItem | withMargin (Margin newMargin) const noexcept |
Returns a copy of this object with a new margin. More... | |
GridItem | withOrder (int newOrder) const noexcept |
Returns a copy of this object with a new order. More... | |
Public Attributes | |
Component * | associatedComponent = nullptr |
If this is non-null, it represents a Component whose bounds are controlled by this item. More... | |
int | order = 0 |
Determines the order used to lay out items in their grid container. More... | |
JustifySelf | justifySelf = JustifySelf::autoValue |
This is the justify-self property of the item. More... | |
AlignSelf | alignSelf = AlignSelf::autoValue |
This is the align-self property of the item. More... | |
StartAndEndProperty | column = { Keyword::autoValue, Keyword::autoValue } |
These are the start and end properties of the column. More... | |
StartAndEndProperty | row = { Keyword::autoValue, Keyword::autoValue } |
These are the start and end properties of the row. More... | |
String | area |
float | width = notAssigned |
float | minWidth = 0.0f |
float | maxWidth = notAssigned |
float | height = notAssigned |
float | minHeight = 0.0f |
float | maxHeight = notAssigned |
Margin | margin |
The margin to leave around this item. More... | |
Rectangle< float > | currentBounds |
The item's current bounds. More... | |
|
strong |
|
strong |
Possible values for the justifySelf 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. |
autoValue | Follows the Grid container's justifyItems property. |
|
strong |
Possible values for the alignSelf 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. |
autoValue | Follows the Grid container's alignItems property. |
|
noexcept |
Creates an item with default parameters.
|
noexcept |
Creates an item with a given Component to use.
|
noexcept |
Creates an item with a given Component to use.
|
noexcept |
Destructor.
void GridItem::setArea | ( | Property | rowStart, |
Property | columnStart, | ||
Property | rowEnd, | ||
Property | columnEnd | ||
) |
Short-hand.
Short-hand, span of 1 by default.
void GridItem::setArea | ( | const String & | areaName | ) |
Short-hand.
|
noexcept |
Short-hand.
Short-hand, span of 1 by default.
|
noexcept |
Returns a copy of this object with a new row property.
|
noexcept |
Returns a copy of this object with a new column property.
Returns a copy of this object with a new alignSelf property.
|
noexcept |
Returns a copy of this object with a new justifySelf property.
|
noexcept |
Returns a copy of this object with a new width.
|
noexcept |
Returns a copy of this object with a new height.
|
noexcept |
Returns a copy of this object with a new size.
Returns a copy of this object with a new margin.
Returns a copy of this object with a new order.
Component* GridItem::associatedComponent = nullptr |
If this is non-null, it represents a Component whose bounds are controlled by this item.
int GridItem::order = 0 |
Determines the order used to lay out items in their grid container.
JustifySelf GridItem::justifySelf = JustifySelf::autoValue |
This is the justify-self property of the item.
This determines the alignment of the item along the row.
AlignSelf GridItem::alignSelf = AlignSelf::autoValue |
This is the align-self property of the item.
This determines the alignment of the item along the column.
StartAndEndProperty GridItem::column = { Keyword::autoValue, Keyword::autoValue } |
These are the start and end properties of the column.
StartAndEndProperty GridItem::row = { Keyword::autoValue, Keyword::autoValue } |
These are the start and end properties of the row.
String GridItem::area |
float GridItem::width = notAssigned |
float GridItem::minWidth = 0.0f |
float GridItem::maxWidth = notAssigned |
float GridItem::height = notAssigned |
float GridItem::minHeight = 0.0f |
float GridItem::maxHeight = notAssigned |
Margin GridItem::margin |
The margin to leave around this item.
Rectangle<float> GridItem::currentBounds |
The item's current bounds.