class Efl.Ui.Table_Static @beta
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?
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.
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.
Hmm,, I think Table_Static can be replaced with RelativeLayout. for example,
efl_pack_table(table_static, btn1, 0, 0, 50, 50); efl_pack_table(table_static, btn2, 50, 50, 100, 100);
efl_ui_relative_layout_relation_right_set(relative_layout, btn1, relative_layout, 0.5); efl_ui_relative_layout_relation_bottom_set(relative_layout, btn1, relative_layout, 0.5); efl_ui_relative_layout_relation_left_set(relative_layout, btn2, relative_layout, 0.5); efl_ui_relative_layout_relation_top_set(relative_layout, btn2, relative_layout, 0.5);
Both codes produce same result to position buttons.
I'd like to keep @beta or remove this class.