add box function for returning the child at a point inside the box
SVN revision: 77850
This commit is contained in:
parent
a4bc0fb8f7
commit
2b9b6eeb79
|
@ -412,6 +412,22 @@ e_box_align_pixel_offset_get(Evas_Object *obj, int *x, int *y)
|
||||||
if (y) *y = (sd->min.h - sd->h) * (1.0 - sd->align.y);
|
if (y) *y = (sd->min.h - sd->h) * (1.0 - sd->align.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI Evas_Object *
|
||||||
|
e_box_item_at_xy_get(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
|
||||||
|
{
|
||||||
|
E_Smart_Data *sd;
|
||||||
|
E_Box_Item *bi;
|
||||||
|
|
||||||
|
if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR() NULL;
|
||||||
|
sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return NULL;
|
||||||
|
EINA_INLIST_FOREACH(EINA_INLIST_GET(sd->items), bi)
|
||||||
|
{
|
||||||
|
if (E_INSIDE(x, y, bi->x, bi->y, bi->w, bi->h)) return bi->obj;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
static void
|
static void
|
||||||
_e_box_unpack_internal(E_Smart_Data *sd, E_Box_Item *bi)
|
_e_box_unpack_internal(E_Smart_Data *sd, E_Box_Item *bi)
|
||||||
|
|
|
@ -24,6 +24,6 @@ EAPI void e_box_size_max_get (Evas_Object *obj, Evas_Coord *maxw, E
|
||||||
EAPI void e_box_align_get (Evas_Object *obj, double *ax, double *ay);
|
EAPI void e_box_align_get (Evas_Object *obj, double *ax, double *ay);
|
||||||
EAPI void e_box_align_set (Evas_Object *obj, double ax, double ay);
|
EAPI void e_box_align_set (Evas_Object *obj, double ax, double ay);
|
||||||
EAPI void e_box_align_pixel_offset_get (Evas_Object *obj, int *x, int *y);
|
EAPI void e_box_align_pixel_offset_get (Evas_Object *obj, int *x, int *y);
|
||||||
|
EAPI Evas_Object *e_box_item_at_xy_get(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue