Get a table element with its coordinates.

By: Hugo Camboulive <hugo.camboulive@gmail.com>


SVN revision: 48088
This commit is contained in:
Gustavo Sverzut Barbieri 2010-04-17 20:28:22 +00:00
parent 9b5981a52e
commit 004df4045f
2 changed files with 26 additions and 0 deletions

View File

@ -544,6 +544,7 @@ extern "C" {
EAPI Evas_Object *edje_object_part_box_remove (Evas_Object *obj, const char *part, Evas_Object *child);
EAPI Evas_Object *edje_object_part_box_remove_at (Evas_Object *obj, const char *part, unsigned int pos);
EAPI Eina_Bool edje_object_part_box_remove_all (Evas_Object *obj, const char *part, Eina_Bool clear);
EAPI Evas_Object *edje_object_part_table_child_get(Evas_Object *obj, const char *part, unsigned int col, unsigned int row);
EAPI Eina_Bool edje_object_part_table_pack (Evas_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
EAPI Eina_Bool edje_object_part_table_unpack (Evas_Object *obj, const char *part, Evas_Object *child_obj);
EAPI Eina_Bool edje_object_part_table_col_row_size_get (const Evas_Object *obj, const char *part, int *cols, int *rows);

View File

@ -3672,6 +3672,31 @@ _edje_table_child_remove(Edje_Real_Part *rp, Evas_Object *child)
_edje_recalc(rp->edje);
}
/**
* @brief Retrieve a child from a table
*
* @param obj A valid Evas_Object handle
* @param part The part name
* @param col The column of the child to get
* @param row The row of the child to get
* @return The child Evas_Object
*/
EAPI Evas_Object *
edje_object_part_table_child_get(Evas_Object *obj, const char *part, unsigned int col, unsigned int row)
{
Edje *ed;
Edje_Real_Part *rp;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return NULL;
rp = _edje_real_part_recursive_get(ed, part);
if (!rp) return NULL;
if (rp->part->type != EDJE_PART_TYPE_TABLE) return NULL;
return evas_object_table_child_get(rp->object, col, row);
}
/**
* @brief Packs an object into the table.
*