[NUI] GridLayout Refactoring to support column, row, spacing, weight, align (#1655)
authorYeongJong Lee <cleanlyj@naver.com>
Mon, 15 Jun 2020 03:04:15 +0000 (12:04 +0900)
committerGitHub <noreply@github.com>
Mon, 15 Jun 2020 03:04:15 +0000 (12:04 +0900)
commitc04eaacb3186b0ea9e499d7a930b10e074134d32
treed4f6bd609b214017515d9fea6d3eecedeebe5ec9
parentaf1a5a185f0804c5de88d47ec9436984c66942db
[NUI] GridLayout Refactoring to support column, row, spacing, weight, align (#1655)

* [NUI] LayoutGroup: Support child property

* [NUI] GridLayout Refactoring to support column, row, spacing, alignment

1) Add ColumnSpacing, RowSpacing(GridLayout Property)
This is GridLayout properties for the distance between columns, rows.

2) Add Column, ColumnSpan, Row, RowSpan(Child Property)
This is child properties for specific cell index to layout. `SetChildValue` is
added to support child property using Attached Bindable Property.

If the Column(Row) isn't defined, it is automatically assigned left to right or
top to bottom depending on `GridOrientation`(RTL is not supported yet).
The main axis count(Columns on Horizontal mode, Rows otherwise) won't be
exceeded explicit column(row) count which is assigned by
Property(`Columns`(`Rows`)). otherwise, cross axis count(row(column))
can be increased.
Children with automatically assigned Column(Row) don't overlap. but,
children with specific Column and Row can overlap with the other children.

To respect child width(height), each cell size is determined by the maximum
size among Columns(Rows) it belongs to. Greedy Algorithm is used to find
maximum size of each Columns(Rows) that is same problem to find longest path
in DAG(Directed Acyclic Graph).

3) Add HorizontalAlignment, VerticalAlignment(Child Property)
The child properties how child is laid out in the cell.(Start, End, Center)
src/Tizen.NUI/src/internal/Layouting/GridLocations.cs
src/Tizen.NUI/src/public/Layouting/GridLayout.cs
src/Tizen.NUI/src/public/Layouting/LayoutGroup.cs