Convenience smart object that packs children under a regular grid layout, using their virtual grid location and size to determine children's positions inside the grid object's area. More...
Functions | |
Evas_Object * | evas_object_grid_add (Evas *evas) |
Create a new grid. More... | |
Evas_Object * | evas_object_grid_add_to (Evas_Object *parent) |
Create a grid that is child of a given element parent. More... | |
void | evas_object_grid_size_set (Evas_Object *o, int w, int h) |
Set the virtual resolution for the grid. More... | |
void | evas_object_grid_size_get (const Evas_Object *o, int *w, int *h) |
Get the current virtual resolution. More... | |
void | evas_object_grid_mirrored_set (Evas_Object *o, Eina_Bool mirrored) |
Sets the mirrored mode of the grid. More... | |
Eina_Bool | evas_object_grid_mirrored_get (const Evas_Object *o) |
Gets the mirrored mode of the grid. More... | |
Eina_Bool | evas_object_grid_pack (Evas_Object *o, Evas_Object *child, int x, int y, int w, int h) |
Add a new child to a grid object. More... | |
Eina_Bool | evas_object_grid_unpack (Evas_Object *o, Evas_Object *child) |
Remove child from grid. More... | |
void | evas_object_grid_clear (Evas_Object *o, Eina_Bool clear) |
Faster way to remove all child objects from a grid object. More... | |
Eina_Bool | evas_object_grid_pack_get (Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h) |
Get the pack options for a grid child. More... | |
Eina_Iterator * | evas_object_grid_iterator_new (const Evas_Object *o) |
Get an iterator to walk the list of children for the grid. More... | |
Eina_Accessor * | evas_object_grid_accessor_new (const Evas_Object *o) |
Get an accessor to get random access to the list of children for the grid. More... | |
Eina_List * | evas_object_grid_children_get (const Evas_Object *o) |
Get the list of children for the grid. More... | |
Detailed Description
Convenience smart object that packs children under a regular grid layout, using their virtual grid location and size to determine children's positions inside the grid object's area.
- Since
- 1.1.0
Function Documentation
Eina_Accessor* evas_object_grid_accessor_new | ( | const Evas_Object * | o) |
Get an accessor to get random access to the list of children for the grid.
- Note
- Do not remove or delete objects while walking the list.
- Since
- 1.1.0
Evas_Object* evas_object_grid_add | ( | Evas * | evas) |
Create a new grid.
It's set to a virtual size of 1x1 by default and add children with evas_object_grid_pack().
- Since
- 1.1.0
References evas_object_smart_add().
Referenced by evas_object_grid_add_to().
Evas_Object* evas_object_grid_add_to | ( | Evas_Object * | parent) |
Create a grid that is child of a given element parent.
- See Also
- evas_object_grid_add()
- Since
- 1.1.0
References evas_object_evas_get(), evas_object_grid_add(), and evas_object_smart_member_add().
Eina_List* evas_object_grid_children_get | ( | const Evas_Object * | o) |
Get the list of children for the grid.
- Note
- 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 this list, but these removals won't be reflected on it.
- Since
- 1.1.0
void evas_object_grid_clear | ( | Evas_Object * | o, |
Eina_Bool | clear | ||
) |
Faster way to remove all child objects from a grid object.
- Parameters
-
o The given grid object. clear if true, it will delete just removed children.
- Since
- 1.1.0
References evas_object_del(), and evas_object_smart_member_del().
Eina_Iterator* evas_object_grid_iterator_new | ( | const Evas_Object * | o) |
Get an iterator to walk the list of children for the grid.
- Note
- Do not remove or delete objects while walking the list.
- Since
- 1.1.0
Eina_Bool evas_object_grid_mirrored_get | ( | const Evas_Object * | o) |
Gets the mirrored mode of the grid.
- Parameters
-
o The grid object.
- Returns
EINA_TRUE
if it's a mirrored grid,EINA_FALSE
otherwise.
- See Also
- evas_object_grid_mirrored_set()
- Since
- 1.1.0
void evas_object_grid_mirrored_set | ( | Evas_Object * | o, |
Eina_Bool | mirrored | ||
) |
Sets the mirrored mode of the grid.
In mirrored mode the grid items go from right to left instead of left to right. That is, 0,0 is top right, not to left.
- Parameters
-
o The grid object. mirrored the mirrored mode to set
- Since
- 1.1.0
Eina_Bool evas_object_grid_pack | ( | Evas_Object * | o, |
Evas_Object * | child, | ||
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
Add a new child to a grid object.
- Parameters
-
o The given grid object. child The child object to add. x The virtual x coordinate of the child y The virtual y coordinate of the child w The virtual width of the child h The virtual height of the child
- Returns
- 1 on success, 0 on failure.
- Since
- 1.1.0
References evas_object_smart_changed(), and evas_object_smart_member_add().
Eina_Bool evas_object_grid_pack_get | ( | Evas_Object * | o, |
Evas_Object * | child, | ||
int * | x, | ||
int * | y, | ||
int * | w, | ||
int * | h | ||
) |
Get the pack options for a grid child.
Get the pack x, y, width and height in virtual coordinates set by evas_object_grid_pack()
- Parameters
-
o The grid object child The grid child to query for coordinates x The pointer to where the x coordinate will be returned y The pointer to where the y coordinate will be returned w The pointer to where the width will be returned h The pointer to where the height will be returned
- Returns
- 1 on success, 0 on failure.
- Since
- 1.1.0
void evas_object_grid_size_get | ( | const Evas_Object * | o, |
int * | w, | ||
int * | h | ||
) |
Get the current virtual resolution.
- Parameters
-
o The grid object to query w A pointer to an integer to store the virtual width h A pointer to an integer to store the virtual height
- See Also
- evas_object_grid_size_set()
- Since
- 1.1.0
void evas_object_grid_size_set | ( | Evas_Object * | o, |
int | w, | ||
int | h | ||
) |
Set the virtual resolution for the grid.
- Parameters
-
o The grid object to modify w The virtual horizontal size (resolution) in integer units h The virtual vertical size (resolution) in integer units
- Since
- 1.1.0
References evas_object_smart_changed().
Eina_Bool evas_object_grid_unpack | ( | Evas_Object * | o, |
Evas_Object * | child | ||
) |
Remove child from grid.
- Note
- removing a child will immediately call a walk over children in order to recalculate numbers of columns and rows. If you plan to remove all children, use evas_object_grid_clear() instead.
- Returns
- 1 on success, 0 on failure.
- Since
- 1.1.0
References evas_object_smart_member_del(), and evas_object_smart_parent_get().