efl.pack_table: inherit efl.pack instead of efl.pack_linear
Summary:
>>! In T5301#110572, @jpeg wrote:
> Quick recap before I leave.
> ...
> ...
> - Pack interfaces - T5328
>
> Table does not need to inherit from "linear" (1d) layout: this brings unnecessary complexity, for a dubious use case.
We don't have linear layout policy of table(2d) layout. furthermore, i don't
think it will be clearly defined. it is enough for Efl.Pack_Table to support
`efl_pack` which work the same as `efl_pack_end`.
ref T5719, T5328
Test Plan:
- make
- elementary_test -to 'efl.ui.table'
- elementary_test -to 'efl.ui.table(linear api)'
Reviewers: zmike, woohyun, segfaultxavi
Reviewed By: segfaultxavi
Subscribers: cedric, #reviewers, jpeg, #committers
Tags: #efl
Maniphest Tasks: T5719, T5328
Differential Revision: https://phab.enlightenment.org/D8420
2019-03-20 04:45:00 -07:00
|
|
|
interface @beta Efl.Pack_Table extends Efl.Pack
|
2016-04-11 22:08:35 -07:00
|
|
|
{
|
Efl.Pack_Table: remove table_direction
Summary:
The only implementation of this interface, `Efl.Ui.Table`, only supports two fill
directions (horizontal or vertical), therefore the table_direction property which
supports primary and secondary directions is unnecessarily complicated. Remove it
and use only `Efl.Ui.Direction.direction` to select the fill direction.
Also, expanded the documentation.
Fixes T7962
Test Plan:
Everything builds and tests pass. Efl.Ui.Table elementary_test still work.
Examples need to be adjusted to stop using table_direction.
Reviewers: zmike, YOhoho, bu5hm4n, SanghyeonLee, Jaehyun_Cho
Reviewed By: YOhoho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7962
Differential Revision: https://phab.enlightenment.org/D8902
2019-05-16 04:03:33 -07:00
|
|
|
[[Interface for 2D containers which arrange their elements on a table with rows and columns.
|
|
|
|
|
|
|
|
Elements can be positioned on a specific row and column, or they can be simply added to
|
|
|
|
the table using @Efl.Pack.pack and the container will chose where to put them.
|
|
|
|
]]
|
2019-05-09 07:16:42 -07:00
|
|
|
c_prefix: efl_pack;
|
2016-04-11 22:08:35 -07:00
|
|
|
methods {
|
2017-12-18 21:13:58 -08:00
|
|
|
pack_table {
|
|
|
|
[[Pack object at a given location in the table.
|
2017-09-28 01:11:15 -07:00
|
|
|
|
2017-12-22 02:41:11 -08:00
|
|
|
When this container is deleted, it will request deletion of the
|
2017-09-28 01:11:15 -07:00
|
|
|
given $subobj. Use @Efl.Pack.unpack to remove $subobj from this
|
|
|
|
container without deleting it.
|
|
|
|
]]
|
2016-04-11 22:08:35 -07:00
|
|
|
params {
|
2018-04-05 01:47:26 -07:00
|
|
|
subobj: Efl.Gfx.Entity; [[A child object to pack in this table.]]
|
2016-11-01 06:14:19 -07:00
|
|
|
col: int; [[Column number]]
|
|
|
|
row: int; [[Row number]]
|
2017-12-18 21:13:58 -08:00
|
|
|
colspan: int @optional; [[0 means 1, -1 means @.table_columns]]
|
|
|
|
rowspan: int @optional; [[0 means 1, -1 means @.table_rows]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
2016-11-01 06:14:19 -07:00
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
2017-12-18 21:13:58 -08:00
|
|
|
table_contents_get {
|
|
|
|
[[Returns all objects at a given position in this table.]]
|
2018-04-05 01:47:26 -07:00
|
|
|
return: iterator<Efl.Gfx.Entity> @owned; [[Iterator to table contents]]
|
2016-04-11 22:08:35 -07:00
|
|
|
params {
|
2016-11-01 06:14:19 -07:00
|
|
|
@in col: int; [[Column number]]
|
|
|
|
@in row: int; [[Row number]]
|
2016-04-19 01:43:28 -07:00
|
|
|
@in below: bool @optional; [[If $true get objects spanning over this cell.]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
|
|
|
}
|
2017-12-18 21:13:58 -08:00
|
|
|
table_content_get {
|
|
|
|
[[Returns a child at a given position, see @.table_contents_get.]]
|
2018-04-05 01:47:26 -07:00
|
|
|
return: Efl.Gfx.Entity; [[Child object]]
|
2016-04-13 22:12:16 -07:00
|
|
|
params {
|
2016-11-01 06:14:19 -07:00
|
|
|
@in col: int; [[Column number]]
|
|
|
|
@in row: int; [[Row number]]
|
2016-04-13 22:12:16 -07:00
|
|
|
}
|
|
|
|
}
|
2019-08-27 03:46:03 -07:00
|
|
|
@property table_cell_column {
|
|
|
|
[[column of the $subobj in this container.]]
|
|
|
|
set {}
|
2016-11-01 06:14:19 -07:00
|
|
|
get { return: bool; [[Returns false if item is not a child]] }
|
2016-04-11 22:08:35 -07:00
|
|
|
keys {
|
2018-04-05 01:47:26 -07:00
|
|
|
subobj: Efl.Gfx.Entity; [[Child object]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
|
|
|
values {
|
2016-11-01 06:14:19 -07:00
|
|
|
col: int; [[Column number]]
|
2016-11-17 03:16:01 -08:00
|
|
|
colspan: int; [[Column span]]
|
2019-08-27 03:46:03 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property table_cell_row {
|
|
|
|
[[row of the $subobj in this container.]]
|
|
|
|
set {}
|
|
|
|
get { return: bool; [[Returns false if item is not a child]] }
|
|
|
|
keys {
|
|
|
|
subobj: Efl.Gfx.Entity; [[Child object]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
row: int; [[Row number]]
|
2016-11-17 03:16:01 -08:00
|
|
|
rowspan: int; [[Row span]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
|
|
|
}
|
2017-12-18 21:13:58 -08:00
|
|
|
@property table_size {
|
|
|
|
[[Combines @.table_columns and @.table_rows]]
|
2016-04-11 22:08:35 -07:00
|
|
|
set {}
|
|
|
|
get {}
|
|
|
|
values {
|
2016-11-01 06:14:19 -07:00
|
|
|
cols: int; [[Number of columns]]
|
|
|
|
rows: int; [[Number of rows]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
|
|
|
}
|
2017-12-18 21:13:58 -08:00
|
|
|
@property table_columns {
|
Efl.Pack_Table: remove table_direction
Summary:
The only implementation of this interface, `Efl.Ui.Table`, only supports two fill
directions (horizontal or vertical), therefore the table_direction property which
supports primary and secondary directions is unnecessarily complicated. Remove it
and use only `Efl.Ui.Direction.direction` to select the fill direction.
Also, expanded the documentation.
Fixes T7962
Test Plan:
Everything builds and tests pass. Efl.Ui.Table elementary_test still work.
Examples need to be adjusted to stop using table_direction.
Reviewers: zmike, YOhoho, bu5hm4n, SanghyeonLee, Jaehyun_Cho
Reviewed By: YOhoho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7962
Differential Revision: https://phab.enlightenment.org/D8902
2019-05-16 04:03:33 -07:00
|
|
|
[[Specifies the amount of columns the table will have when the fill direction is horizontal.
|
|
|
|
If it is vertical, the amount of columns depends on the amount of cells added and @.table_rows.
|
|
|
|
]]
|
|
|
|
set {}
|
2016-04-11 22:08:35 -07:00
|
|
|
get {}
|
|
|
|
values {
|
Efl.Pack_Table: remove table_direction
Summary:
The only implementation of this interface, `Efl.Ui.Table`, only supports two fill
directions (horizontal or vertical), therefore the table_direction property which
supports primary and secondary directions is unnecessarily complicated. Remove it
and use only `Efl.Ui.Direction.direction` to select the fill direction.
Also, expanded the documentation.
Fixes T7962
Test Plan:
Everything builds and tests pass. Efl.Ui.Table elementary_test still work.
Examples need to be adjusted to stop using table_direction.
Reviewers: zmike, YOhoho, bu5hm4n, SanghyeonLee, Jaehyun_Cho
Reviewed By: YOhoho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7962
Differential Revision: https://phab.enlightenment.org/D8902
2019-05-16 04:03:33 -07:00
|
|
|
cols: int; [[Amount of columns.]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
|
|
|
}
|
2017-12-18 21:13:58 -08:00
|
|
|
@property table_rows {
|
Efl.Pack_Table: remove table_direction
Summary:
The only implementation of this interface, `Efl.Ui.Table`, only supports two fill
directions (horizontal or vertical), therefore the table_direction property which
supports primary and secondary directions is unnecessarily complicated. Remove it
and use only `Efl.Ui.Direction.direction` to select the fill direction.
Also, expanded the documentation.
Fixes T7962
Test Plan:
Everything builds and tests pass. Efl.Ui.Table elementary_test still work.
Examples need to be adjusted to stop using table_direction.
Reviewers: zmike, YOhoho, bu5hm4n, SanghyeonLee, Jaehyun_Cho
Reviewed By: YOhoho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7962
Differential Revision: https://phab.enlightenment.org/D8902
2019-05-16 04:03:33 -07:00
|
|
|
[[Specifies the amount of rows the table will have when the fill direction is vertical.
|
|
|
|
If it is horizontal, the amount of rows depends on the amount of cells added and @.table_columns.
|
2016-04-11 22:08:35 -07:00
|
|
|
]]
|
|
|
|
set {}
|
|
|
|
get {}
|
|
|
|
values {
|
Efl.Pack_Table: remove table_direction
Summary:
The only implementation of this interface, `Efl.Ui.Table`, only supports two fill
directions (horizontal or vertical), therefore the table_direction property which
supports primary and secondary directions is unnecessarily complicated. Remove it
and use only `Efl.Ui.Direction.direction` to select the fill direction.
Also, expanded the documentation.
Fixes T7962
Test Plan:
Everything builds and tests pass. Efl.Ui.Table elementary_test still work.
Examples need to be adjusted to stop using table_direction.
Reviewers: zmike, YOhoho, bu5hm4n, SanghyeonLee, Jaehyun_Cho
Reviewed By: YOhoho
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Maniphest Tasks: T7962
Differential Revision: https://phab.enlightenment.org/D8902
2019-05-16 04:03:33 -07:00
|
|
|
rows: int; [[Amount of rows.]]
|
2016-04-11 22:08:35 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|