Page MenuHomePhabricator

[MVVM] create Efl.Ui.Item_View and infrastructures for common item based view widgets.
Closed, ResolvedPublic


For the item based view, we need abstract base view class.
all widget such as listview, gridview, treeview will inherit from this abstract class and use infrastructures and data types.
here is basic proposal.

Efl.Ui.Item_View for base parent view.
Efl.Ui.Item_View_Layouter (previously Efl.Ui.List_View_Relayout) for base layouter interface.
Efl.Ui.Item_View_Model_Manager (previously Efl.Ui.List_View_Model) for base model handler.
Efl_Ui_Item_View_Seg_Array for private SegArray structures for general usage of listview and gridview.

If we really can go with every-widget-as-view,
Item_View_Model_Manager can be just View_Model_Manager which provide helper method for handling model data,
but I'm not sure about this.

I do not think we really need Efl.Ui.Item_View_Layouter, Efl.Ui.Item_View_Model_Manager and Efl_Ui_Item_View_Seg_Array at all. They really seems to be internal design class that are no so useful once you rely on Model for storing everything.

SanghyeonLee added a comment.EditedJan 29 2019, 4:12 AM

we can hiding them in private class, but for making list and grid, tree view with generic interfaces,
making it as common class or interface will be much easier for implement them.
also about layouter,
I think currently it need to be private cause we do not decide which structure we will exposed for model handing on the view,
but the final goal in my thought, it would be better to publish them and user can customize this layouter as what they really want.

I believe that the layout function is something that would likely make more sense as a function callback than as an object. So I am really not convinced that we want this as an object. Anyway, at this point, we do not have time to fix the View internal and the only things we can do is hide this things.

cedric closed this task as Resolved.Oct 10 2019, 4:16 PM