natiny_view_get_layout
C
uint32_t natiny_view_get_layout(NatinyView view);
Returns how a view places its children.
Parameters
| Name |
Type |
Description |
view |
NatinyView |
View handle |
Returns
| Type |
Description |
uint32_t |
One of the constants below; NATINY_LAYOUT_FREE for an invalid handle |
Constants
| Constant |
Children are placed |
NATINY_LAYOUT_FREE |
Independently from the content box's top-left corner |
NATINY_LAYOUT_VERTICAL |
Top to bottom |
NATINY_LAYOUT_HORIZONTAL |
Left to right |
NATINY_LAYOUT_CENTER |
In the center of the content box |
NATINY_LAYOUT_GRID |
In cells, left to right and top to bottom |
Example
C
if (natiny_view_get_layout(list) == NATINY_LAYOUT_GRID) {
natiny_view_set_columns(list, 4);
}