Page MenuHomePhabricator

efl.ui.table_static
Open, TODOPublic

Description

class Efl.Ui.Table_Static @beta

Related Objects

StatusAssignedTask
ResolvedNone
OpenNone
YOhoho created this task.Thu, Sep 5, 4:54 AM
YOhoho triaged this task as TODO priority.
YOhoho added a comment.Thu, Sep 5, 4:58 AM

There is no declared members. it can be stable.

What's the purpose of this class? It has no documentation :/

YOhoho added a comment.Thu, Sep 5, 7:36 PM

layout_update logic is same to elm_grid(legacy)

I am not familiar with elm_grid. Can you tell me what is the difference between Efl.Ui.Table and Efl.Ui.Table_Static?

YOhoho added a comment.Mon, Sep 9, 4:10 AM

Efl.Ui.Table_Static use column and row as percentage. the default are (100, 100). for example,

Ooohhhhh.... I think I get it. In Efl.Ui.Table_Static the number of rows and columns is fixed to 100.
In this way you can position items using percentages and you do not have to worry about the real number of rows and columns.
Is this correct?

YOhoho added a comment.Mon, Sep 9, 9:19 PM

The number of rows and columns can be changed by efl_pack_table_size_set.

efl_pack_table_size_set(table, 30, 30);
efl_pack_table(table, item, 0, 0, 15, 15);

In this case, item width will be (table width) * (15 / 30).

The more I look at this class the less I understand it.
It only needs to set its size to 100x100 cells in the constructor (which it already does) and then coords and sizes can be interpreted as percentages. This is fine.

But if you change the table size, what is the difference with the normal Efl.Ui.Table?

Put it in a different way, if I create a Efl.Ui.Table and set its size to 100x100 cells, what is the difference with Efl.Ui.Table_Static?

Also, I do not understand the check in ./src/lib/elementary/efl_ui_table_static.c:46 since that is enforced in the constructor.

YOhoho added a comment.EditedWed, Sep 11, 2:31 AM

Efl.Ui.Table_Static has cells of same size divided by table size. the cells always take space even if it is empty. and its children hint property is ignored. They always fill the occupied cell space.

Efl.Ui.Table calculate cell size based on hint property of children occupying that cell. It doesn't take any space of empty cell. you can check that elementary_test -to 'efl.ui.table (linear api)' and click item 2.

zmike added a comment.Wed, Sep 11, 8:14 AM

I'm confused as to why this would ever be needed. Do you have a sample case? I think this would help us with determining documentation...

zmike moved this task from Backlog to Evaluating on the efl: api board.Mon, Sep 16, 7:17 AM