forked from enlightenment/efl
managersub: remove the select_set call
this can be done directly be inheriting border_elements and cutting down the set.
This commit is contained in:
parent
ef3f302a65
commit
b75b5f4c05
|
@ -38,7 +38,12 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd)
|
||||||
Efl_Ui_Focus_Object *node;
|
Efl_Ui_Focus_Object *node;
|
||||||
|
|
||||||
borders = efl_ui_focus_manager_border_elements_get(obj);
|
borders = efl_ui_focus_manager_border_elements_get(obj);
|
||||||
selection = efl_ui_focus_manager_sub_select_set(obj, borders);
|
selection = NULL;
|
||||||
|
EINA_ITERATOR_FOREACH(borders, node)
|
||||||
|
{
|
||||||
|
selection = eina_list_append(selection, node);
|
||||||
|
}
|
||||||
|
eina_iterator_free(borders);
|
||||||
|
|
||||||
//elements which are not in the current border elements
|
//elements which are not in the current border elements
|
||||||
tmp = eina_list_clone(pd->current_border);
|
tmp = eina_list_clone(pd->current_border);
|
||||||
|
|
|
@ -6,16 +6,9 @@ abstract Efl.Ui.Focus.Manager.Sub (Efl.Ui.Focus.Manager, Efl.Ui.Focus.Object, Ef
|
||||||
|
|
||||||
Each submanager also has to be a focus object, the object itself will be registered into the parent manager. It will be used as logical parent while registering the border elements.
|
Each submanager also has to be a focus object, the object itself will be registered into the parent manager. It will be used as logical parent while registering the border elements.
|
||||||
|
|
||||||
The border elements can be filtered by using the select_set function.
|
You can filter the border elements by overriding the border_elements property of the manager.
|
||||||
]]
|
]]
|
||||||
methods {
|
methods {
|
||||||
select_set {
|
|
||||||
[[filters the given iterator for which elements should be registered in the upper manager]]
|
|
||||||
params {
|
|
||||||
objects : iterator<Efl.Ui.Focus.Object>; [[The objects to filter]]
|
|
||||||
}
|
|
||||||
return : list<Efl.Ui.Focus.Object>; [[The rest set from objects to use]]
|
|
||||||
}
|
|
||||||
@property parent {
|
@property parent {
|
||||||
[[The logical parent which is used to register the object itself in the parent manager]]
|
[[The logical parent which is used to register the object itself in the parent manager]]
|
||||||
values {
|
values {
|
||||||
|
@ -24,7 +17,6 @@ abstract Efl.Ui.Focus.Manager.Sub (Efl.Ui.Focus.Manager, Efl.Ui.Focus.Object, Ef
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
implements {
|
implements {
|
||||||
@empty .select_set;
|
|
||||||
@empty Efl.Ui.Focus.Object.geometry_get;
|
@empty Efl.Ui.Focus.Object.geometry_get;
|
||||||
@empty Efl.Ui.Focus.Object.focus.get;
|
@empty Efl.Ui.Focus.Object.focus.get;
|
||||||
@empty Efl.Ui.Focus.User.manager.get;
|
@empty Efl.Ui.Focus.User.manager.get;
|
||||||
|
|
|
@ -5,22 +5,6 @@ typedef struct {
|
||||||
|
|
||||||
} Focus_Test_Sub_Data;
|
} Focus_Test_Sub_Data;
|
||||||
|
|
||||||
EOLIAN static Eina_List*
|
|
||||||
_focus_test_sub_efl_ui_focus_manager_sub_select_set(Eo *obj EINA_UNUSED, Focus_Test_Sub_Data *pd EINA_UNUSED, Eina_Iterator *objects)
|
|
||||||
{
|
|
||||||
Eina_List *list = NULL;
|
|
||||||
Efl_Ui_Focus_Object *o;
|
|
||||||
|
|
||||||
EINA_ITERATOR_FOREACH(objects, o)
|
|
||||||
{
|
|
||||||
list = eina_list_append(list, o);
|
|
||||||
}
|
|
||||||
|
|
||||||
eina_iterator_free(objects);
|
|
||||||
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_focus_test_sub_efl_ui_focus_object_geometry_get(Eo *obj EINA_UNUSED, Focus_Test_Sub_Data *pd EINA_UNUSED, Eina_Rectangle *rect EINA_UNUSED)
|
_focus_test_sub_efl_ui_focus_object_geometry_get(Eo *obj EINA_UNUSED, Focus_Test_Sub_Data *pd EINA_UNUSED, Eina_Rectangle *rect EINA_UNUSED)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
class Focus.Test.Sub(Efl.Ui.Focus.Manager.Sub) {
|
class Focus.Test.Sub(Efl.Ui.Focus.Manager.Sub) {
|
||||||
implements {
|
implements {
|
||||||
Efl.Ui.Focus.Manager.Sub.select_set;
|
|
||||||
Efl.Ui.Focus.Object.geometry_get;
|
Efl.Ui.Focus.Object.geometry_get;
|
||||||
Efl.Ui.Focus.Object.focus.get;
|
Efl.Ui.Focus.Object.focus.get;
|
||||||
Efl.Ui.Focus.User.manager.get;
|
Efl.Ui.Focus.User.manager.get;
|
||||||
|
|
Loading…
Reference in New Issue