Tizen Native API
5.5
|
FlexContainer implements a subset of the flexbox spec (defined by W3C): More...
Classes | |
struct | ChildProperty |
Enumeration for the instance of child properties belonging to the FlexContainer class. More... | |
struct | Property |
Enumeration for the instance of properties belonging to the FlexContainer class. More... | |
Public Types | |
enum | FlexDirection |
Enumeration for the direction of the main axis in the flex container. This determines the direction that flex items are laid out in the flex container. More... | |
enum | ContentDirection |
Enumeration for the primary direction in which content is ordered in the flex container and on which sides the “start” and “end” are. More... | |
enum | Justification |
Enumeration for the alignment of the flex items when the items do not use all available space on the main-axis. More... | |
enum | Alignment |
Enumeration for the alignment of the flex items or lines when the items or lines do not use all the available space on the cross-axis. More... | |
enum | WrapType |
Enumeration for the wrap type of the flex container when there is no enough room for all the items on one flex line. More... | |
enum | PropertyRange |
Enumeration for the start and end property ranges for this control. More... | |
Public Member Functions | |
FlexContainer () | |
Creates a FlexContainer handle; this can be initialized with FlexContainer::New() Calling member functions with an uninitialized handle is not allowed. | |
FlexContainer (const FlexContainer &handle) | |
Copy constructor. Creates another handle that points to the same real object. | |
FlexContainer & | operator= (const FlexContainer &handle) |
Assignment operator. Changes this handle to point to another real object. | |
~FlexContainer () | |
Destructor. | |
Static Public Member Functions | |
static FlexContainer | New () |
Creates the FlexContainer control. | |
static FlexContainer | DownCast (BaseHandle handle) |
Downcasts an Object handle to FlexContainer. |
FlexContainer implements a subset of the flexbox spec (defined by W3C):
https://www.w3.org/TR/css3-flexbox/
It aims at providing a more efficient way to lay out, align and distribute space among items in the container, even when their size is unknown or dynamic.
FlexContainer has the ability to alter the width and height of its children (i.e. flex items) to fill the available space in the best possible way on different screen sizes. FlexContainer can expand items to fill available free space, or shrink them to prevent overflow.
Below is an illustration of the various directions and terms as applied to a flex container with the "flex direction" defined as "row".
flex container --------------------------------------------------------------- cross start | ------------------ --------|--------------------------- | | | | | | | | | | | | | | | | | flex item 1 | | | flex item 2 | | main axis |-|----------------|-|-------|--------------------------|-|------------> | | | | | | | | | | | | | | | | | | | | | | ------------------ --------|--------------------------- | -----------------------------|--------------------------------- cross end | | | | main start | cross axis | main end | | | v
The following custom properties of the actor are checked to decide how to lay out the actor inside the flex container.
These properties are registered dynamically to the child and are non-animatable.
| Property Name | Type | |-------------------------|-------------| | flex | float | | alignSelf | integer | | flexMargin | Vector4 |
The available values for alignSelf are: ALIGN_AUTO, ALIGN_FLEX_START, ALIGN_CENTER, ALIGN_FLEX_END, ALIGN_STRETCH
"name":"icon", "type":"ImageView", "image":"image.png", "properties": { "flex":1, // Property to make the item to receive the specified proportion of the free space in the container. "alignSelf":"flexStart", // Property to specify how the item will align along the cross axis. "flexMargin":[10, 10, 10, 10] // Property to specify the space around the item. }
Enumeration for the alignment of the flex items or lines when the items or lines do not use all the available space on the cross-axis.
Enumeration for the primary direction in which content is ordered in the flex container and on which sides the “start” and “end” are.
Enumeration for the direction of the main axis in the flex container. This determines the direction that flex items are laid out in the flex container.
Enumeration for the alignment of the flex items when the items do not use all available space on the main-axis.
Enumeration for the start and end property ranges for this control.
Reimplemented from Dali::Toolkit::Control.
Enumeration for the wrap type of the flex container when there is no enough room for all the items on one flex line.
Creates a FlexContainer handle; this can be initialized with FlexContainer::New() Calling member functions with an uninitialized handle is not allowed.
Dali::Toolkit::FlexContainer::FlexContainer | ( | const FlexContainer & | handle | ) |
Copy constructor. Creates another handle that points to the same real object.
[in] | handle | The handle to copy from |
Destructor.
This is non-virtual since derived Handle types must not contain data or virtual methods.
static FlexContainer Dali::Toolkit::FlexContainer::DownCast | ( | BaseHandle | handle | ) | [static] |
Downcasts an Object handle to FlexContainer.
If handle points to a FlexContainer, the downcast produces valid handle. If not, the returned handle is left uninitialized.
[in] | handle | Handle to an object |
Reimplemented from Dali::Toolkit::Control.
static FlexContainer Dali::Toolkit::FlexContainer::New | ( | ) | [static] |
Creates the FlexContainer control.
Reimplemented from Dali::Toolkit::Control.
FlexContainer& Dali::Toolkit::FlexContainer::operator= | ( | const FlexContainer & | handle | ) |
Assignment operator. Changes this handle to point to another real object.
[in] | handle | Handle to an object |