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...
Macros | |
| #define | EVAS_OBJ_GRID_CLASS evas_object_grid_class_get() |
| #define | EVAS_OBJ_GRID_ID(sub_id) (EVAS_OBJ_GRID_BASE_ID + sub_id) |
| #define | evas_obj_grid_add(ret) EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ADD), EO_TYPECHECK(Evas_Object **, ret) |
| #define | evas_obj_grid_add_to(ret) EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ADD_TO), EO_TYPECHECK(Evas_Object **, ret) |
| #define | evas_obj_grid_size_set(w, h) EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_SIZE_SET), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h) |
| #define | evas_obj_grid_size_get(w, h) EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_SIZE_GET), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h) |
| #define | evas_obj_grid_pack(child, x, y, w, h, ret) EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_PACK), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(int, x), EO_TYPECHECK(int, y), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h), EO_TYPECHECK(Eina_Bool *, ret) |
| #define | evas_obj_grid_unpack(child, ret) EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_UNPACK), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Eina_Bool *, ret) |
| #define | evas_obj_grid_clear(clear) EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_CLEAR), EO_TYPECHECK(Eina_Bool, clear) |
| #define | evas_obj_grid_pack_get(child, x, y, w, h, ret) EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_PACK_GET), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(int *, x), EO_TYPECHECK(int *, y), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h), EO_TYPECHECK(Eina_Bool *, ret) |
| #define | evas_obj_grid_iterator_new(ret) EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ITERATOR_NEW), EO_TYPECHECK(Eina_Iterator **, ret) |
| #define | evas_obj_grid_accessor_new(ret) EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ACCESSOR_NEW), EO_TYPECHECK(Eina_Accessor **, ret) |
| #define | evas_obj_grid_children_get(ret) EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_CHILDREN_GET), EO_TYPECHECK(Eina_List **, ret) |
| #define | evas_obj_grid_mirrored_get(ret) EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_MIRRORED_GET), EO_TYPECHECK(Eina_Bool *, ret) |
| #define | evas_obj_grid_mirrored_set(mirrored) EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_MIRRORED_SET), EO_TYPECHECK(Eina_Bool, mirrored) |
Functions | |
| const Eo_Class * | evas_object_grid_class_get (void) |
| Evas_Object * | evas_object_grid_add (Evas *evas) |
| Create a new grid. | |
| Evas_Object * | evas_object_grid_add_to (Evas_Object *parent) |
| Create a grid that is child of a given element parent. | |
| void | evas_object_grid_size_set (Evas_Object *o, int w, int h) |
| Set the virtual resolution for the grid. | |
| void | evas_object_grid_size_get (const Evas_Object *o, int *w, int *h) |
| Get the current virtual resolution. | |
| void | evas_object_grid_mirrored_set (Evas_Object *o, Eina_Bool mirrored) |
| Sets the mirrored mode of the grid. | |
| Eina_Bool | evas_object_grid_mirrored_get (const Evas_Object *o) |
| Gets the mirrored mode of the grid. | |
| 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. | |
| Eina_Bool | evas_object_grid_unpack (Evas_Object *o, Evas_Object *child) |
| Remove child from grid. | |
| void | evas_object_grid_clear (Evas_Object *o, Eina_Bool clear) |
| Faster way to remove all child objects from a grid object. | |
| Eina_Bool | evas_object_grid_pack_get (const Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h) |
| Get the pack options for a grid child. | |
| Eina_Iterator * | evas_object_grid_iterator_new (const Evas_Object *o) |
| Get an iterator to walk the list of children for the grid. | |
| 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. | |
| Eina_List * | evas_object_grid_children_get (const Evas_Object *o) |
| Get the list of children for the grid. | |
Variables | |
| Eo_Op | EVAS_OBJ_GRID_BASE_ID |
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
Macro Definition Documentation
| #define evas_obj_grid_add | ( | ret | ) | EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ADD), EO_TYPECHECK(Evas_Object **, ret) |
| #define evas_obj_grid_add_to | ( | ret | ) | EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ADD_TO), EO_TYPECHECK(Evas_Object **, ret) |
- Since
- 1.8
Create a grid that is child of a given element parent.
- Parameters
-
[out] ret
- See Also
- evas_object_grid_add_to
Referenced by evas_object_grid_add_to().
| #define evas_obj_grid_size_set | ( | w, | |
| h | |||
| ) | EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_SIZE_SET), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h) |
- Since
- 1.8
Set the virtual resolution for the grid
- Parameters
-
[in] w [in] h
- See Also
- evas_object_grid_size_set
Referenced by evas_object_grid_size_set().
| #define evas_obj_grid_size_get | ( | w, | |
| h | |||
| ) | EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_SIZE_GET), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h) |
- Since
- 1.8
Get the current virtual resolution
- Parameters
-
[out] w [out] h
- See Also
- evas_object_grid_size_get
Referenced by evas_object_grid_size_get().
| #define evas_obj_grid_pack | ( | child, | |
| x, | |||
| y, | |||
| w, | |||
| h, | |||
| ret | |||
| ) | EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_PACK), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(int, x), EO_TYPECHECK(int, y), EO_TYPECHECK(int, w), EO_TYPECHECK(int, h), EO_TYPECHECK(Eina_Bool *, ret) |
- Since
- 1.8
Add a new child to a grid object.
- Parameters
-
[in] child [in] x [in] y [in] w [in] h [out] ret
- See Also
- evas_object_grid_pack
Referenced by evas_object_grid_pack().
| #define evas_obj_grid_unpack | ( | child, | |
| ret | |||
| ) | EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_UNPACK), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(Eina_Bool *, ret) |
- Since
- 1.8
Remove child from grid.
- Parameters
-
[in] child [out] ret
- See Also
- evas_object_grid_unpack
Referenced by evas_object_grid_unpack().
| #define evas_obj_grid_clear | ( | clear | ) | EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_CLEAR), EO_TYPECHECK(Eina_Bool, clear) |
- Since
- 1.8
Faster way to remove all child objects from a grid object.
- Parameters
-
[in] clear
- See Also
- evas_object_grid_clear
Referenced by evas_object_grid_clear().
| #define evas_obj_grid_pack_get | ( | child, | |
| x, | |||
| y, | |||
| w, | |||
| h, | |||
| ret | |||
| ) | EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_PACK_GET), EO_TYPECHECK(Evas_Object *, child), EO_TYPECHECK(int *, x), EO_TYPECHECK(int *, y), EO_TYPECHECK(int *, w), EO_TYPECHECK(int *, h), EO_TYPECHECK(Eina_Bool *, ret) |
- Since
- 1.8
Get the pack options for a grid child
- Parameters
-
[in] child [out] x [out] y [out] w [out] h [out] ret
- See Also
- evas_object_grid_pack_get
Referenced by evas_object_grid_pack_get().
| #define evas_obj_grid_iterator_new | ( | ret | ) | EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ITERATOR_NEW), EO_TYPECHECK(Eina_Iterator **, ret) |
- Since
- 1.8
Get an iterator to walk the list of children for the grid.
- Parameters
-
[out] ret
- See Also
- evas_object_grid_iterator_new
Referenced by evas_object_grid_iterator_new().
| #define evas_obj_grid_accessor_new | ( | ret | ) | EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_ACCESSOR_NEW), EO_TYPECHECK(Eina_Accessor **, ret) |
- Since
- 1.8
Get an accessor to get random access to the list of children for the grid.
- Parameters
-
[out] ret
- See Also
- evas_object_grid_accessor_new
Referenced by evas_object_grid_accessor_new().
| #define evas_obj_grid_children_get | ( | ret | ) | EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_CHILDREN_GET), EO_TYPECHECK(Eina_List **, ret) |
- Since
- 1.8
Get the list of children for the grid.
- Parameters
-
[out] ret
- See Also
- evas_object_grid_children_get
Referenced by evas_object_grid_children_get().
| #define evas_obj_grid_mirrored_get | ( | ret | ) | EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_MIRRORED_GET), EO_TYPECHECK(Eina_Bool *, ret) |
- Since
- 1.8
Gets the mirrored mode of the grid.
- Parameters
-
[out] ret
- See Also
- evas_object_grid_mirrored_get
Referenced by evas_object_grid_mirrored_get().
| #define evas_obj_grid_mirrored_set | ( | mirrored | ) | EVAS_OBJ_GRID_ID(EVAS_OBJ_GRID_SUB_ID_MIRRORED_SET), EO_TYPECHECK(Eina_Bool, mirrored) |
- Since
- 1.8
Sets the mirrored mode of the grid. In mirrored mode the grid items go
- Parameters
-
[in] mirrored
- See Also
- evas_object_grid_mirrored_set
Referenced by evas_object_grid_mirrored_set().
Function Documentation
| 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
References eo_add, and eo_unref().
| 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
References eo_do, and evas_obj_grid_add_to.
| 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
References eo_do, and evas_obj_grid_size_set.
| 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
References eo_do, and evas_obj_grid_size_get.
| 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
References eo_do, and evas_obj_grid_mirrored_set.
| 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_TRUEif it's a mirrored grid,EINA_FALSEotherwise.
- See Also
- evas_object_grid_mirrored_set()
- Since
- 1.1
References EINA_FALSE, eo_do, and evas_obj_grid_mirrored_get.
| 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
References EINA_FALSE, eo_do, and evas_obj_grid_pack.
| 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
References EINA_FALSE, eo_do, and evas_obj_grid_unpack.
| 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
References eo_do, and evas_obj_grid_clear.
| Eina_Bool evas_object_grid_pack_get | ( | const 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
References EINA_FALSE, eo_do, and evas_obj_grid_pack_get.
| 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
References eo_do, and evas_obj_grid_iterator_new.
| 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
References eo_do, and evas_obj_grid_accessor_new.
| 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
References eo_do, and evas_obj_grid_children_get.
