Page MenuHomePhabricator

RFC: Selection in CV
Closed, ResolvedPublic

Description

Efl.Ui.Mutli_Selection needs to be implemented on Efl.Ui.Collection_View.
Information about the selection state however needs to go into the selection model.

Idea:

  • The selection state of the items that are on the screen is tracked via the event, change to the selected property are applied to the selection state.
  • API calls of the mutli_selection are called on the selection model.
  • If one of the models on the screen changes its selection change, this needs also to be applied to the item on the screen.
  • The API of the iterator is moved to another interface called Efl.Ui.Multi_Selection_Sync, the selection model can provide its own async way of providing this information.
  • Selection model can just keep the last slected model arround to be accessed synchronisly, which makes the usage of the Single_Selectable interface quite easy.

Related Objects

StatusAssignedTask
OpenNone
Resolvedbu5hm4n
bu5hm4n created this task.Sep 4 2019, 7:55 AM
bu5hm4n triaged this task as High priority.
bu5hm4n updated the task description. (Show Details)

@zmike @SanghyeonLee @cedric @bu5hm4n How does that sound ?

cedric added a comment.Sep 4 2019, 6:38 PM

As long as you only expect index as information on your iterator, that would work to some extent (basically the user can not override the selection model and expect it to work without complying to this interface, which I think is a ok constraint).

The iterator is async in this RFC, so the object can be whatever it needs to be.

I am not sure what you mean with the rest of your message tbh.

cedric added a comment.Sep 5 2019, 3:40 PM

I am not sure how an iterator can be async, but I may be misunderstanding what you have in mind. As for index, I was thinking iterator<int> for the interface where the int is the index of a selected element.

Ah! With async iterator i mean just some random thing that is working like a iterator but async, like efl io model or smth. like that.
Well we can look what we are doing in the end, the index is just not what the multi_selectable is specifying, which is kind of a problem ... :/

bu5hm4n closed this task as Resolved.Sep 19 2019, 7:50 AM
bu5hm4n claimed this task.

Cedric implemented something, no point in having this further.