Evas_Object_Grid_Group(3)

NAME
Evas_Object_Grid_Group - Grid Smart Object.

 - 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.

SYNOPSIS

  Functions
EVAS_API void evas_object_grid_size_set (Evas_Grid *obj, int w, int h)
Set the virtual resolution for the grid.
EVAS_API void evas_object_grid_size_get (const Evas_Grid *obj, int *w, int *h)
Get the current virtual resolution.
EVAS_API Eina_List * evas_object_grid_children_get (const Evas_Grid *obj)
Get the list of children for the grid.
EVAS_API Eina_Accessor * evas_object_grid_accessor_new (const Evas_Grid *obj)
Get an accessor to get random access to the list of children for the grid.
EVAS_API void evas_object_grid_clear (Evas_Grid *obj, Eina_Bool clear)
Faster way to remove all child objects from a grid object.
EVAS_API Eina_Iterator * evas_object_grid_iterator_new (const Evas_Grid *obj)
Get an iterator to walk the list of children for the grid.
EVAS_API Efl_Canvas_Object * evas_object_grid_add_to (Evas_Grid *obj)
Create a grid that is child of a given element parent.
EVAS_API Eina_Bool evas_object_grid_unpack (Evas_Grid *obj, Efl_Canvas_Object *child)
Remove child from grid.
EVAS_API Eina_Bool evas_object_grid_pack_get (const Evas_Grid *obj, Efl_Canvas_Object *child, int *x, int *y, int *w, int *h)
Get the pack options for a grid child.
EVAS_API Eina_Bool evas_object_grid_pack (Evas_Grid *obj, Efl_Canvas_Object *child, int x, int y, int w, int h)
Add a new child to a grid object.
EVAS_API Evas_Object * evas_object_grid_add (Evas *evas)
Create a new grid.
EVAS_API void evas_object_grid_mirrored_set (Eo *obj, Eina_Bool mirrored)
Sets the mirrored mode of the grid.
EVAS_API Eina_Bool evas_object_grid_mirrored_get (const Eo *obj)
Gets the mirrored mode of the grid.
EVAS_API Evas_Object * evas_object_textgrid_add (Evas *e)
Add a textgrid to the given Evas.
EVAS_API void evas_object_textgrid_font_source_set (Eo *obj, const char *font_source)
Set the font (source) file to be used on a given textgrid object.
EVAS_API const char * evas_object_textgrid_font_source_get (const Eo *obj)
Get the font file's path which is being used on a given textgrid object.
EVAS_API void evas_object_textgrid_font_set (Eo *obj, const char *font_name, Evas_Font_Size font_size)
Set the font family and size on a given textgrid object.
EVAS_API void evas_object_textgrid_font_get (const Eo *obj, const char **font_name, Evas_Font_Size *font_size)
Retrieve the font family and size in use on a given textgrid object.

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

Function Documentation

  EVAS_API void evas_object_grid_size_set (Evas_Grid * obj, int w, int h)

Set the virtual resolution for the grid.

Parameters
    obj The object.
    w The virtual horizontal size (resolution) in integer units.
    h The virtual vertical size (resolution) in integer units.

Since
    1.1

  EVAS_API void evas_object_grid_size_get (const Evas_Grid * obj, int * w, int * h)

Get the current virtual resolution. See also evas_object_grid_size_set

Parameters
    obj The object.
    w The virtual horizontal size (resolution) in integer units.
    h The virtual vertical size (resolution) in integer units.

Since
    1.1

  EVAS_API Eina_List* evas_object_grid_children_get (const Evas_Grid * obj)

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.

Parameters
    obj The object.

Returns
    Iterator to grid children

Since
    1.1

  EVAS_API Eina_Accessor* evas_object_grid_accessor_new (const Evas_Grid * obj)

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.

Parameters
    obj The object.

Returns
    Accessor to children list

Since
    1.1

  EVAS_API void evas_object_grid_clear (Evas_Grid * obj, Eina_Bool clear)

Faster way to remove all child objects from a grid object.

Parameters
    obj The object.
    clear If true, it will delete just removed children.

Since
    1.1

  EVAS_API Eina_Iterator* evas_object_grid_iterator_new (const Evas_Grid * obj)

Get an iterator to walk the list of children for the grid.

Note
    Do not remove or delete objects while walking the list.

Parameters
    obj The object.

Returns
    Iterator

Since
    1.1

  EVAS_API Efl_Canvas_Object* evas_object_grid_add_to (Evas_Grid * obj)

Create a grid that is child of a given element parent. evas_object_grid_add()

Parameters
    obj The object.

Returns
    New child object

Since
    1.1

  EVAS_API Eina_Bool evas_object_grid_unpack (Evas_Grid * obj, Efl_Canvas_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.

Parameters
    obj The object.
    child Child to be removed

Returns
    1 on success, 0 on failure.

Since
    1.1

  EVAS_API Eina_Bool evas_object_grid_pack_get (const Evas_Grid * obj, Efl_Canvas_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
    obj The 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

Referenced by elm_grid_pack_get().

  EVAS_API Eina_Bool evas_object_grid_pack (Evas_Grid * obj, Efl_Canvas_Object * child, int x, int y, int w, int h)

Add a new child to a grid object.

Parameters
    obj The 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

Referenced by elm_grid_pack_set().

  EVAS_API Evas_Object* evas_object_textgrid_add (Evas * e)

Add a textgrid to the given Evas.

Parameters
    e The given evas.

Returns
    The new textgrid object.

This function adds a new textgrid object to the Evas e and returns the object.

Since
    1.7

References EINA_SAFETY_ON_FALSE_RETURN_VAL, and EVAS_CANVAS_CLASS.

  EVAS_API 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 EINA_SAFETY_ON_FALSE_RETURN_VAL, and EVAS_CANVAS_CLASS.

  EVAS_API void evas_object_grid_mirrored_set (Eo * obj, 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
    obj The object.
    mirrored true if mirrored mode is set, false otherwise

Since
    1.1

  EVAS_API Eina_Bool evas_object_grid_mirrored_get (const Eo * obj)

Gets the mirrored mode of the grid. See also evas_object_grid_mirrored_set

Parameters
    obj The object.

Returns
    true if mirrored mode is set, false otherwise

Since
    1.1

  EVAS_API void evas_object_textgrid_font_source_set (Eo * obj, const char * font_source)

Set the font (source) file to be used on a given textgrid object. This function allows the font file font_source to be explicitly set for the textgrid object obj, overriding system lookup, which will first occur in the given file's contents. If font_source is NULL or is an empty string, or the same font_source has already been set, or on error, this function does nothing.

See also
    evas_object_textgrid_font_get()

    evas_object_textgrid_font_set()

    evas_object_textgrid_font_source_get()

Since
    1.7

Parameters
    font_source The font file's path.

  EVAS_API const char* evas_object_textgrid_font_source_get (const Eo * obj)

Get the font file's path which is being used on a given textgrid object.

Returns
    The font file's path.

This function returns the font source path of the textgrid object obj. If the font source path has not been set, or on error, NULL is returned.

See also
    evas_object_textgrid_font_get()

    evas_object_textgrid_font_set()

    evas_object_textgrid_font_source_set()

Since
    1.7

  EVAS_API void evas_object_textgrid_font_set (Eo * obj, const char * font_name, Evas_Font_Size font_size)

Set the font family and size on a given textgrid object. This function allows the font name font_name and size font_size of the textgrid object obj to be set. The font_name string has to follow fontconfig's convention on naming fonts, as it's the underlying library used to query system fonts by Evas (see the fc-list command's output, on your system, to get an idea). It also has to be a monospace font. If font_name is NULL, or if it is an empty string, or if font_size is less or equal than 0, or on error, this function does nothing.

See also
    evas_object_textgrid_font_get()

    evas_object_textgrid_font_source_set()

    evas_object_textgrid_font_source_get()

Since
    1.7

Parameters
    font_name The font (family) name.
    font_size The font size, in points.

  EVAS_API void evas_object_textgrid_font_get (const Eo * obj, const char ** font_name, Evas_Font_Size * font_size)

Retrieve the font family and size in use on a given textgrid object. This function allows the font name and size of a textgrid object obj to be queried and stored respectively in the buffers font_name and font_size. Be aware that the font name string is still owned by Evas and should not have free() called on it by the caller of the function. On error, the font name is the empty string and the font size is 0. font_name and font_source can be NULL.

See also
    evas_object_textgrid_font_set()

    evas_object_textgrid_font_source_set()

    evas_object_textgrid_font_source_get()

Since
    1.7

Parameters
    font_name The font (family) name.
    font_size The font size, in points.

Author

Generated automatically by Doxygen for EFL from the source code.