Modules | Macros | Enumerations | Functions
Gengrid (Generic grid)

Modules

 Gengrid Item
 Elementary gengrid item class.
 

Macros

#define ELM_GENGRID_CLASS   elm_gengrid_class_get()
 Elementary gengrid class.
 
#define ELM_GENGRID_EVENT_REALIZED   (&(_ELM_GENGRID_EVENT_REALIZED))
 Called when gengrid realized. More...
 
#define ELM_GENGRID_EVENT_UNREALIZED   (&(_ELM_GENGRID_EVENT_UNREALIZED))
 Called when gengrid unrealized. More...
 
#define ELM_GENGRID_EVENT_INDEX_UPDATE   (&(_ELM_GENGRID_EVENT_INDEX_UPDATE))
 Called on gengrid index update. More...
 
#define ELM_GENGRID_EVENT_SCROLL_PAGE_CHANGED   (&(_ELM_GENGRID_EVENT_SCROLL_PAGE_CHANGED))
 Called when scroll page changed.
 
#define ELM_GENGRID_EVENT_EDGE_BOTTOM   (&(_ELM_GENGRID_EVENT_EDGE_BOTTOM))
 Called when bottom edge is reached.
 
#define ELM_GENGRID_EVENT_EDGE_TOP   (&(_ELM_GENGRID_EVENT_EDGE_TOP))
 Called when top edge is reached.
 
#define ELM_GENGRID_EVENT_EDGE_RIGHT   (&(_ELM_GENGRID_EVENT_EDGE_RIGHT))
 Called when right edge is reached.
 
#define ELM_GENGRID_EVENT_EDGE_LEFT   (&(_ELM_GENGRID_EVENT_EDGE_LEFT))
 Called when left edge is reached.
 
#define ELM_GENGRID_EVENT_ITEM_FOCUSED   (&(_ELM_GENGRID_EVENT_ITEM_FOCUSED))
 Called when item got focus. More...
 
#define ELM_GENGRID_EVENT_ITEM_UNFOCUSED   (&(_ELM_GENGRID_EVENT_ITEM_UNFOCUSED))
 Called when item no longer has focus. More...
 
#define ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_START   (&(_ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_START))
 Called when item reorder animation started. More...
 
#define ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_STOP   (&(_ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_STOP))
 Called when item reorder animation stopped. More...
 
#define ELM_GENGRID_EVENT_ACTIVATED   (&(_ELM_GENGRID_EVENT_ACTIVATED))
 Called when gengrid got activated. More...
 
#define ELM_GENGRID_EVENT_HIGHLIGHTED   (&(_ELM_GENGRID_EVENT_HIGHLIGHTED))
 Called when gengrid is highlighted. More...
 
#define ELM_GENGRID_EVENT_UNHIGHLIGHTED   (&(_ELM_GENGRID_EVENT_UNHIGHLIGHTED))
 Called when gengrid is no longer highlighted. More...
 
#define ELM_GENGRID_EVENT_RELEASED   (&(_ELM_GENGRID_EVENT_RELEASED))
 Called when gengrid is released. More...
 
#define ELM_GENGRID_EVENT_MOVED   (&(_ELM_GENGRID_EVENT_MOVED))
 Called when gengrid item moved. More...
 

Enumerations

enum  Elm_Gengrid_Reorder_Type {
  ELM_GENGRID_REORDER_TYPE_NORMAL = 0 ,
  ELM_GENGRID_REORDER_TYPE_SWAP ,
  ELM_GENGRID_REORDER_TYPE_NORMAL = 0 ,
  ELM_GENGRID_REORDER_TYPE_SWAP
}
 Gengrid reorder modes. More...
 
enum  Elm_Gengrid_Reorder_Type {
  ELM_GENGRID_REORDER_TYPE_NORMAL = 0 ,
  ELM_GENGRID_REORDER_TYPE_SWAP ,
  ELM_GENGRID_REORDER_TYPE_NORMAL = 0 ,
  ELM_GENGRID_REORDER_TYPE_SWAP
}
 Gengrid reorder modes. More...
 

Functions

Elm_Gengrid_Item_Classelm_gengrid_item_class_new (void)
 Add a new gengrid item class in a given gengrid widget. More...
 
void elm_gengrid_item_class_free (Elm_Gengrid_Item_Class *itc)
 Remove an item class in a given gengrid widget. More...
 
void elm_gengrid_item_class_ref (Elm_Gengrid_Item_Class *itc)
 Increments object reference count for the item class. More...
 
void elm_gengrid_item_class_unref (Elm_Gengrid_Item_Class *itc)
 Decrements object reference count for the item class. More...
 
void elm_gengrid_item_tooltip_text_set (Elm_Object_Item *it, const char *text)
 Set the text to be shown in a given gengrid item's tooltips. More...
 
void elm_gengrid_item_tooltip_style_set (Elm_Object_Item *it, const char *style)
 Set a different style for a given gengrid item's tooltip. More...
 
const char * elm_gengrid_item_tooltip_style_get (const Elm_Object_Item *it)
 Get the style set a given gengrid item's tooltip. More...
 
const char * elm_gengrid_item_cursor_get (const Elm_Object_Item *it)
 Get the type of mouse pointer/cursor decoration set to be shown, when the mouse pointer is over the given gengrid widget item. More...
 
void elm_gengrid_item_cursor_unset (Elm_Object_Item *it)
 Unset any custom mouse pointer/cursor decoration set to be shown, when the mouse pointer is over the given gengrid widget item, thus making it show the default cursor again. More...
 
void elm_gengrid_item_cursor_style_set (Elm_Object_Item *it, const char *style)
 Set a different style for a given custom cursor set for a gengrid item. More...
 
const char * elm_gengrid_item_cursor_style_get (const Elm_Object_Item *it)
 Get the current style set for a given gengrid item's custom cursor. More...
 
void elm_gengrid_item_cursor_engine_only_set (Elm_Object_Item *it, Eina_Bool engine_only)
 Set if the (custom) cursor for a given gengrid item should be searched in its theme, also, or should only rely on the rendering engine. More...
 
Eina_Bool elm_gengrid_item_cursor_engine_only_get (const Elm_Object_Item *it)
 Get if the (custom) cursor for a given gengrid item is being searched in its theme, also, or is only relying on the rendering engine. More...
 
void elm_gengrid_item_pos_get (const Elm_Object_Item *it, unsigned int *x, unsigned int *y)
 Get a given gengrid item's position, relative to the whole gengrid's grid area. More...
 
void elm_gengrid_item_select_mode_set (Elm_Object_Item *it, Elm_Object_Select_Mode mode)
 Set the gengrid item's select mode. More...
 
Elm_Object_Select_Mode elm_gengrid_item_select_mode_get (const Elm_Object_Item *it)
 Get the gengrid item's select mode. More...
 
EOAPI void elm_obj_gengrid_align_set (Eo *obj, double align_x, double align_y)
 Set the items grid's alignment within a given gengrid widget. More...
 
EOAPI void elm_obj_gengrid_align_get (const Eo *obj, double *align_x, double *align_y)
 Get the items grid's alignment values within a given gengrid widget. More...
 
EOAPI void elm_obj_gengrid_filled_set (Eo *obj, Eina_Bool fill)
 Set how the items grid's filled within a given gengrid widget. More...
 
EOAPI Eina_Bool elm_obj_gengrid_filled_get (const Eo *obj)
 Get how the items grid's filled within a given gengrid widget. More...
 
EOAPI void elm_obj_gengrid_multi_select_set (Eo *obj, Eina_Bool multi)
 Enable or disable multi-selection in a given gengrid widget. More...
 
EOAPI Eina_Bool elm_obj_gengrid_multi_select_get (const Eo *obj)
 Get whether multi-selection is enabled or disabled for a given gengrid widget. More...
 
EOAPI void elm_obj_gengrid_group_item_size_set (Eo *obj, int w, int h)
 Set the size for the group items of a given gengrid widget. More...
 
EOAPI void elm_obj_gengrid_group_item_size_get (const Eo *obj, int *w, int *h)
 Get the size set for the group items of a given gengrid widget. More...
 
EOAPI void elm_obj_gengrid_select_mode_set (Eo *obj, Elm_Object_Select_Mode mode)
 Set the gengrid select mode. More...
 
EOAPI Elm_Object_Select_Mode elm_obj_gengrid_select_mode_get (const Eo *obj)
 Get the gengrid select mode. More...
 
EOAPI void elm_obj_gengrid_reorder_mode_set (Eo *obj, Eina_Bool reorder_mode)
 Set whether a given gengrid widget is or not able have items reordered. More...
 
EOAPI Eina_Bool elm_obj_gengrid_reorder_mode_get (const Eo *obj)
 Get whether a given gengrid widget is or not able have items reordered. More...
 
EOAPI void elm_obj_gengrid_highlight_mode_set (Eo *obj, Eina_Bool highlight)
 Control whether the gengrid items' should be highlighted when item selected. More...
 
EOAPI Eina_Bool elm_obj_gengrid_highlight_mode_get (const Eo *obj)
 Control whether the gengrid items' should be highlighted when item selected. More...
 
EOAPI void elm_obj_gengrid_reorder_type_set (Eo *obj, Elm_Gengrid_Reorder_Type type)
 Set the Gengrid reorder type. More...
 
EOAPI void elm_obj_gengrid_item_size_set (Eo *obj, int w, int h)
 Set the size for the items of a given gengrid widget. More...
 
EOAPI void elm_obj_gengrid_item_size_get (const Eo *obj, int *w, int *h)
 Get the size set for the items of a given gengrid widget. More...
 
EOAPI void elm_obj_gengrid_multi_select_mode_set (Eo *obj, Elm_Object_Multi_Select_Mode mode)
 Set the gengrid multi select mode. More...
 
EOAPI Elm_Object_Multi_Select_Mode elm_obj_gengrid_multi_select_mode_get (const Eo *obj)
 Get the gengrid multi select mode. More...
 
EOAPI void elm_obj_gengrid_horizontal_set (Eo *obj, Eina_Bool horizontal)
 Set the direction in which a given gengrid widget will expand while placing its items. More...
 
EOAPI Eina_Bool elm_obj_gengrid_horizontal_get (const Eo *obj)
 Get for what direction a given gengrid widget will expand while placing its items. More...
 
EOAPI Elm_Widget_Itemelm_obj_gengrid_selected_item_get (const Eo *obj)
 Get the selected item in a given gengrid widget. More...
 
EOAPI Eina_Listelm_obj_gengrid_realized_items_get (const Eo *obj)
 Get a list of realized items in gengrid. More...
 
EOAPI Elm_Widget_Itemelm_obj_gengrid_first_item_get (const Eo *obj)
 Get the first item in a given gengrid widget. More...
 
EOAPI const Eina_Listelm_obj_gengrid_selected_items_get (const Eo *obj)
 Get a list of selected items in a given gengrid. More...
 
EOAPI Elm_Widget_Itemelm_obj_gengrid_last_item_get (const Eo *obj)
 Get the last item in a given gengrid widget. More...
 
EOAPI Elm_Widget_Itemelm_obj_gengrid_item_insert_before (Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data)
 Insert an item before another in a gengrid widget. More...
 
EOAPI void elm_obj_gengrid_realized_items_update (Eo *obj)
 Update the contents of all realized items. More...
 
EOAPI Elm_Widget_Itemelm_obj_gengrid_item_insert_after (Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data)
 Insert an item after another in a gengrid widget. More...
 
EOAPI unsigned int elm_obj_gengrid_items_count (const Eo *obj)
 Return how many items are currently in a list. More...
 
EOAPI Elm_Widget_Itemelm_obj_gengrid_at_xy_item_get (const Eo *obj, int x, int y, int *xposret, int *yposret)
 Get the item that is at the x, y canvas coords. More...
 
EOAPI Elm_Widget_Itemelm_obj_gengrid_item_append (Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data)
 Append a new item in a given gengrid widget. More...
 
EOAPI Elm_Widget_Itemelm_obj_gengrid_item_prepend (Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data)
 Prepend a new item in a given gengrid widget. More...
 
EOAPI void elm_obj_gengrid_clear (Eo *obj)
 Remove all items from a given gengrid widget. More...
 
EOAPI Elm_Widget_Itemelm_obj_gengrid_item_sorted_insert (Eo *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data)
 Insert an item in a gengrid widget using a user-defined sort function. More...
 
EOAPI Elm_Widget_Itemelm_obj_gengrid_search_by_text_item_get (Eo *obj, Elm_Widget_Item *item_to_search_from, const char *part_name, const char *pattern, Elm_Glob_Match_Flags flags)
 Get gengrid item by given string. More...
 
EOAPI void elm_obj_gengrid_reorder_mode_start (Eo *obj, Ecore_Pos_Map tween_mode)
 Starts the reorder mode of Gengrid. More...
 
EOAPI void elm_obj_gengrid_reorder_mode_stop (Eo *obj)
 Stops the reorder mode of Gengrid. More...
 
void elm_gengrid_align_set (Elm_Gengrid *obj, double align_x, double align_y)
 Set the items grid's alignment within a given gengrid widget. More...
 
void elm_gengrid_align_get (const Elm_Gengrid *obj, double *align_x, double *align_y)
 Get the items grid's alignment values within a given gengrid widget. More...
 
void elm_gengrid_filled_set (Elm_Gengrid *obj, Eina_Bool fill)
 Set how the items grid's filled within a given gengrid widget. More...
 
Eina_Bool elm_gengrid_filled_get (const Elm_Gengrid *obj)
 Get how the items grid's filled within a given gengrid widget. More...
 
void elm_gengrid_multi_select_set (Elm_Gengrid *obj, Eina_Bool multi)
 Enable or disable multi-selection in a given gengrid widget. More...
 
Eina_Bool elm_gengrid_multi_select_get (const Elm_Gengrid *obj)
 Get whether multi-selection is enabled or disabled for a given gengrid widget. More...
 
void elm_gengrid_group_item_size_set (Elm_Gengrid *obj, int w, int h)
 Set the size for the group items of a given gengrid widget. More...
 
void elm_gengrid_group_item_size_get (const Elm_Gengrid *obj, int *w, int *h)
 Get the size set for the group items of a given gengrid widget. More...
 
void elm_gengrid_select_mode_set (Elm_Gengrid *obj, Elm_Object_Select_Mode mode)
 Set the gengrid select mode. More...
 
Elm_Object_Select_Mode elm_gengrid_select_mode_get (const Elm_Gengrid *obj)
 Get the gengrid select mode. More...
 
void elm_gengrid_reorder_mode_set (Elm_Gengrid *obj, Eina_Bool reorder_mode)
 Set whether a given gengrid widget is or not able have items reordered. More...
 
Eina_Bool elm_gengrid_reorder_mode_get (const Elm_Gengrid *obj)
 Get whether a given gengrid widget is or not able have items reordered. More...
 
void elm_gengrid_highlight_mode_set (Elm_Gengrid *obj, Eina_Bool highlight)
 Control whether the gengrid items' should be highlighted when item selected. More...
 
Eina_Bool elm_gengrid_highlight_mode_get (const Elm_Gengrid *obj)
 Control whether the gengrid items' should be highlighted when item selected. More...
 
void elm_gengrid_reorder_type_set (Elm_Gengrid *obj, Elm_Gengrid_Reorder_Type type)
 Set the Gengrid reorder type. More...
 
void elm_gengrid_item_size_set (Elm_Gengrid *obj, int w, int h)
 Set the size for the items of a given gengrid widget. More...
 
void elm_gengrid_item_size_get (const Elm_Gengrid *obj, int *w, int *h)
 Get the size set for the items of a given gengrid widget. More...
 
void elm_gengrid_multi_select_mode_set (Elm_Gengrid *obj, Elm_Object_Multi_Select_Mode mode)
 Set the gengrid multi select mode. More...
 
Elm_Object_Multi_Select_Mode elm_gengrid_multi_select_mode_get (const Elm_Gengrid *obj)
 Get the gengrid multi select mode. More...
 
void elm_gengrid_horizontal_set (Elm_Gengrid *obj, Eina_Bool horizontal)
 Set the direction in which a given gengrid widget will expand while placing its items. More...
 
Eina_Bool elm_gengrid_horizontal_get (const Elm_Gengrid *obj)
 Get for what direction a given gengrid widget will expand while placing its items. More...
 
Elm_Widget_Itemelm_gengrid_selected_item_get (const Elm_Gengrid *obj)
 Get the selected item in a given gengrid widget. More...
 
Eina_Listelm_gengrid_realized_items_get (const Elm_Gengrid *obj)
 Get a list of realized items in gengrid. More...
 
Elm_Widget_Itemelm_gengrid_first_item_get (const Elm_Gengrid *obj)
 Get the first item in a given gengrid widget. More...
 
const Eina_Listelm_gengrid_selected_items_get (const Elm_Gengrid *obj)
 Get a list of selected items in a given gengrid. More...
 
Elm_Widget_Itemelm_gengrid_last_item_get (const Elm_Gengrid *obj)
 Get the last item in a given gengrid widget. More...
 
Elm_Widget_Itemelm_gengrid_item_insert_before (Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data)
 Insert an item before another in a gengrid widget. More...
 
void elm_gengrid_realized_items_update (Elm_Gengrid *obj)
 Update the contents of all realized items. More...
 
Elm_Widget_Itemelm_gengrid_item_insert_after (Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Elm_Widget_Item *relative, Evas_Smart_Cb func, const void *func_data)
 Insert an item after another in a gengrid widget. More...
 
unsigned int elm_gengrid_items_count (const Elm_Gengrid *obj)
 Return how many items are currently in a list. More...
 
Elm_Widget_Itemelm_gengrid_at_xy_item_get (const Elm_Gengrid *obj, int x, int y, int *xposret, int *yposret)
 Get the item that is at the x, y canvas coords. More...
 
Elm_Widget_Itemelm_gengrid_item_append (Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data)
 Append a new item in a given gengrid widget. More...
 
Elm_Widget_Itemelm_gengrid_item_prepend (Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Evas_Smart_Cb func, const void *func_data)
 Prepend a new item in a given gengrid widget. More...
 
void elm_gengrid_clear (Elm_Gengrid *obj)
 Remove all items from a given gengrid widget. More...
 
Elm_Widget_Itemelm_gengrid_item_sorted_insert (Elm_Gengrid *obj, const Elm_Gengrid_Item_Class *itc, const void *data, Eina_Compare_Cb comp, Evas_Smart_Cb func, const void *func_data)
 Insert an item in a gengrid widget using a user-defined sort function. More...
 
Elm_Widget_Itemelm_gengrid_search_by_text_item_get (Elm_Gengrid *obj, Elm_Widget_Item *item_to_search_from, const char *part_name, const char *pattern, Elm_Glob_Match_Flags flags)
 Get gengrid item by given string. More...
 
void elm_gengrid_reorder_mode_start (Elm_Gengrid *obj, Ecore_Pos_Map tween_mode)
 Starts the reorder mode of Gengrid. More...
 
void elm_gengrid_reorder_mode_stop (Elm_Gengrid *obj)
 Stops the reorder mode of Gengrid. More...
 
Evas_Objectelm_gengrid_add (Evas_Object *parent)
 Add a new gengrid widget to the given parent Elementary (container) object. More...
 
Elm_Object_Itemelm_gengrid_nth_item_get (const Evas_Object *obj, unsigned int nth)
 Get the nth item, in a given gengrid widget, placed at position nth, in its internal items list. More...
 
EINA_DEPRECATED void elm_gengrid_scroller_policy_set (Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
 Set the scrollbar policy. More...
 
EINA_DEPRECATED void elm_gengrid_scroller_policy_get (const Evas_Object *obj, Elm_Scroller_Policy *policy_h, Elm_Scroller_Policy *policy_v)
 Get the scrollbar policy. More...
 
EINA_DEPRECATED void elm_gengrid_bounce_set (Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
 Enable or disable bouncing effect for a given gengrid widget. More...
 
EINA_DEPRECATED void elm_gengrid_bounce_get (const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce)
 Get whether bouncing effects are enabled or disabled, for a given gengrid widget, on each axis. More...
 
void elm_gengrid_page_size_set (Evas_Object *obj, int h_pagesize, int v_pagesize)
 Set a given gengrid widget's scrolling page size. More...
 
void elm_gengrid_page_relative_set (Evas_Object *obj, double h_pagerel, double v_pagerel)
 Control a given gengrid widget's scrolling page size, relative to its viewport size. More...
 
void elm_gengrid_page_relative_get (const Evas_Object *obj, double *h_pagerel, double *v_pagerel)
 Control a given gengrid widget's scrolling page size, relative to its viewport size. More...
 
void elm_gengrid_wheel_disabled_set (Evas_Object *obj, Eina_Bool disabled)
 Enable or disable mouse wheel to be used to scroll the gengrid. More...
 
Eina_Bool elm_gengrid_wheel_disabled_get (const Evas_Object *obj)
 Get a value whether mouse wheel is enabled or not. More...
 

Detailed Description

This widget aims to position objects in a grid layout while actually creating and rendering only the visible ones, using the same idea as the genlist: the user defines a class for each item, specifying functions that will be called at object creation, deletion, etc. When those items are selected by the user, a callback function is issued. Users may interact with a gengrid via the mouse (by clicking on items to select them and clicking on the grid's viewport and swiping to pan the whole view) or via the keyboard, navigating through item with the arrow keys.

This widget inherits from the Layout one, so that all the functions acting on it also work for gengrid objects.

This widget implements the The Elementary Scrollable Interface interface, so that all (non-deprecated) functions for the base Scroller widget also work for gengrids.

Some calls on the gengrid's API are marked as deprecated, as they just wrap the scrollable widgets counterpart functions. Use the ones we point you to, for each case of deprecation here, instead – eventually the deprecated ones will be discarded (next major release).

Gengrid layouts

Gengrid may layout its items in one of two possible layouts:

When in "horizontal mode", items will be placed in columns, from top to bottom and, when the space for a column is filled, another one is started on the right, thus expanding the grid horizontally, making for horizontal scrolling. When in "vertical mode" , though, items will be placed in rows, from left to right and, when the space for a row is filled, another one is started below, thus expanding the grid vertically (and making for vertical scrolling).

Gengrid items

An item in a gengrid can have 0 or more texts (they can be regular text or textblock Evas objects - that's up to the style to determine), 0 or more contents (which are simply objects swallowed into the gengrid item's theming Edje object) and 0 or more boolean states, which have the behavior left to the user to define. The Edje part names for each of these properties will be looked up, in the theme file for the gengrid, under the Edje (string) data items named "texts", "contents" and "states", respectively. For each of those properties, if more than one part is provided, they must have names listed separated by spaces in the data fields. For the default gengrid item theme, we have one text part ("elm.text"), two content parts ("elm.swallow.icon" and "elm.swallow.end") and no state parts.

A gengrid item may be at one of several styles. Elementary provides one by default - "default", but this can be extended by system or application custom themes/overlays/extensions (see themes for more details).

Gengrid item classes

In order to have the ability to add and delete items on the fly, gengrid implements a class (callback) system where the application provides a structure with information about that type of item (gengrid may contain multiple different items with different classes, states and styles). Gengrid will call the functions in this struct (methods) when an item is "realized" (i.e., created dynamically, while the user is scrolling the grid). All objects will simply be deleted when no longer needed with evas_object_del(). The #Elm_Gengrid_Item_Class structure contains the following members:

Usage hints

If the user wants to have multiple items selected at the same time, elm_gengrid_multi_select_set() will permit it. If the gengrid is single-selection only (the default), then elm_gengrid_select_item_get() will return the selected item or NULL, if none is selected. If the gengrid is under multi-selection, then elm_gengrid_selected_items_get() will return a list (that is only valid as long as no items are modified (added, deleted, selected or unselected) of child items on a gengrid.

If an item changes (internal (boolean) state, text or content changes), then use elm_gengrid_item_update() to have gengrid update the item with the new state. A gengrid will re-"realize" the item, thus calling the functions in the #Elm_Gengrid_Item_Class set for that item.

To programmatically (un)select an item, use elm_gengrid_item_selected_set(). To get its selected state use elm_gengrid_item_selected_get(). To make an item disabled (unable to be selected and appear differently) use elm_object_item_disabled_set() to set this and elm_object_item_disabled_get() to get the disabled state.

Grid cells will only have their selection smart callbacks called when firstly getting selected. Any further clicks will do nothing, unless you enable the "always select mode", with elm_gengrid_select_mode_set() as ELM_OBJECT_SELECT_MODE_ALWAYS, thus making every click to issue selection callbacks. elm_gengrid_select_mode_set() as ELM_OBJECT_SELECT_MODE_NONE will turn off the ability to select items entirely in the widget and they will neither appear selected nor call the selection smart callbacks.

Remember that you can create new styles and add your own theme augmentation per application with elm_theme_extension_add(). If you absolutely must have a specific style that overrides any theme the user or system sets up you can use elm_theme_overlay_add() to add such a file.

Gengrid smart events

This widget emits the following signals, besides the ones sent from Layout :

Supported elm_object common APIs

Supported elm_object_item common APIs

Unsupported elm_object_item common APIs due to the gengrid concept. Gengrid fills content/text according to the appropriate callback functions. Please use elm_gengrid_item_update() instead.

List of gengrid examples:

Macro Definition Documentation

◆ ELM_GENGRID_EVENT_REALIZED

#define ELM_GENGRID_EVENT_REALIZED   (&(_ELM_GENGRID_EVENT_REALIZED))

Called when gengrid realized.

Returns
Efl_Object *

◆ ELM_GENGRID_EVENT_UNREALIZED

#define ELM_GENGRID_EVENT_UNREALIZED   (&(_ELM_GENGRID_EVENT_UNREALIZED))

Called when gengrid unrealized.

Returns
Efl_Object *

◆ ELM_GENGRID_EVENT_INDEX_UPDATE

#define ELM_GENGRID_EVENT_INDEX_UPDATE   (&(_ELM_GENGRID_EVENT_INDEX_UPDATE))

Called on gengrid index update.

Returns
Efl_Object *

◆ ELM_GENGRID_EVENT_ITEM_FOCUSED

#define ELM_GENGRID_EVENT_ITEM_FOCUSED   (&(_ELM_GENGRID_EVENT_ITEM_FOCUSED))

Called when item got focus.

Returns
Efl_Object *

◆ ELM_GENGRID_EVENT_ITEM_UNFOCUSED

#define ELM_GENGRID_EVENT_ITEM_UNFOCUSED   (&(_ELM_GENGRID_EVENT_ITEM_UNFOCUSED))

Called when item no longer has focus.

Returns
Efl_Object *

◆ ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_START

#define ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_START   (&(_ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_START))

Called when item reorder animation started.

Returns
Efl_Object *

◆ ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_STOP

#define ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_STOP   (&(_ELM_GENGRID_EVENT_ITEM_REORDER_ANIM_STOP))

Called when item reorder animation stopped.

Returns
Efl_Object *

◆ ELM_GENGRID_EVENT_ACTIVATED

#define ELM_GENGRID_EVENT_ACTIVATED   (&(_ELM_GENGRID_EVENT_ACTIVATED))

Called when gengrid got activated.

Returns
Efl_Object *

◆ ELM_GENGRID_EVENT_HIGHLIGHTED

#define ELM_GENGRID_EVENT_HIGHLIGHTED   (&(_ELM_GENGRID_EVENT_HIGHLIGHTED))

Called when gengrid is highlighted.

Returns
Efl_Object *

◆ ELM_GENGRID_EVENT_UNHIGHLIGHTED

#define ELM_GENGRID_EVENT_UNHIGHLIGHTED   (&(_ELM_GENGRID_EVENT_UNHIGHLIGHTED))

Called when gengrid is no longer highlighted.

Returns
Efl_Object *

◆ ELM_GENGRID_EVENT_RELEASED

#define ELM_GENGRID_EVENT_RELEASED   (&(_ELM_GENGRID_EVENT_RELEASED))

Called when gengrid is released.

Returns
Efl_Object *

◆ ELM_GENGRID_EVENT_MOVED

#define ELM_GENGRID_EVENT_MOVED   (&(_ELM_GENGRID_EVENT_MOVED))

Called when gengrid item moved.

Returns
Efl_Object *

Enumeration Type Documentation

◆ Elm_Gengrid_Reorder_Type [1/2]

Gengrid reorder modes.

Enumerator
ELM_GENGRID_REORDER_TYPE_NORMAL 

Normal reorder type.

ELM_GENGRID_REORDER_TYPE_SWAP 

Swap reorder type.

ELM_GENGRID_REORDER_TYPE_NORMAL 

Normal reorder type.

ELM_GENGRID_REORDER_TYPE_SWAP 

Swap reorder type.

◆ Elm_Gengrid_Reorder_Type [2/2]

Gengrid reorder modes.

Enumerator
ELM_GENGRID_REORDER_TYPE_NORMAL 

Normal reorder type.

ELM_GENGRID_REORDER_TYPE_SWAP 

Swap reorder type.

ELM_GENGRID_REORDER_TYPE_NORMAL 

Normal reorder type.

ELM_GENGRID_REORDER_TYPE_SWAP 

Swap reorder type.

Function Documentation

◆ elm_gengrid_item_class_new()

Elm_Gengrid_Item_Class * elm_gengrid_item_class_new ( void  )

Add a new gengrid item class in a given gengrid widget.

Returns
New allocated a gengrid item class.

This adds gengrid item class for the gengrid widget. When adding an item, gengrid_item_{append, prepend, insert} function needs item class of the item. Given callback parameters are used at retrieving {text, content} of added item. Set as NULL if it's not used. If there's no available memory, return can be NULL.

See also
elm_gengrid_item_class_free()
elm_gengrid_item_append()

References _Elm_Gen_Item_Class::delete_me, EINA_FALSE, _Elm_Gen_Item_Class::refcount, and _Elm_Gen_Item_Class::version.

◆ elm_gengrid_item_class_free()

void elm_gengrid_item_class_free ( Elm_Gengrid_Item_Class itc)

Remove an item class in a given gengrid widget.

Parameters
itcThe itc to be removed.

This removes item class from the gengrid widget. Whenever it has no more references to it, item class is going to be freed. Otherwise it just decreases its reference count.

See also
elm_gengrid_item_class_new()
elm_gengrid_item_class_ref()
elm_gengrid_item_class_unref()

References _Elm_Gen_Item_Class::delete_me, EINA_TRUE, elm_gengrid_item_class_unref(), _Elm_Gen_Item_Class::refcount, and _Elm_Gen_Item_Class::version.

Referenced by elm_gengrid_item_class_unref().

◆ elm_gengrid_item_class_ref()

void elm_gengrid_item_class_ref ( Elm_Gengrid_Item_Class itc)

Increments object reference count for the item class.

Parameters
itcThe given item class object to reference

This API just increases its reference count for item class management.

See also
elm_gengrid_item_class_unref()

References _Elm_Gen_Item_Class::refcount, and _Elm_Gen_Item_Class::version.

◆ elm_gengrid_item_class_unref()

void elm_gengrid_item_class_unref ( Elm_Gengrid_Item_Class itc)

Decrements object reference count for the item class.

Parameters
itcThe given item class object to reference

This API just decreases its reference count for item class management. Reference count can't be less than 0.

See also
elm_gengrid_item_class_ref()
elm_gengrid_item_class_free()

References _Elm_Gen_Item_Class::delete_me, elm_gengrid_item_class_free(), _Elm_Gen_Item_Class::refcount, and _Elm_Gen_Item_Class::version.

Referenced by elm_gengrid_item_class_free().

◆ elm_gengrid_item_tooltip_text_set()

void elm_gengrid_item_tooltip_text_set ( Elm_Object_Item it,
const char *  text 
)

Set the text to be shown in a given gengrid item's tooltips.

Parameters
itThe gengrid item
textThe text to set in the content

This call will setup the text to be used as tooltip to that item (analogous to elm_object_tooltip_text_set(), but being item tooltips with higher precedence than object tooltips). It can have only one tooltip at a time, so any previous tooltip data will get removed.

In order to set a content or something else as a tooltip, look at elm_gengrid_item_tooltip_content_cb_set().

◆ elm_gengrid_item_tooltip_style_set()

void elm_gengrid_item_tooltip_style_set ( Elm_Object_Item it,
const char *  style 
)

Set a different style for a given gengrid item's tooltip.

Parameters
itgengrid item with tooltip set
stylethe theme style to use on tooltips (e.g. "default", "transparent", etc)

Tooltips can have alternate styles to be displayed on, which are defined by the theme set on Elementary. This function works analogously as elm_object_tooltip_style_set(), but here applied only to gengrid item objects. The default style for tooltips is "default".

Note
before you set a style you should define a tooltip with elm_gengrid_item_tooltip_content_cb_set() or elm_gengrid_item_tooltip_text_set()
See also
elm_gengrid_item_tooltip_style_get()

◆ elm_gengrid_item_tooltip_style_get()

const char * elm_gengrid_item_tooltip_style_get ( const Elm_Object_Item it)

Get the style set a given gengrid item's tooltip.

Parameters
itgengrid item with tooltip already set on.
Returns
style the theme style in use, which defaults to "default". If the object does not have a tooltip set, then NULL is returned.
See also
elm_gengrid_item_tooltip_style_set() for more details

◆ elm_gengrid_item_cursor_get()

const char * elm_gengrid_item_cursor_get ( const Elm_Object_Item it)

Get the type of mouse pointer/cursor decoration set to be shown, when the mouse pointer is over the given gengrid widget item.

Parameters
itgengrid item with custom cursor set
Returns
the cursor type's name or NULL, if no custom cursors were set to item (and on errors)
See also
elm_object_cursor_get()
elm_gengrid_item_cursor_set() for more details
elm_gengrid_item_cursor_unset()

◆ elm_gengrid_item_cursor_unset()

void elm_gengrid_item_cursor_unset ( Elm_Object_Item it)

Unset any custom mouse pointer/cursor decoration set to be shown, when the mouse pointer is over the given gengrid widget item, thus making it show the default cursor again.

Parameters
ita gengrid item

Use this call to undo any custom settings on this item's cursor decoration, bringing it back to defaults (no custom style set).

See also
elm_object_cursor_unset()
elm_gengrid_item_cursor_set() for more details

◆ elm_gengrid_item_cursor_style_set()

void elm_gengrid_item_cursor_style_set ( Elm_Object_Item it,
const char *  style 
)

Set a different style for a given custom cursor set for a gengrid item.

Parameters
itgengrid item with custom cursor set
stylethe theme style to use (e.g. "default", "transparent", etc)

This function only makes sense when one is using custom mouse cursor decorations defined in a theme file , which can have, given a cursor name/type, alternate styles on it. It works analogously as elm_object_cursor_style_set(), but here applied only to gengrid item objects.

Warning
Before you set a cursor style you should have defined a custom cursor previously on the item, with elm_gengrid_item_cursor_set()
See also
elm_gengrid_item_cursor_engine_only_set()
elm_gengrid_item_cursor_style_get()

◆ elm_gengrid_item_cursor_style_get()

const char * elm_gengrid_item_cursor_style_get ( const Elm_Object_Item it)

Get the current style set for a given gengrid item's custom cursor.

Parameters
itgengrid item with custom cursor set.
Returns
style the cursor style in use. If the object does not have a cursor set, then NULL is returned.
See also
elm_gengrid_item_cursor_style_set() for more details

◆ elm_gengrid_item_cursor_engine_only_set()

void elm_gengrid_item_cursor_engine_only_set ( Elm_Object_Item it,
Eina_Bool  engine_only 
)

Set if the (custom) cursor for a given gengrid item should be searched in its theme, also, or should only rely on the rendering engine.

Parameters
ititem with custom (custom) cursor already set on
engine_onlyUse EINA_TRUE to have cursors looked for only on those provided by the rendering engine, EINA_FALSE to have them searched on the widget's theme, as well.
Note
This call is of use only if you've set a custom cursor for gengrid items, with elm_gengrid_item_cursor_set().
By default, cursors will only be looked for between those provided by the rendering engine.

◆ elm_gengrid_item_cursor_engine_only_get()

Eina_Bool elm_gengrid_item_cursor_engine_only_get ( const Elm_Object_Item it)

Get if the (custom) cursor for a given gengrid item is being searched in its theme, also, or is only relying on the rendering engine.

Parameters
ita gengrid item
Returns
EINA_TRUE, if cursors are being looked for only on those provided by the rendering engine, EINA_FALSE if they are being searched on the widget's theme, as well.
See also
elm_gengrid_item_cursor_engine_only_set(), for more details

◆ elm_gengrid_item_pos_get()

void elm_gengrid_item_pos_get ( const Elm_Object_Item it,
unsigned int *  x,
unsigned int *  y 
)

Get a given gengrid item's position, relative to the whole gengrid's grid area.

Parameters
itThe Gengrid item.
xPointer to variable to store the item's row number.
yPointer to variable to store the item's column number.

This returns the "logical" position of the item within the gengrid. For example, (0, 1) would stand for first row, second column.

Examples
gengrid_example.c.

References elm_obj_gengrid_item_pos_get().

◆ elm_gengrid_item_select_mode_set()

void elm_gengrid_item_select_mode_set ( Elm_Object_Item it,
Elm_Object_Select_Mode  mode 
)

Set the gengrid item's select mode.

Parameters
itThe gengrid item object
modeThe select mode

elm_gengrid_select_mode_set() changes item's select mode.

  • ELM_OBJECT_SELECT_MODE_DEFAULT : The item will only call their selection func and callback when first becoming selected. Any further clicks will do nothing, unless you set always select mode.
  • ELM_OBJECT_SELECT_MODE_ALWAYS : This means that, even if selected, every click will make the selected callbacks be called.
  • ELM_OBJECT_SELECT_MODE_NONE : This will turn off the ability to select the item entirely and they will neither appear selected nor call selected callback functions.
  • ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY : This will apply no-finger-size rule with ELM_OBJECT_SELECT_MODE_NONE. No-finger-size rule makes an item can be smaller than lower limit. Clickable objects should be bigger than human touch point device (your finger) for some touch or small screen devices. So it is enabled, the item can be shrink than predefined finger-size value. And the item will be updated.
See also
elm_gengrid_item_select_mode_get()

References elm_obj_gengrid_item_select_mode_set().

◆ elm_gengrid_item_select_mode_get()

Elm_Object_Select_Mode elm_gengrid_item_select_mode_get ( const Elm_Object_Item it)

Get the gengrid item's select mode.

Parameters
itThe gengrid item object
Returns
The select mode (If getting mode is failed, it returns ELM_OBJECT_SELECT_MODE_MAX)
See also
elm_gengrid_item_select_mode_set()

References elm_obj_gengrid_item_select_mode_get().

◆ elm_obj_gengrid_align_set()

EOAPI void elm_obj_gengrid_align_set ( Eo *  obj,
double  align_x,
double  align_y 
)

Set the items grid's alignment within a given gengrid widget.

This sets the alignment of the whole grid of items of a gengrid within its given viewport. By default, those values are both 0.5, meaning that the gengrid will have its items grid placed exactly in the middle of its viewport.

Note
If given alignment values are out of the cited ranges, they'll be changed to the nearest boundary values on the valid ranges.
Parameters
[in]objThe object.
[in]align_xAlignment in the horizontal axis (0 <= align_x <= 1).
[in]align_yAlignment in the vertical axis (0 <= align_y <= 1).

Referenced by elm_gengrid_align_set().

◆ elm_obj_gengrid_align_get()

EOAPI void elm_obj_gengrid_align_get ( const Eo *  obj,
double *  align_x,
double *  align_y 
)

Get the items grid's alignment values within a given gengrid widget.

Note
Use null pointers on the alignment values you're not interested in: they'll be ignored by the function.
Parameters
[in]objThe object.
[out]align_xAlignment in the horizontal axis (0 <= align_x <= 1).
[out]align_yAlignment in the vertical axis (0 <= align_y <= 1).

Referenced by elm_gengrid_align_get().

◆ elm_obj_gengrid_filled_set()

EOAPI void elm_obj_gengrid_filled_set ( Eo *  obj,
Eina_Bool  fill 
)

Set how the items grid's filled within a given gengrid widget.

This sets the fill state of the whole grid of items of a gengrid within its given viewport. By default, this value is false, meaning that if the first line of items grid's isn't filled, the items are centered with the alignment.

Parameters
[in]objThe object.
[in]filltrue if the grid is filled, false otherwise

Referenced by elm_gengrid_filled_set().

◆ elm_obj_gengrid_filled_get()

EOAPI Eina_Bool elm_obj_gengrid_filled_get ( const Eo *  obj)

Get how the items grid's filled within a given gengrid widget.

Note
Use null pointers on the alignment values you're not interested in: they'll be ignored by the function.
Parameters
[in]objThe object.
Returns
true if the grid is filled, false otherwise

Referenced by elm_gengrid_filled_get().

◆ elm_obj_gengrid_multi_select_set()

EOAPI void elm_obj_gengrid_multi_select_set ( Eo *  obj,
Eina_Bool  multi 
)

Enable or disable multi-selection in a given gengrid widget.

Multi-selection is the ability to have more than one item selected, on a given gengrid, simultaneously. When it is enabled, a sequence of clicks on different items will make them all selected, progressively. A click on an already selected item will unselect it. If interacting via the keyboard, multi-selection is enabled while holding the "Shift" key.

Note
By default, multi-selection is disabled on gengrids.
Parameters
[in]objThe object.
[in]multitrue if multislect is enabled, false otherwise

Referenced by elm_gengrid_multi_select_set().

◆ elm_obj_gengrid_multi_select_get()

EOAPI Eina_Bool elm_obj_gengrid_multi_select_get ( const Eo *  obj)

Get whether multi-selection is enabled or disabled for a given gengrid widget.

Parameters
[in]objThe object.
Returns
true if multislect is enabled, false otherwise

Referenced by elm_gengrid_multi_select_get().

◆ elm_obj_gengrid_group_item_size_set()

EOAPI void elm_obj_gengrid_group_item_size_set ( Eo *  obj,
int  w,
int  h 
)

Set the size for the group items of a given gengrid widget.

A gengrid, after creation, has still no information on the size to give to each of its cells. So, you most probably will end up with squares one finger wide, the default size. Use this function to force a custom size for you group items, making them as big as you wish.

Parameters
[in]objThe object.
[in]wThe group items' width.
[in]hThe group items' height.

Referenced by elm_gengrid_group_item_size_set().

◆ elm_obj_gengrid_group_item_size_get()

EOAPI void elm_obj_gengrid_group_item_size_get ( const Eo *  obj,
int *  w,
int *  h 
)

Get the size set for the group items of a given gengrid widget.

Note
Use null pointers on the size values you're not interested in: they'll be ignored by the function.
Parameters
[in]objThe object.
[out]wThe group items' width.
[out]hThe group items' height.

Referenced by elm_gengrid_group_item_size_get().

◆ elm_obj_gengrid_select_mode_set()

EOAPI void elm_obj_gengrid_select_mode_set ( Eo *  obj,
Elm_Object_Select_Mode  mode 
)

Set the gengrid select mode.

This changes item select mode in the gengrid widget. ELM_OBJECT_SELECT_MODE_DEFAULT means that items will only call their selection func and callback when first becoming selected. Any further clicks will do nothing, unless you set always select mode. ELM_OBJECT_SELECT_MODE_ALWAYS means that even if selected, every click will make the selected callbacks be called. ELM_OBJECT_SELECT_MODE_NONE will turn off the ability to select items entirely and they will neither appear selected nor call selected callback functions.

Parameters
[in]objThe object.
[in]modeThe select mode.

Referenced by elm_gengrid_select_mode_set().

◆ elm_obj_gengrid_select_mode_get()

EOAPI Elm_Object_Select_Mode elm_obj_gengrid_select_mode_get ( const Eo *  obj)

Get the gengrid select mode.

Parameters
[in]objThe object.
Returns
The select mode.

Referenced by elm_gengrid_select_mode_get().

◆ elm_obj_gengrid_reorder_mode_set()

EOAPI void elm_obj_gengrid_reorder_mode_set ( Eo *  obj,
Eina_Bool  reorder_mode 
)

Set whether a given gengrid widget is or not able have items reordered.

If a gengrid is set to allow reordering, a click held for more than 0.5 over a given item will highlight it specially, signaling the gengrid has entered the reordering state. From that time on, the user will be able to, while still holding the mouse button down, move the item freely in the gengrid's viewport, replacing to said item to the locations it goes to. The replacements will be animated and, whenever the user releases the mouse button, the item being replaced gets a new definitive place in the grid.

Parameters
[in]objThe object.
[in]reorder_modeUse true to turn reordering on, false to turn it off.

Referenced by elm_gengrid_reorder_mode_set().

◆ elm_obj_gengrid_reorder_mode_get()

EOAPI Eina_Bool elm_obj_gengrid_reorder_mode_get ( const Eo *  obj)

Get whether a given gengrid widget is or not able have items reordered.

Parameters
[in]objThe object.
Returns
Use true to turn reordering on, false to turn it off.

Referenced by elm_gengrid_reorder_mode_get().

◆ elm_obj_gengrid_highlight_mode_set()

EOAPI void elm_obj_gengrid_highlight_mode_set ( Eo *  obj,
Eina_Bool  highlight 
)

Control whether the gengrid items' should be highlighted when item selected.

Parameters
[in]objThe object.
[in]highlighttrue if item will be highlighted, false otherwise

Referenced by elm_gengrid_highlight_mode_set().

◆ elm_obj_gengrid_highlight_mode_get()

EOAPI Eina_Bool elm_obj_gengrid_highlight_mode_get ( const Eo *  obj)

Control whether the gengrid items' should be highlighted when item selected.

Parameters
[in]objThe object.
Returns
true if item will be highlighted, false otherwise

Referenced by elm_gengrid_highlight_mode_get().

◆ elm_obj_gengrid_reorder_type_set()

EOAPI void elm_obj_gengrid_reorder_type_set ( Eo *  obj,
Elm_Gengrid_Reorder_Type  type 
)

Set the Gengrid reorder type.

Parameters
[in]objThe object.
[in]typeReorder type value
Since
1.11

Referenced by elm_gengrid_reorder_type_set().

◆ elm_obj_gengrid_item_size_set()

EOAPI void elm_obj_gengrid_item_size_set ( Eo *  obj,
int  w,
int  h 
)

Set the size for the items of a given gengrid widget.

A gengrid, after creation, has still no information on the size to give to each of its cells. So, you most probably will end up with squares one finger wide, the default size. Use this function to force a custom size for you items, making them as big as you wish.

Parameters
[in]objThe object.
[in]wThe items' width.
[in]hThe items' height.

Referenced by elm_gengrid_item_size_set().

◆ elm_obj_gengrid_item_size_get()

EOAPI void elm_obj_gengrid_item_size_get ( const Eo *  obj,
int *  w,
int *  h 
)

Get the size set for the items of a given gengrid widget.

Note
Use null pointers on the size values you're not interested in: they'll be ignored by the function.
Parameters
[in]objThe object.
[out]wThe items' width.
[out]hThe items' height.

Referenced by elm_gengrid_item_size_get().

◆ elm_obj_gengrid_multi_select_mode_set()

EOAPI void elm_obj_gengrid_multi_select_mode_set ( Eo *  obj,
Elm_Object_Multi_Select_Mode  mode 
)

Set the gengrid multi select mode.

ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT means that select/unselect items whenever each item is clicked. ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL means that only one item will be selected although multi-selection is enabled, if clicked without pressing control key. This mode is only available with multi-selection.

Parameters
[in]objThe object.
[in]modeThe multi select mode.
Since
1.8

Referenced by elm_gengrid_multi_select_mode_set().

◆ elm_obj_gengrid_multi_select_mode_get()

EOAPI Elm_Object_Multi_Select_Mode elm_obj_gengrid_multi_select_mode_get ( const Eo *  obj)

Get the gengrid multi select mode.

If getting mode fails, it returns ELM_OBJECT_MULTI_SELECT_MODE_MAX.

Parameters
[in]objThe object.
Returns
The multi select mode.
Since
1.8

Referenced by elm_gengrid_multi_select_mode_get().

◆ elm_obj_gengrid_horizontal_set()

EOAPI void elm_obj_gengrid_horizontal_set ( Eo *  obj,
Eina_Bool  horizontal 
)

Set the direction in which a given gengrid widget will expand while placing its items.

When in "horizontal mode" ($true), items will be placed in columns, from top to bottom and, when the space for a column is filled, another one is started on the right, thus expanding the grid horizontally. When in "vertical mode" ($false), though, items will be placed in rows, from left to right and, when the space for a row is filled, another one is started below, thus expanding the grid vertically.

Note
By default, gengrid is in vertical mode, false.
Parameters
[in]objThe object.
[in]horizontaltrue to make the gengrid expand horizontally, false to expand vertically.

Referenced by elm_gengrid_horizontal_set().

◆ elm_obj_gengrid_horizontal_get()

EOAPI Eina_Bool elm_obj_gengrid_horizontal_get ( const Eo *  obj)

Get for what direction a given gengrid widget will expand while placing its items.

Parameters
[in]objThe object.
Returns
true to make the gengrid expand horizontally, false to expand vertically.

Referenced by elm_gengrid_horizontal_get().

◆ elm_obj_gengrid_selected_item_get()

EOAPI Elm_Widget_Item * elm_obj_gengrid_selected_item_get ( const Eo *  obj)

Get the selected item in a given gengrid widget.

This returns the selected item in obj. If multi selection is enabled on obj (See elm_obj_gengrid_multi_select_set), only the first item in the list is selected, which might not be very useful. For that case, see elm_obj_gengrid_selected_items_get.

Parameters
[in]objThe object.
Returns
The selected item's handle or null if none is selected at the moment (and on errors).

Referenced by elm_gengrid_selected_item_get().

◆ elm_obj_gengrid_realized_items_get()

EOAPI Eina_List * elm_obj_gengrid_realized_items_get ( const Eo *  obj)

Get a list of realized items in gengrid.

This returns a list of the realized items in the gengrid. The list contains gengrid item pointers. The list must be freed by the caller when done with eina_list_free(). The item pointers in the list are only valid so long as those items are not deleted or the gengrid is not deleted.

Parameters
[in]objThe object.
Returns
The list of realized items or null if none are realized.

Referenced by elm_gengrid_realized_items_get().

◆ elm_obj_gengrid_first_item_get()

EOAPI Elm_Widget_Item * elm_obj_gengrid_first_item_get ( const Eo *  obj)

Get the first item in a given gengrid widget.

This returns the first item in the obj's internal list of items.

Parameters
[in]objThe object.
Returns
The first item's handle or null, if there are no items in obj (and on errors)

Referenced by elm_gengrid_first_item_get().

◆ elm_obj_gengrid_selected_items_get()

EOAPI const Eina_List * elm_obj_gengrid_selected_items_get ( const Eo *  obj)

Get a list of selected items in a given gengrid.

This returns a list of the selected items, in the order that they appear in the grid. This list is only valid as long as no more items are selected or unselected (or unselected implicitly by deletion). The list contains Gengrid item pointers as data, naturally.

Parameters
[in]objThe object.
Returns
The list of selected items or null, if none is selected at the moment (and on errors).

Referenced by elm_gengrid_selected_items_get().

◆ elm_obj_gengrid_last_item_get()

EOAPI Elm_Widget_Item * elm_obj_gengrid_last_item_get ( const Eo *  obj)

Get the last item in a given gengrid widget.

This returns the last item in the obj's internal list of items.

Parameters
[in]objThe object.
Returns
The last item's handle or null if there are no items in obj (and on errors).

Referenced by elm_gengrid_last_item_get().

◆ elm_obj_gengrid_item_insert_before()

EOAPI Elm_Widget_Item * elm_obj_gengrid_item_insert_before ( Eo *  obj,
const Elm_Gengrid_Item_Class itc,
const void *  data,
Elm_Widget_Item relative,
Evas_Smart_Cb  func,
const void *  func_data 
)

Insert an item before another in a gengrid widget.

This inserts an item before another in the gengrid.

Parameters
[in]objThe object.
[in]itcThe item class for the item.
[in]dataThe item data.
[in]relativeThe item to place this new one before.
[in]funcConvenience function called when the item is selected.
[in]func_dataData to be passed to func.
Returns
A handle to the item added or null on errors.

Referenced by elm_gengrid_item_insert_before().

◆ elm_obj_gengrid_realized_items_update()

EOAPI void elm_obj_gengrid_realized_items_update ( Eo *  obj)

Update the contents of all realized items.

This updates all realized items by calling all the item class functions again to get the contents, texts and states. Use this when the original item data has changed and the changes are desired to be reflected.

To update just one item, use elm_gengrid_item_update.

Parameters
[in]objThe object.

Referenced by elm_gengrid_realized_items_update().

◆ elm_obj_gengrid_item_insert_after()

EOAPI Elm_Widget_Item * elm_obj_gengrid_item_insert_after ( Eo *  obj,
const Elm_Gengrid_Item_Class itc,
const void *  data,
Elm_Widget_Item relative,
Evas_Smart_Cb  func,
const void *  func_data 
)

Insert an item after another in a gengrid widget.

This inserts an item after another in the gengrid.

Parameters
[in]objThe object.
[in]itcThe item class for the item.
[in]dataThe item data.
[in]relativeThe item to place this new one after.
[in]funcConvenience function called when the item is selected.
[in]func_dataData to be passed to func.
Returns
A handle to the item added or null on error.

Referenced by elm_gengrid_item_insert_after().

◆ elm_obj_gengrid_items_count()

EOAPI unsigned int elm_obj_gengrid_items_count ( const Eo *  obj)

Return how many items are currently in a list.

This behavior is O(1) and includes items which may or may not be realized.

Parameters
[in]objThe object.
Returns
Items in list

Referenced by elm_gengrid_items_count().

◆ elm_obj_gengrid_at_xy_item_get()

EOAPI Elm_Widget_Item * elm_obj_gengrid_at_xy_item_get ( const Eo *  obj,
int  x,
int  y,
int *  xposret,
int *  yposret 
)

Get the item that is at the x, y canvas coords.

This returns the item at the given coordinates (which are canvas relative, not object-relative). If an item is at that coordinate, that item handle is returned, and if xposret is not null, the integer pointed to is set to a value of -1, 0 or 1, depending if the coordinate is on the left portion of that item (-1), on the middle section (0) or on the right part (1).

If yposret is not null, the integer pointed to is set to a value of -1, 0 or 1, depending if the coordinate is on the upper portion of that item (-1), on the middle section (0) or on the lower part (1). If NULL is returned as an item (no item found there), then posret may indicate -1 or 1 based if the coordinate is above or below all items respectively in the gengrid.

Parameters
[in]objThe object.
[in]xThe input x coordinate.
[in]yThe input y coordinate.
[out]xposretThe position relative to the item returned here.
[out]yposretThe position relative to the item returned here.
Returns
The item at the coordinates or null if none.

Referenced by elm_gengrid_at_xy_item_get().

◆ elm_obj_gengrid_item_append()

EOAPI Elm_Widget_Item * elm_obj_gengrid_item_append ( Eo *  obj,
const Elm_Gengrid_Item_Class itc,
const void *  data,
Evas_Smart_Cb  func,
const void *  func_data 
)

Append a new item in a given gengrid widget.

This adds an item to the beginning of the gengrid.

Parameters
[in]objThe object.
[in]itcThe item class for the item.
[in]dataThe item data.
[in]funcConvenience function called when the item is selected.
[in]func_dataData to be passed to func.
Returns
A handle to the item added or null on errors.

Referenced by elm_gengrid_item_append().

◆ elm_obj_gengrid_item_prepend()

EOAPI Elm_Widget_Item * elm_obj_gengrid_item_prepend ( Eo *  obj,
const Elm_Gengrid_Item_Class itc,
const void *  data,
Evas_Smart_Cb  func,
const void *  func_data 
)

Prepend a new item in a given gengrid widget.

This adds an item to the end of the gengrid.

Parameters
[in]objThe object.
[in]itcThe item class for the item.
[in]dataThe item data.
[in]funcConvenience function called when the item is selected.
[in]func_dataData to be passed to func.
Returns
A handle to the item added or null on errors.

Referenced by elm_gengrid_item_prepend().

◆ elm_obj_gengrid_clear()

EOAPI void elm_obj_gengrid_clear ( Eo *  obj)

Remove all items from a given gengrid widget.

This removes (and deletes) all items in obj, leaving it empty.

See elm_gengrid_item_del to remove just one item.

Parameters
[in]objThe object.

Referenced by elm_gengrid_clear().

◆ elm_obj_gengrid_item_sorted_insert()

EOAPI Elm_Widget_Item * elm_obj_gengrid_item_sorted_insert ( Eo *  obj,
const Elm_Gengrid_Item_Class itc,
const void *  data,
Eina_Compare_Cb  comp,
Evas_Smart_Cb  func,
const void *  func_data 
)

Insert an item in a gengrid widget using a user-defined sort function.

This inserts an item in the gengrid based on user defined comparison function. The two arguments passed to the function func are gengrid item handles to compare.

Parameters
[in]objThe object.
[in]itcThe item class for the item.
[in]dataThe item data.
[in]compUser defined comparison function that defines the sort order based on gengrid item and its data.
[in]funcConvenience function called when the item is selected.
[in]func_dataData to be passed to func.
Returns
A handle to the item added or null on errors.

Referenced by elm_gengrid_item_sorted_insert().

◆ elm_obj_gengrid_search_by_text_item_get()

EOAPI Elm_Widget_Item * elm_obj_gengrid_search_by_text_item_get ( Eo *  obj,
Elm_Widget_Item item_to_search_from,
const char *  part_name,
const char *  pattern,
Elm_Glob_Match_Flags  flags 
)

Get gengrid item by given string.

It takes pointer to the gengrid item that will be used to start search from it.

This function uses globs (like "*.jpg") for searching and takes search flags as last parameter That is a bitfield with values to be ored together or 0 for no flags.

Parameters
[in]objThe object.
[in]item_to_search_fromPointer to item to start search from. If null, search will be started from the first item of the gengrid.
[in]part_nameName of the TEXT part of gengrid item to search string in. If null, search by "elm.text" parts.
[in]patternThe search pattern.
[in]flagsSearch flags.
Returns
Pointer to the gengrid item which matches search_string in case of success, otherwise null.
Since
1.11

Referenced by elm_gengrid_search_by_text_item_get().

◆ elm_obj_gengrid_reorder_mode_start()

EOAPI void elm_obj_gengrid_reorder_mode_start ( Eo *  obj,
Ecore_Pos_Map  tween_mode 
)

Starts the reorder mode of Gengrid.

Parameters
[in]objThe object.
[in]tween_modePosition mappings for animation
Since
1.10

Referenced by elm_gengrid_reorder_mode_start().

◆ elm_obj_gengrid_reorder_mode_stop()

EOAPI void elm_obj_gengrid_reorder_mode_stop ( Eo *  obj)

Stops the reorder mode of Gengrid.

Since
1.10

Referenced by elm_gengrid_reorder_mode_stop().

◆ elm_gengrid_align_set()

void elm_gengrid_align_set ( Elm_Gengrid *  obj,
double  align_x,
double  align_y 
)

Set the items grid's alignment within a given gengrid widget.

This sets the alignment of the whole grid of items of a gengrid within its given viewport. By default, those values are both 0.5, meaning that the gengrid will have its items grid placed exactly in the middle of its viewport.

Note
If given alignment values are out of the cited ranges, they'll be changed to the nearest boundary values on the valid ranges.
Parameters
[in]objThe object.
[in]align_xAlignment in the horizontal axis (0 <= align_x <= 1).
[in]align_yAlignment in the vertical axis (0 <= align_y <= 1).

References elm_obj_gengrid_align_set().

◆ elm_gengrid_align_get()

void elm_gengrid_align_get ( const Elm_Gengrid *  obj,
double *  align_x,
double *  align_y 
)

Get the items grid's alignment values within a given gengrid widget.

Note
Use null pointers on the alignment values you're not interested in: they'll be ignored by the function.
Parameters
[in]objThe object.
[out]align_xAlignment in the horizontal axis (0 <= align_x <= 1).
[out]align_yAlignment in the vertical axis (0 <= align_y <= 1).

References elm_obj_gengrid_align_get().

◆ elm_gengrid_filled_set()

void elm_gengrid_filled_set ( Elm_Gengrid *  obj,
Eina_Bool  fill 
)

Set how the items grid's filled within a given gengrid widget.

This sets the fill state of the whole grid of items of a gengrid within its given viewport. By default, this value is false, meaning that if the first line of items grid's isn't filled, the items are centered with the alignment.

Parameters
[in]objThe object.
[in]filltrue if the grid is filled, false otherwise

References elm_obj_gengrid_filled_set().

◆ elm_gengrid_filled_get()

Eina_Bool elm_gengrid_filled_get ( const Elm_Gengrid *  obj)

Get how the items grid's filled within a given gengrid widget.

Note
Use null pointers on the alignment values you're not interested in: they'll be ignored by the function.
Parameters
[in]objThe object.
Returns
true if the grid is filled, false otherwise

References elm_obj_gengrid_filled_get().

◆ elm_gengrid_multi_select_set()

void elm_gengrid_multi_select_set ( Elm_Gengrid *  obj,
Eina_Bool  multi 
)

Enable or disable multi-selection in a given gengrid widget.

Multi-selection is the ability to have more than one item selected, on a given gengrid, simultaneously. When it is enabled, a sequence of clicks on different items will make them all selected, progressively. A click on an already selected item will unselect it. If interacting via the keyboard, multi-selection is enabled while holding the "Shift" key.

Note
By default, multi-selection is disabled on gengrids.
Parameters
[in]objThe object.
[in]multitrue if multislect is enabled, false otherwise

References elm_obj_gengrid_multi_select_set().

◆ elm_gengrid_multi_select_get()

Eina_Bool elm_gengrid_multi_select_get ( const Elm_Gengrid *  obj)

Get whether multi-selection is enabled or disabled for a given gengrid widget.

Parameters
[in]objThe object.
Returns
true if multislect is enabled, false otherwise

References elm_obj_gengrid_multi_select_get().

◆ elm_gengrid_group_item_size_set()

void elm_gengrid_group_item_size_set ( Elm_Gengrid *  obj,
int  w,
int  h 
)

Set the size for the group items of a given gengrid widget.

A gengrid, after creation, has still no information on the size to give to each of its cells. So, you most probably will end up with squares one finger wide, the default size. Use this function to force a custom size for you group items, making them as big as you wish.

Parameters
[in]objThe object.
[in]wThe group items' width.
[in]hThe group items' height.

References elm_obj_gengrid_group_item_size_set().

◆ elm_gengrid_group_item_size_get()

void elm_gengrid_group_item_size_get ( const Elm_Gengrid *  obj,
int *  w,
int *  h 
)

Get the size set for the group items of a given gengrid widget.

Note
Use null pointers on the size values you're not interested in: they'll be ignored by the function.
Parameters
[in]objThe object.
[out]wThe group items' width.
[out]hThe group items' height.

References elm_obj_gengrid_group_item_size_get().

◆ elm_gengrid_select_mode_set()

void elm_gengrid_select_mode_set ( Elm_Gengrid *  obj,
Elm_Object_Select_Mode  mode 
)

Set the gengrid select mode.

This changes item select mode in the gengrid widget. ELM_OBJECT_SELECT_MODE_DEFAULT means that items will only call their selection func and callback when first becoming selected. Any further clicks will do nothing, unless you set always select mode. ELM_OBJECT_SELECT_MODE_ALWAYS means that even if selected, every click will make the selected callbacks be called. ELM_OBJECT_SELECT_MODE_NONE will turn off the ability to select items entirely and they will neither appear selected nor call selected callback functions.

Parameters
[in]objThe object.
[in]modeThe select mode.

References elm_obj_gengrid_select_mode_set().

◆ elm_gengrid_select_mode_get()

Elm_Object_Select_Mode elm_gengrid_select_mode_get ( const Elm_Gengrid *  obj)

Get the gengrid select mode.

Parameters
[in]objThe object.
Returns
The select mode.

References elm_obj_gengrid_select_mode_get().

◆ elm_gengrid_reorder_mode_set()

void elm_gengrid_reorder_mode_set ( Elm_Gengrid *  obj,
Eina_Bool  reorder_mode 
)

Set whether a given gengrid widget is or not able have items reordered.

If a gengrid is set to allow reordering, a click held for more than 0.5 over a given item will highlight it specially, signaling the gengrid has entered the reordering state. From that time on, the user will be able to, while still holding the mouse button down, move the item freely in the gengrid's viewport, replacing to said item to the locations it goes to. The replacements will be animated and, whenever the user releases the mouse button, the item being replaced gets a new definitive place in the grid.

Parameters
[in]objThe object.
[in]reorder_modeUse true to turn reordering on, false to turn it off.

References elm_obj_gengrid_reorder_mode_set().

◆ elm_gengrid_reorder_mode_get()

Eina_Bool elm_gengrid_reorder_mode_get ( const Elm_Gengrid *  obj)

Get whether a given gengrid widget is or not able have items reordered.

Parameters
[in]objThe object.
Returns
Use true to turn reordering on, false to turn it off.

References elm_obj_gengrid_reorder_mode_get().

◆ elm_gengrid_highlight_mode_set()

void elm_gengrid_highlight_mode_set ( Elm_Gengrid *  obj,
Eina_Bool  highlight 
)

Control whether the gengrid items' should be highlighted when item selected.

Parameters
[in]objThe object.
[in]highlighttrue if item will be highlighted, false otherwise

References elm_obj_gengrid_highlight_mode_set().

◆ elm_gengrid_highlight_mode_get()

Eina_Bool elm_gengrid_highlight_mode_get ( const Elm_Gengrid *  obj)

Control whether the gengrid items' should be highlighted when item selected.

Parameters
[in]objThe object.
Returns
true if item will be highlighted, false otherwise

References elm_obj_gengrid_highlight_mode_get().

◆ elm_gengrid_reorder_type_set()

void elm_gengrid_reorder_type_set ( Elm_Gengrid *  obj,
Elm_Gengrid_Reorder_Type  type 
)

Set the Gengrid reorder type.

Parameters
[in]objThe object.
[in]typeReorder type value
Since
1.11

References elm_obj_gengrid_reorder_type_set().

◆ elm_gengrid_item_size_set()

void elm_gengrid_item_size_set ( Elm_Gengrid *  obj,
int  w,
int  h 
)

Set the size for the items of a given gengrid widget.

A gengrid, after creation, has still no information on the size to give to each of its cells. So, you most probably will end up with squares one finger wide, the default size. Use this function to force a custom size for you items, making them as big as you wish.

Parameters
[in]objThe object.
[in]wThe items' width.
[in]hThe items' height.

References elm_obj_gengrid_item_size_set().

◆ elm_gengrid_item_size_get()

void elm_gengrid_item_size_get ( const Elm_Gengrid *  obj,
int *  w,
int *  h 
)

Get the size set for the items of a given gengrid widget.

Note
Use null pointers on the size values you're not interested in: they'll be ignored by the function.
Parameters
[in]objThe object.
[out]wThe items' width.
[out]hThe items' height.

References elm_obj_gengrid_item_size_get().

◆ elm_gengrid_multi_select_mode_set()

void elm_gengrid_multi_select_mode_set ( Elm_Gengrid *  obj,
Elm_Object_Multi_Select_Mode  mode 
)

Set the gengrid multi select mode.

ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT means that select/unselect items whenever each item is clicked. ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL means that only one item will be selected although multi-selection is enabled, if clicked without pressing control key. This mode is only available with multi-selection.

Parameters
[in]objThe object.
[in]modeThe multi select mode.
Since
1.8

References elm_obj_gengrid_multi_select_mode_set().

◆ elm_gengrid_multi_select_mode_get()

Elm_Object_Multi_Select_Mode elm_gengrid_multi_select_mode_get ( const Elm_Gengrid *  obj)

Get the gengrid multi select mode.

If getting mode fails, it returns ELM_OBJECT_MULTI_SELECT_MODE_MAX.

Parameters
[in]objThe object.
Returns
The multi select mode.
Since
1.8

References elm_obj_gengrid_multi_select_mode_get().

◆ elm_gengrid_horizontal_set()

void elm_gengrid_horizontal_set ( Elm_Gengrid *  obj,
Eina_Bool  horizontal 
)

Set the direction in which a given gengrid widget will expand while placing its items.

When in "horizontal mode" ($true), items will be placed in columns, from top to bottom and, when the space for a column is filled, another one is started on the right, thus expanding the grid horizontally. When in "vertical mode" ($false), though, items will be placed in rows, from left to right and, when the space for a row is filled, another one is started below, thus expanding the grid vertically.

Note
By default, gengrid is in vertical mode, false.
Parameters
[in]objThe object.
[in]horizontaltrue to make the gengrid expand horizontally, false to expand vertically.

References elm_obj_gengrid_horizontal_set().

◆ elm_gengrid_horizontal_get()

Eina_Bool elm_gengrid_horizontal_get ( const Elm_Gengrid *  obj)

Get for what direction a given gengrid widget will expand while placing its items.

Parameters
[in]objThe object.
Returns
true to make the gengrid expand horizontally, false to expand vertically.

References elm_obj_gengrid_horizontal_get().

◆ elm_gengrid_selected_item_get()

Elm_Widget_Item * elm_gengrid_selected_item_get ( const Elm_Gengrid *  obj)

Get the selected item in a given gengrid widget.

This returns the selected item in obj. If multi selection is enabled on obj (See elm_gengrid_multi_select_set), only the first item in the list is selected, which might not be very useful. For that case, see elm_gengrid_selected_items_get.

Parameters
[in]objThe object.
Returns
The selected item's handle or null if none is selected at the moment (and on errors).

References elm_obj_gengrid_selected_item_get().

◆ elm_gengrid_realized_items_get()

Eina_List * elm_gengrid_realized_items_get ( const Elm_Gengrid *  obj)

Get a list of realized items in gengrid.

This returns a list of the realized items in the gengrid. The list contains gengrid item pointers. The list must be freed by the caller when done with eina_list_free(). The item pointers in the list are only valid so long as those items are not deleted or the gengrid is not deleted.

Parameters
[in]objThe object.
Returns
The list of realized items or null if none are realized.

References elm_obj_gengrid_realized_items_get().

◆ elm_gengrid_first_item_get()

Elm_Widget_Item * elm_gengrid_first_item_get ( const Elm_Gengrid *  obj)

Get the first item in a given gengrid widget.

This returns the first item in the obj's internal list of items.

Parameters
[in]objThe object.
Returns
The first item's handle or null, if there are no items in obj (and on errors)

References elm_obj_gengrid_first_item_get().

◆ elm_gengrid_selected_items_get()

const Eina_List * elm_gengrid_selected_items_get ( const Elm_Gengrid *  obj)

Get a list of selected items in a given gengrid.

This returns a list of the selected items, in the order that they appear in the grid. This list is only valid as long as no more items are selected or unselected (or unselected implicitly by deletion). The list contains Gengrid item pointers as data, naturally.

Parameters
[in]objThe object.
Returns
The list of selected items or null, if none is selected at the moment (and on errors).

References elm_obj_gengrid_selected_items_get().

◆ elm_gengrid_last_item_get()

Elm_Widget_Item * elm_gengrid_last_item_get ( const Elm_Gengrid *  obj)

Get the last item in a given gengrid widget.

This returns the last item in the obj's internal list of items.

Parameters
[in]objThe object.
Returns
The last item's handle or null if there are no items in obj (and on errors).

References elm_obj_gengrid_last_item_get().

◆ elm_gengrid_item_insert_before()

Elm_Widget_Item * elm_gengrid_item_insert_before ( Elm_Gengrid *  obj,
const Elm_Gengrid_Item_Class itc,
const void *  data,
Elm_Widget_Item relative,
Evas_Smart_Cb  func,
const void *  func_data 
)

Insert an item before another in a gengrid widget.

This inserts an item before another in the gengrid.

Parameters
[in]objThe object.
[in]itcThe item class for the item.
[in]dataThe item data.
[in]relativeThe item to place this new one before.
[in]funcConvenience function called when the item is selected.
[in]func_dataData to be passed to func.
Returns
A handle to the item added or null on errors.

References elm_obj_gengrid_item_insert_before().

◆ elm_gengrid_realized_items_update()

void elm_gengrid_realized_items_update ( Elm_Gengrid *  obj)

Update the contents of all realized items.

This updates all realized items by calling all the item class functions again to get the contents, texts and states. Use this when the original item data has changed and the changes are desired to be reflected.

To update just one item, use elm_gengrid_item_update.

Parameters
[in]objThe object.

References elm_obj_gengrid_realized_items_update().

◆ elm_gengrid_item_insert_after()

Elm_Widget_Item * elm_gengrid_item_insert_after ( Elm_Gengrid *  obj,
const Elm_Gengrid_Item_Class itc,
const void *  data,
Elm_Widget_Item relative,
Evas_Smart_Cb  func,
const void *  func_data 
)

Insert an item after another in a gengrid widget.

This inserts an item after another in the gengrid.

Parameters
[in]objThe object.
[in]itcThe item class for the item.
[in]dataThe item data.
[in]relativeThe item to place this new one after.
[in]funcConvenience function called when the item is selected.
[in]func_dataData to be passed to func.
Returns
A handle to the item added or null on error.

References elm_obj_gengrid_item_insert_after().

◆ elm_gengrid_items_count()

unsigned int elm_gengrid_items_count ( const Elm_Gengrid *  obj)

Return how many items are currently in a list.

This behavior is O(1) and includes items which may or may not be realized.

Parameters
[in]objThe object.
Returns
Items in list

References elm_obj_gengrid_items_count().

◆ elm_gengrid_at_xy_item_get()

Elm_Widget_Item * elm_gengrid_at_xy_item_get ( const Elm_Gengrid *  obj,
int  x,
int  y,
int *  xposret,
int *  yposret 
)

Get the item that is at the x, y canvas coords.

This returns the item at the given coordinates (which are canvas relative, not object-relative). If an item is at that coordinate, that item handle is returned, and if xposret is not null, the integer pointed to is set to a value of -1, 0 or 1, depending if the coordinate is on the left portion of that item (-1), on the middle section (0) or on the right part (1).

If yposret is not null, the integer pointed to is set to a value of -1, 0 or 1, depending if the coordinate is on the upper portion of that item (-1), on the middle section (0) or on the lower part (1). If NULL is returned as an item (no item found there), then posret may indicate -1 or 1 based if the coordinate is above or below all items respectively in the gengrid.

Parameters
[in]objThe object.
[in]xThe input x coordinate.
[in]yThe input y coordinate.
[out]xposretThe position relative to the item returned here.
[out]yposretThe position relative to the item returned here.
Returns
The item at the coordinates or null if none.

References elm_obj_gengrid_at_xy_item_get().

◆ elm_gengrid_item_append()

Elm_Widget_Item * elm_gengrid_item_append ( Elm_Gengrid *  obj,
const Elm_Gengrid_Item_Class itc,
const void *  data,
Evas_Smart_Cb  func,
const void *  func_data 
)

Append a new item in a given gengrid widget.

This adds an item to the beginning of the gengrid.

Parameters
[in]objThe object.
[in]itcThe item class for the item.
[in]dataThe item data.
[in]funcConvenience function called when the item is selected.
[in]func_dataData to be passed to func.
Returns
A handle to the item added or null on errors.

References elm_obj_gengrid_item_append().

◆ elm_gengrid_item_prepend()

Elm_Widget_Item * elm_gengrid_item_prepend ( Elm_Gengrid *  obj,
const Elm_Gengrid_Item_Class itc,
const void *  data,
Evas_Smart_Cb  func,
const void *  func_data 
)

Prepend a new item in a given gengrid widget.

This adds an item to the end of the gengrid.

Parameters
[in]objThe object.
[in]itcThe item class for the item.
[in]dataThe item data.
[in]funcConvenience function called when the item is selected.
[in]func_dataData to be passed to func.
Returns
A handle to the item added or null on errors.

References elm_obj_gengrid_item_prepend().

◆ elm_gengrid_clear()

void elm_gengrid_clear ( Elm_Gengrid *  obj)

Remove all items from a given gengrid widget.

This removes (and deletes) all items in obj, leaving it empty.

See elm_gengrid_item_del to remove just one item.

Parameters
[in]objThe object.

References elm_obj_gengrid_clear().

◆ elm_gengrid_item_sorted_insert()

Elm_Widget_Item * elm_gengrid_item_sorted_insert ( Elm_Gengrid *  obj,
const Elm_Gengrid_Item_Class itc,
const void *  data,
Eina_Compare_Cb  comp,
Evas_Smart_Cb  func,
const void *  func_data 
)

Insert an item in a gengrid widget using a user-defined sort function.

This inserts an item in the gengrid based on user defined comparison function. The two arguments passed to the function func are gengrid item handles to compare.

Parameters
[in]objThe object.
[in]itcThe item class for the item.
[in]dataThe item data.
[in]compUser defined comparison function that defines the sort order based on gengrid item and its data.
[in]funcConvenience function called when the item is selected.
[in]func_dataData to be passed to func.
Returns
A handle to the item added or null on errors.

References elm_obj_gengrid_item_sorted_insert().

◆ elm_gengrid_search_by_text_item_get()

Elm_Widget_Item * elm_gengrid_search_by_text_item_get ( Elm_Gengrid *  obj,
Elm_Widget_Item item_to_search_from,
const char *  part_name,
const char *  pattern,
Elm_Glob_Match_Flags  flags 
)

Get gengrid item by given string.

It takes pointer to the gengrid item that will be used to start search from it.

This function uses globs (like "*.jpg") for searching and takes search flags as last parameter That is a bitfield with values to be ored together or 0 for no flags.

Parameters
[in]objThe object.
[in]item_to_search_fromPointer to item to start search from. If null, search will be started from the first item of the gengrid.
[in]part_nameName of the TEXT part of gengrid item to search string in. If null, search by "elm.text" parts.
[in]patternThe search pattern.
[in]flagsSearch flags.
Returns
Pointer to the gengrid item which matches search_string in case of success, otherwise null.
Since
1.11

References elm_obj_gengrid_search_by_text_item_get().

◆ elm_gengrid_reorder_mode_start()

void elm_gengrid_reorder_mode_start ( Elm_Gengrid *  obj,
Ecore_Pos_Map  tween_mode 
)

Starts the reorder mode of Gengrid.

Parameters
[in]objThe object.
[in]tween_modePosition mappings for animation
Since
1.10

References elm_obj_gengrid_reorder_mode_start().

◆ elm_gengrid_reorder_mode_stop()

void elm_gengrid_reorder_mode_stop ( Elm_Gengrid *  obj)

Stops the reorder mode of Gengrid.

Since
1.10

References elm_obj_gengrid_reorder_mode_stop().

◆ elm_gengrid_add()

Evas_Object * elm_gengrid_add ( Evas_Object parent)

Add a new gengrid widget to the given parent Elementary (container) object.

Parameters
parentThe parent object
Returns
a new gengrid widget handle or NULL, on errors

This function inserts a new gengrid widget on the canvas.

See also
elm_gengrid_item_size_set()
elm_gengrid_group_item_size_set()
elm_gengrid_horizontal_set()
elm_gengrid_item_append()
elm_object_item_del()
elm_gengrid_clear()

References EINA_SAFETY_ON_NULL_RETURN_VAL.

◆ elm_gengrid_nth_item_get()

Elm_Object_Item * elm_gengrid_nth_item_get ( const Evas_Object obj,
unsigned int  nth 
)

Get the nth item, in a given gengrid widget, placed at position nth, in its internal items list.

Parameters
objThe gengrid object
nthThe number of the item to grab (0 being the first)
Returns
The item stored in obj at position nth or NULL, if there's no item with that index (and on errors)
Since
1.8

References eina_accessor_data_get(), eina_accessor_free(), and eina_inlist_accessor_new().

◆ elm_gengrid_scroller_policy_set()

EINA_DEPRECATED void elm_gengrid_scroller_policy_set ( Evas_Object obj,
Elm_Scroller_Policy  policy_h,
Elm_Scroller_Policy  policy_v 
)

Set the scrollbar policy.

Parameters
objThe gengrid object
policy_hHorizontal scrollbar policy.
policy_vVertical scrollbar policy.

This sets the scrollbar visibility policy for the given gengrid scroller. ELM_SCROLLER_POLICY_AUTO means the scrollbar is made visible if it is needed, and otherwise kept hidden. ELM_SCROLLER_POLICY_ON turns it on all the time, and ELM_SCROLLER_POLICY_OFF always keeps it off. This applies respectively for the horizontal and vertical scrollbars. Default is ELM_SCROLLER_POLICY_AUTO.

Deprecated:
Use elm_scroller_policy_set() instead.
See also
elm_scroller_policy_set()
elm_gengrid_scroller_policy_get()

◆ elm_gengrid_scroller_policy_get()

EINA_DEPRECATED void elm_gengrid_scroller_policy_get ( const Evas_Object obj,
Elm_Scroller_Policy policy_h,
Elm_Scroller_Policy policy_v 
)

Get the scrollbar policy.

Parameters
objThe gengrid object
policy_hPointer to store the horizontal scrollbar policy.
policy_vPointer to store the vertical scrollbar policy.
Deprecated:
Use elm_scroller_policy_get() instead.
See also
elm_scroller_policy_get()
elm_gengrid_scroller_policy_set()

◆ elm_gengrid_bounce_set()

EINA_DEPRECATED void elm_gengrid_bounce_set ( Evas_Object obj,
Eina_Bool  h_bounce,
Eina_Bool  v_bounce 
)

Enable or disable bouncing effect for a given gengrid widget.

Parameters
objThe gengrid object
h_bounceEINA_TRUE, to enable horizontal bouncing, EINA_FALSE to disable it
v_bounceEINA_TRUE, to enable vertical bouncing, EINA_FALSE to disable it

The bouncing effect occurs whenever one reaches the gengrid's edge's while panning it – it will scroll past its limits a little bit and return to the edge again, in a animated for, automatically.

Note
By default, gengrids have bouncing enabled on both axis
Deprecated:
Use elm_scroller_bounce_set() instead.
See also
elm_scroller_bounce_set()

◆ elm_gengrid_bounce_get()

EINA_DEPRECATED void elm_gengrid_bounce_get ( const Evas_Object obj,
Eina_Bool h_bounce,
Eina_Bool v_bounce 
)

Get whether bouncing effects are enabled or disabled, for a given gengrid widget, on each axis.

Parameters
objThe gengrid object
h_bouncePointer to a variable where to store the horizontal bouncing flag.
v_bouncePointer to a variable where to store the vertical bouncing flag.
Deprecated:
Use elm_scroller_bounce_get() instead.
See also
elm_scroller_bounce_get()

◆ elm_gengrid_page_size_set()

void elm_gengrid_page_size_set ( Evas_Object obj,
int  h_pagesize,
int  v_pagesize 
)

Set a given gengrid widget's scrolling page size.

Parameters
[in]objThe object.
[in]h_pagesizePage size horizontal
[in]v_pagesizePage size vertical

◆ elm_gengrid_page_relative_set()

void elm_gengrid_page_relative_set ( Evas_Object obj,
double  h_pagerel,
double  v_pagerel 
)

Control a given gengrid widget's scrolling page size, relative to its viewport size.

Parameters
[in]objThe object.
[in]h_pagerelPage relation horizontal
[in]v_pagerelPage relation vertical

◆ elm_gengrid_page_relative_get()

void elm_gengrid_page_relative_get ( const Evas_Object obj,
double *  h_pagerel,
double *  v_pagerel 
)

Control a given gengrid widget's scrolling page size, relative to its viewport size.

Parameters
[in]objThe object.
[out]h_pagerelPage relation horizontal
[out]v_pagerelPage relation vertical

◆ elm_gengrid_wheel_disabled_set()

void elm_gengrid_wheel_disabled_set ( Evas_Object obj,
Eina_Bool  disabled 
)

Enable or disable mouse wheel to be used to scroll the gengrid.

Mouse wheel can be used for the user to scroll up and down the gengrid.

Wheel is enabled by default.

Parameters
[in]objThe object.
[in]disabledUse true to disable mouse wheel or false to enable it.

◆ elm_gengrid_wheel_disabled_get()

Eina_Bool elm_gengrid_wheel_disabled_get ( const Evas_Object obj)

Get a value whether mouse wheel is enabled or not.

Mouse wheel can be used for the user to scroll up and down the gengrid.

Parameters
[in]objThe object.
Returns
Use true to disable mouse wheel or false to enable it.