allow you to set and get table pack position/size in cells.

SVN revision: 60448
This commit is contained in:
Carsten Haitzler 2011-06-17 11:36:08 +00:00
parent b6f81adf23
commit e9f04a172e
2 changed files with 50 additions and 1 deletions

View File

@ -1446,7 +1446,9 @@ extern "C" {
EAPI void elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
EAPI void elm_table_unpack(Evas_Object *obj, Evas_Object *subobj) EINA_ARG_NONNULL(1);
EAPI void elm_table_clear(Evas_Object *obj, Eina_Bool clear) EINA_ARG_NONNULL(1);
EAPI void elm_table_pack_set(Evas_Object *subobj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
EAPI void elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
/* gengrid */
typedef struct _Elm_Gengrid_Item_Class Elm_Gengrid_Item_Class;
typedef struct _Elm_Gengrid_Item_Class_Func Elm_Gengrid_Item_Class_Func;

View File

@ -289,6 +289,53 @@ elm_table_unpack(Evas_Object *obj, Evas_Object *subobj)
evas_object_table_unpack(wd->tbl, subobj);
}
/**
* Set the packing location of an existing child of the table
*
* @param subobj The subobject to be modified in the table
* @param x Coordinate to X axis
* @param y Coordinate to Y axis
* @param w Horizontal length
* @param h Vertical length
*
* @ingroup Table
*/
EAPI void
elm_table_pack_set(Evas_Object *subobj, int x, int y, int w, int h)
{
Evas_Object *obj = elm_widget_parent_widget_get(subobj);
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
evas_object_table_pack(wd->tbl, subobj, x, y, w, h);
}
/**
* Set the packing location of an existing child of the table
*
* @param subobj The subobject to be modified in the table
* @param x Coordinate to X axis
* @param y Coordinate to Y axis
* @param w Horizontal length
* @param h Vertical length
*
* @ingroup Table
*/
EAPI void
elm_table_pack_get(Evas_Object *subobj, int *x, int *y, int *w, int *h)
{
Evas_Object *obj = elm_widget_parent_widget_get(subobj);
unsigned short ix, iy, iw, ih;
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
evas_object_table_pack_get(wd->tbl, subobj, &ix, &iy, &iw, &ih);
if (x) *x = ix;
if (y) *y = iy;
if (w) *w = iw;
if (h) *h = ih;
}
/**
* Faster way to remove all child objects from a table object.
*