Tizen Native API

The grid is a grid layout widget that lays out a series of children as a fixed "grid" of widgets using a given percentage of the grid width and height each using the child object.

grid_inheritance_tree.png

The Grid uses a "Virtual resolution" that is stretched to fill the grid widgets size itself. The default is 100 x 100, so that means the position and sizes of children are effectively percentages (0 to 100) of the width or height of the grid widget.

Functions

Evas_Objectelm_grid_add (Evas_Object *parent)
 Adds a new grid to the parent.
void elm_grid_size_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 Sets the virtual size of the grid.
void elm_grid_size_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
 Gets the virtual size of the grid.
void elm_grid_pack (Evas_Object *obj, Evas_Object *subobj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
 Packs the child at a given position and size.
void elm_grid_unpack (Evas_Object *obj, Evas_Object *subobj)
 Unpacks a child from a grid object.
void elm_grid_clear (Evas_Object *obj, Eina_Bool clear)
 Removes all child objects from a grid object.
void elm_grid_pack_set (Evas_Object *subobj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
 Sets packing of an existing child at a given position and size.
void elm_grid_pack_get (Evas_Object *subobj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
 Gets packing of a child.
Eina_Listelm_grid_children_get (const Evas_Object *obj)
 Gets the list of the children for the grid.

Function Documentation

Adds a new grid to the parent.

Since :
2.3.1
Parameters:
[in]parentThe parent object
Returns:
The new object, otherwise NULL if it cannot be created

Gets the list of the children for the grid.

Since :
2.3.1
Remarks:
This is a duplicate of the list kept by the grid internally. It's up to the user to destroy it when it no longer needs it. It's possible to remove objects from the grid when walking through this list, but these removals won't be reflected on it.
Parameters:
[in]objThe grid object
Returns:
The children list
void elm_grid_clear ( Evas_Object obj,
Eina_Bool  clear 
)

Removes all child objects from a grid object.

Since :
2.3.1
Parameters:
[in]objThe grid object
[in]clearIf true it deletes the just removed children, otherwise false
void elm_grid_pack ( Evas_Object obj,
Evas_Object subobj,
Evas_Coord  x,
Evas_Coord  y,
Evas_Coord  w,
Evas_Coord  h 
)

Packs the child at a given position and size.

Since :
2.3.1
Parameters:
[in]objThe grid object
[in]subobjThe child to pack
[in]xThe virtual x coordinate at which to pack it
[in]yThe virtual y coordinate at which to pack it
[in]wThe virtual width at which to pack it
[in]hThe virtual height at which to pack it
void elm_grid_pack_get ( Evas_Object subobj,
Evas_Coord x,
Evas_Coord y,
Evas_Coord w,
Evas_Coord h 
)

Gets packing of a child.

Since :
2.3.1
Parameters:
[in]subobjThe child to query
[out]xA pointer to an integer to store the virtual x coordinate
[out]yA pointer to an integer to store the virtual y coordinate
[out]wA pointer to an integer to store the virtual width
[out]hA pointer to an integer to store the virtual height
void elm_grid_pack_set ( Evas_Object subobj,
Evas_Coord  x,
Evas_Coord  y,
Evas_Coord  w,
Evas_Coord  h 
)

Sets packing of an existing child at a given position and size.

Since :
2.3.1
Parameters:
[in]subobjThe child to set packing of
[in]xThe virtual x coordinate at which to pack it
[in]yThe virtual y coordinate at which to pack it
[in]wThe virtual width at which to pack it
[in]hThe virtual height at which to pack it
void elm_grid_size_get ( const Evas_Object obj,
Evas_Coord w,
Evas_Coord h 
)

Gets the virtual size of the grid.

Since :
2.3.1
Parameters:
[in]objThe grid object
[out]wA pointer to an integer to store the virtual width of the grid
[out]hA pointer to an integer to store the virtual height of the grid
void elm_grid_size_set ( Evas_Object obj,
Evas_Coord  w,
Evas_Coord  h 
)

Sets the virtual size of the grid.

Since :
2.3.1
Parameters:
[in]objThe grid object
[in]wThe virtual width of the grid
[in]hThe virtual height of the grid
void elm_grid_unpack ( Evas_Object obj,
Evas_Object subobj 
)

Unpacks a child from a grid object.

Since :
2.3.1
Parameters:
[in]objThe grid object
[in]subobjThe child to unpack