|interface Efl.Container |├ (M) content_remove |├ (M) content_iterate |├ (M) content_count |├ (E) content,added |├ (E) content,removed
It's a bit weird that it has a method to remove an element but not to add one.
I understand the method to add elements is provided by the different implementations of this interface (like Efl.Pack for example), so maybe element removal could do the same?
In the case of Efl.Ui.Box, for instance, element removal can be accomplished either with Efl.Pack.unpack or with Efl.Container.content_remove which share the same implementation so there would be no harm in removing content_remove.
There are also the part containers like efl.ui.layout, where you can set the content to a part. Removing it from the part would be setting the content of a part to NULL which seems to be a bit annoying, since you still have to remember the exact part.
However, content_remove can just be used as a general purpose "Hey container, please release this object" shortcut, which sounds sensible and fine to me :)
okay, but how do you want to realize content_add in a general manner ? In a layout you have x,y,w,h in a box you have n, in a layout you have a string. You cannot add in a general manner. However, a *add* adds a relation from the widget to the new content, you can use this relation to terminate the relation, you don't need a special termination for that ... :)
Ok, I have been talking in general terms because I am not familiar with the details, but now I'll need them.
Can you give me examples of add and remove methods? I am interested in knowing where in the container things are added, and where are they removed from when using the generic content_remove.
Currentrly, Efl.Pack extends Efl.Container.
And Efl.Pack includes "unpack" which seems almost similar with "content_remove".
All the classes implements Efl.Pack needs to write the code for the both of "unpack" and "content_remove".
In my opinion, this looks not that good idea.
(As you can see in edje_part_box.c, "content_remove" is just calling "unpack" directly)
So, I think that "content_remove" can be removed -
and it can be a method only for "Efl.Canvas.Layout" and "Efl.Ui.Layout" which don't implement "Efl.Pack".