end_id : int; [[The last item that has a new size]]
}
}
+ entities_ready {
+ [[The items from $start_id to $end_id now have their entities ready
+
+ The position manager will reapply the geometry to the elements if they are visible.
+ ]]
+ params {
+ start_id : uint; [[The first item that is available]]
+ end_id : uint; [[The last item that is available]]
+ }
+ }
relative_item {
[[Translates the $current_id, into a new id which is oriented in the $direction of $current_id.
In case that there is no item, -1 is returned]]
Eina_Vector2 scroll_position;
Efl_Ui_Layout_Orientation dir;
Vis_Segment prev_run;
+ unsigned int prev_consumed_space;
Eina_Size2D max_min_size;
Eina_Size2D last_viewport_size;
Eina_Size2D prev_min_size;
{
ev.start_id = pd->prev_run.start_id = cur.start_id;
ev.end_id = pd->prev_run.end_id = cur.end_id;
+ pd->prev_consumed_space = consumed_space;
efl_event_callback_call(obj, EFL_UI_POSITION_MANAGER_ENTITY_EVENT_VISIBLE_RANGE_CHANGED, &ev);
}
}
return obj;
}
+EOLIAN static void
+_efl_ui_position_manager_grid_efl_ui_position_manager_entity_entities_ready(Eo *obj, Efl_Ui_Position_Manager_Grid_Data *pd, unsigned int start_id, unsigned int end_id)
+{
+ Eina_Size2D space_size;
+ int relevant_space_size;
+ Item_Position_Context ctx;
+
+ if (end_id < pd->prev_run.start_id || start_id > pd->prev_run.end_id)
+ return;
+
+ space_size.w = (MAX(pd->last_viewport_size.w - pd->viewport.w, 0))*pd->scroll_position.x;
+ space_size.h = (MAX(pd->last_viewport_size.h - pd->viewport.h, 0))*pd->scroll_position.y;
+
+ if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
+ {
+ relevant_space_size = space_size.h;
+ }
+ else
+ {
+ relevant_space_size = space_size.w;
+ }
+
+ ctx.new = pd->prev_run;
+ ctx.consumed_space = pd->prev_consumed_space;
+ ctx.relevant_space_size = relevant_space_size;
+ ctx.floating_group = NULL;
+ ctx.placed_item = NULL;
+
+ if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
+ {
+ _position_items_vertical(obj, pd, &ctx);
+ _position_group_items(obj, pd, &ctx);
+ }
+ else
+ {
+ _position_items_horizontal(obj, pd, &ctx);
+ _position_group_items(obj, pd, &ctx);
+ }
+}
+
+
#include "efl_ui_position_manager_grid.eo.c"
}
+EOLIAN static void
+_efl_ui_position_manager_list_efl_ui_position_manager_entity_entities_ready(Eo *obj, Efl_Ui_Position_Manager_List_Data *pd, unsigned int start_id, unsigned int end_id)
+{
+ Eina_Size2D space_size;
+ int relevant_space_size;
+
+ if (end_id < pd->prev_run.start_id || start_id > pd->prev_run.end_id)
+ return;
+
+ if (!pd->size) return;
+ if (pd->average_item_size <= 0) return;
+
+ cache_require(obj, pd);
+
+ //space size contains the amount of space that is outside the viewport (either to the top or to the left)
+ space_size.w = (MAX(pd->abs_size.w - pd->viewport.w, 0))*pd->scroll_position.x;
+ space_size.h = (MAX(pd->abs_size.h - pd->viewport.h, 0))*pd->scroll_position.y;
+
+ if (pd->dir == EFL_UI_LAYOUT_ORIENTATION_VERTICAL)
+ {
+ relevant_space_size = space_size.h;
+ }
+ else
+ {
+ relevant_space_size = space_size.w;
+ }
+ _position_items(obj, pd, pd->prev_run, relevant_space_size);
+}
+
+
#include "efl_ui_position_manager_list.eo.c"