|
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 |
Represents a FlexBox container, which contains and manages the layout of a set of FlexItem objects. More...
#include "juce_FlexBox.h"
Public Types | |
| enum class | Direction { row , rowReverse , column , columnReverse } |
| Possible values for the flexDirection property. More... | |
| enum class | Wrap { noWrap , wrap , wrapReverse } |
| Possible values for the flexWrap property. More... | |
| enum class | AlignContent { stretch , flexStart , flexEnd , center , spaceBetween , spaceAround } |
| Possible values for the alignContent property. More... | |
| enum class | AlignItems { stretch , flexStart , flexEnd , center } |
| Possible values for the alignItems property. More... | |
| enum class | JustifyContent { flexStart , flexEnd , center , spaceBetween , spaceAround } |
| Possible values for the justifyContent property. More... | |
Public Member Functions | |
| FlexBox () noexcept=default | |
| Creates an empty FlexBox container with default parameters. | |
| FlexBox (Direction, Wrap, AlignContent, AlignItems, JustifyContent) noexcept | |
| Creates an empty FlexBox container with these parameters. | |
| FlexBox (JustifyContent) noexcept | |
| Creates an empty FlexBox container with the given content-justification mode. | |
| void | performLayout (Rectangle< float > targetArea) |
| Lays-out the box's items within the given rectangle. | |
| void | performLayout (Rectangle< int > targetArea) |
| Lays-out the box's items within the given rectangle. | |
Public Attributes | |
| Direction | flexDirection |
| Specifies how flex items are placed in the flex container, and defines the direction of the main axis. | |
| Wrap | flexWrap |
| Specifies whether items are forced into a single line or can be wrapped onto multiple lines. | |
| AlignContent | alignContent |
| Specifies how a flex container's lines are placed within the flex container when there is extra space on the cross-axis. | |
| AlignItems | alignItems |
| Specifies the alignment of flex items along the cross-axis of each line. | |
| JustifyContent | justifyContent |
| Defines how the container distributes space between and around items along the main-axis. | |
| Array< FlexItem > | items |
| The set of items to lay-out. | |
Represents a FlexBox container, which contains and manages the layout of a set of FlexItem objects.
To use this class, set its parameters appropriately (you can search online for more help on exactly how the FlexBox protocol works!), then add your sub-items to the items array, and call performLayout() in the resized() function of your Component.
@tags{GUI}
Definition at line 42 of file juce_FlexBox.h.
|
strong |
Possible values for the alignContent property.
Definition at line 63 of file juce_FlexBox.h.
|
strong |
Possible values for the alignItems property.
Definition at line 74 of file juce_FlexBox.h.
|
strong |
Possible values for the flexDirection property.
Definition at line 46 of file juce_FlexBox.h.
Possible values for the justifyContent property.
Definition at line 83 of file juce_FlexBox.h.
|
strong |
Possible values for the flexWrap property.
| Enumerator | |
|---|---|
| noWrap | Items are forced into a single line. |
| wrap | Items are wrapped onto multiple lines from top to bottom. |
| wrapReverse | Items are wrapped onto multiple lines from bottom to top. |
Definition at line 55 of file juce_FlexBox.h.
|
noexcept |
Creates an empty FlexBox container with these parameters.
Definition at line 751 of file juce_FlexBox.cpp.
|
noexcept |
Creates an empty FlexBox container with the given content-justification mode.
Definition at line 749 of file juce_FlexBox.cpp.
Lays-out the box's items within the given rectangle.
Definition at line 756 of file juce_FlexBox.cpp.
Lays-out the box's items within the given rectangle.
Definition at line 790 of file juce_FlexBox.cpp.
| AlignContent juce::FlexBox::alignContent |
Specifies how a flex container's lines are placed within the flex container when there is extra space on the cross-axis.
This property has no effect on single line layouts.
Definition at line 124 of file juce_FlexBox.h.
| AlignItems juce::FlexBox::alignItems |
Specifies the alignment of flex items along the cross-axis of each line.
Definition at line 127 of file juce_FlexBox.h.
| Direction juce::FlexBox::flexDirection |
Specifies how flex items are placed in the flex container, and defines the direction of the main axis.
Definition at line 113 of file juce_FlexBox.h.
| Wrap juce::FlexBox::flexWrap |
Specifies whether items are forced into a single line or can be wrapped onto multiple lines.
If wrapping is allowed, this property also controls the direction in which lines are stacked.
Definition at line 118 of file juce_FlexBox.h.
The set of items to lay-out.
Definition at line 137 of file juce_FlexBox.h.
| JustifyContent juce::FlexBox::justifyContent |
Defines how the container distributes space between and around items along the main-axis.
The alignment is done after the lengths and auto margins are applied, so that if there is at least one flexible element, with flex-grow different from 0, it will have no effect as there won't be any available space.
Definition at line 134 of file juce_FlexBox.h.