JUCE
|
Describes the properties of an item inside a FlexBox container. More...
Classes | |
struct | Margin |
Represents a margin. More... | |
Public Types | |
enum | AlignSelf { AlignSelf::autoAlign, AlignSelf::flexStart, AlignSelf::flexEnd, AlignSelf::center, AlignSelf::stretch } |
Possible value for the alignSelf property. More... | |
Public Member Functions | |
FlexItem () noexcept | |
Creates an item with default parameters, and zero size. More... | |
FlexItem (float width, float height) noexcept | |
Creates an item with the given size. More... | |
FlexItem (float width, float height, Component &targetComponent) noexcept | |
Creates an item with the given size and target Component. More... | |
FlexItem (float width, float height, FlexBox &flexBoxToControl) noexcept | |
Creates an item that represents an embedded FlexBox with a given size. More... | |
FlexItem (Component &componentToControl) noexcept | |
Creates an item with a given target Component. More... | |
FlexItem (FlexBox &flexBoxToControl) noexcept | |
Creates an item that represents an embedded FlexBox. More... | |
FlexItem | withFlex (float newFlexGrow) const noexcept |
Returns a copy of this object with a new flex-grow value. More... | |
FlexItem | withFlex (float newFlexGrow, float newFlexShrink) const noexcept |
Returns a copy of this object with new flex-grow and flex-shrink values. More... | |
FlexItem | withFlex (float newFlexGrow, float newFlexShrink, float newFlexBasis) const noexcept |
Returns a copy of this object with new flex-grow, flex-shrink and flex-basis values. More... | |
FlexItem | withWidth (float newWidth) const noexcept |
Returns a copy of this object with a new width. More... | |
FlexItem | withMinWidth (float newMinWidth) const noexcept |
Returns a copy of this object with a new minimum width. More... | |
FlexItem | withMaxWidth (float newMaxWidth) const noexcept |
Returns a copy of this object with a new maximum width. More... | |
FlexItem | withHeight (float newHeight) const noexcept |
Returns a copy of this object with a new height. More... | |
FlexItem | withMinHeight (float newMinHeight) const noexcept |
Returns a copy of this object with a new minimum height. More... | |
FlexItem | withMaxHeight (float newMaxHeight) const noexcept |
Returns a copy of this object with a new maximum height. More... | |
FlexItem | withMargin (Margin) const noexcept |
Returns a copy of this object with a new margin. More... | |
FlexItem | withOrder (int newOrder) const noexcept |
Returns a copy of this object with a new order. More... | |
FlexItem | withAlignSelf (AlignSelf newAlignSelf) const noexcept |
Returns a copy of this object with a new alignSelf value. More... | |
Public Attributes | |
Rectangle< float > | currentBounds |
The item's current bounds. More... | |
Component * | associatedComponent = nullptr |
If this is non-null, it represents a Component whose bounds are controlled by this item. More... | |
FlexBox * | associatedFlexBox = nullptr |
If this is non-null, it represents a FlexBox whose bounds are controlled by this item. More... | |
int | order = 0 |
Determines the order used to lay out items in their flex container. More... | |
float | flexGrow = 0.0f |
Specifies the flex grow factor of this item. More... | |
float | flexShrink = 1.0f |
Specifies the flex shrink factor of the item. More... | |
float | flexBasis = 0.0f |
Specifies the flex-basis of the item. More... | |
AlignSelf | alignSelf = AlignSelf::stretch |
This is the align-self property of the item. More... | |
float | width = (float) notAssigned |
The item's width. More... | |
float | minWidth = 0.0f |
The item's minimum width. More... | |
float | maxWidth = (float) notAssigned |
The item's maximum width. More... | |
float | height = (float) notAssigned |
The item's height. More... | |
float | minHeight = 0.0f |
The item's minimum height. More... | |
float | maxHeight = (float) notAssigned |
The item's maximum height. More... | |
Margin | margin |
The margin to leave around this item. More... | |
Static Public Attributes | |
static const int | autoValue = -2 |
This constant can be used for sizes to indicate that 'auto' mode should be used. More... | |
static const int | notAssigned = -1 |
This constant can be used for sizes to indicate that no value has been set. More... | |
|
strong |
Possible value for the alignSelf property.
Enumerator | |
---|---|
autoAlign | Follows the FlexBox container's alignItems property. |
flexStart | Item is aligned towards the start of the cross axis. |
flexEnd | Item is aligned towards the end of the cross axis. |
center | Item is aligned towards the center of the cross axis. |
stretch | Item is stretched from start to end of the cross axis. |
|
noexcept |
Creates an item with default parameters, and zero size.
|
noexcept |
Creates an item with the given size.
|
noexcept |
Creates an item with the given size and target Component.
|
noexcept |
Creates an item that represents an embedded FlexBox with a given size.
|
noexcept |
Creates an item with a given target Component.
|
noexcept |
|
noexcept |
Returns a copy of this object with a new flex-grow value.
|
noexcept |
Returns a copy of this object with new flex-grow and flex-shrink values.
|
noexcept |
Returns a copy of this object with new flex-grow, flex-shrink and flex-basis values.
|
noexcept |
Returns a copy of this object with a new width.
|
noexcept |
Returns a copy of this object with a new minimum width.
|
noexcept |
Returns a copy of this object with a new maximum width.
|
noexcept |
Returns a copy of this object with a new height.
|
noexcept |
Returns a copy of this object with a new minimum height.
|
noexcept |
Returns a copy of this object with a new maximum height.
Returns a copy of this object with a new margin.
Returns a copy of this object with a new order.
Returns a copy of this object with a new alignSelf value.
Rectangle<float> FlexItem::currentBounds |
The item's current bounds.
Component* FlexItem::associatedComponent = nullptr |
If this is non-null, it represents a Component whose bounds are controlled by this item.
FlexBox* FlexItem::associatedFlexBox = nullptr |
If this is non-null, it represents a FlexBox whose bounds are controlled by this item.
int FlexItem::order = 0 |
Determines the order used to lay out items in their flex container.
Elements are laid out in ascending order of thus order value. Elements with the same order value are laid out in the order in which they appear in the array.
float FlexItem::flexGrow = 0.0f |
Specifies the flex grow factor of this item.
This indicates the amount of space inside the flex container the item should take up.
float FlexItem::flexShrink = 1.0f |
Specifies the flex shrink factor of the item.
This indicates the rate at which the item shrinks if there is insufficient space in the container.
float FlexItem::flexBasis = 0.0f |
Specifies the flex-basis of the item.
This is the initial main size of a flex item in the direction of flow. It determines the size of the content-box unless specified otherwise using box-sizing.
AlignSelf FlexItem::alignSelf = AlignSelf::stretch |
This is the align-self property of the item.
This determines the alignment of the item along the cross-axis (perpendicular to the direction of flow).
|
static |
This constant can be used for sizes to indicate that 'auto' mode should be used.
|
static |
This constant can be used for sizes to indicate that no value has been set.
float FlexItem::width = (float) notAssigned |
The item's width.
float FlexItem::minWidth = 0.0f |
The item's minimum width.
float FlexItem::maxWidth = (float) notAssigned |
The item's maximum width.
float FlexItem::height = (float) notAssigned |
The item's height.
float FlexItem::minHeight = 0.0f |
The item's minimum height.
float FlexItem::maxHeight = (float) notAssigned |
The item's maximum height.
Margin FlexItem::margin |
The margin to leave around this item.