- Elementary
- Main
- Authors
- Examples
- Files
- Pages
- Types
- Modules

Macros | Functions
Hoversel

## Macros
#define | elm_obj_hoversel_hover_parent_set(parent) ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_HOVER_PARENT_SET), EO_TYPECHECK(Evas_Object *, parent)
| Set the Hover parent. More...
#define | elm_obj_hoversel_hover_parent_get(ret) ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_HOVER_PARENT_GET), EO_TYPECHECK(Evas_Object **, ret)
| Get the Hover parent. More...
#define | elm_obj_hoversel_horizontal_set(horizontal) ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_HORIZONTAL_SET), EO_TYPECHECK(Eina_Bool, horizontal)
| This sets the hoversel to expand horizontally. More...
#define | elm_obj_hoversel_horizontal_get(ret) ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_HORIZONTAL_GET), EO_TYPECHECK(Eina_Bool *, ret)
| This returns whether the hoversel is set to expand horizontally. More...
#define | elm_obj_hoversel_hover_begin() ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_HOVER_BEGIN)
| This triggers the hoversel popup from code, the same as if the user had clicked the button. More...
#define | elm_obj_hoversel_hover_end() ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_HOVER_END)
| This dismisses the hoversel popup as if the user had clicked outside the hover. More...
#define | elm_obj_hoversel_expanded_get(ret) ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_EXPANDED_GET), EO_TYPECHECK(Eina_Bool *, ret)
| Returns whether the hoversel is expanded. More...
#define | elm_obj_hoversel_clear() ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_CLEAR)
| This will remove all the children items from the hoversel. More...
#define | elm_obj_hoversel_items_get(ret) ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret)
| Get the list of items within the given hoversel. More...
#define | elm_obj_hoversel_item_add(label, icon_file, icon_type, func, data, ret) ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_ITEM_ADD), EO_TYPECHECK(const char *, label), EO_TYPECHECK(const char *, icon_file), EO_TYPECHECK(Elm_Icon_Type, icon_type), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)
| Add an item to the hoversel button. More...

## Functions
Evas_Object * | elm_hoversel_add (Evas_Object *parent)
| Add a new Hoversel object. More...
void | elm_hoversel_horizontal_set (Evas_Object *obj, Eina_Bool horizontal)
| This sets the hoversel to expand horizontally. More...
Eina_Bool | elm_hoversel_horizontal_get (const Evas_Object *obj)
| This returns whether the hoversel is set to expand horizontally. More...
void | elm_hoversel_hover_parent_set (Evas_Object *obj, Evas_Object *parent)
| Set the Hover parent. More...
Evas_Object * | elm_hoversel_hover_parent_get (const Evas_Object *obj)
| Get the Hover parent. More...
void | elm_hoversel_hover_begin (Evas_Object *obj)
| This triggers the hoversel popup from code, the same as if the user had clicked the button. More...
void | elm_hoversel_hover_end (Evas_Object *obj)
| This dismisses the hoversel popup as if the user had clicked outside the hover. More...
Eina_Bool | elm_hoversel_expanded_get (const Evas_Object *obj)
| Returns whether the hoversel is expanded. More...
void | elm_hoversel_clear (Evas_Object *obj)
| This will remove all the children items from the hoversel. More...
const Eina_List * | elm_hoversel_items_get (const Evas_Object *obj)
| Get the list of items within the given hoversel. More...
Elm_Object_Item * | elm_hoversel_item_add (Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, Evas_Smart_Cb func, const void *data)
| Add an item to the hoversel button. More...
void | elm_hoversel_item_icon_set (Elm_Object_Item *it, const char *icon_file, const char *icon_group, Elm_Icon_Type icon_type)
| This sets the icon for the given hoversel item. More...
void | elm_hoversel_item_icon_get (const Elm_Object_Item *it, const char **icon_file, const char **icon_group, Elm_Icon_Type *icon_type)
| Get the icon object of the hoversel item. More...

## Detailed Description

A hoversel is a button that pops up a list of items (automatically choosing the direction to display) that have a label and, optionally, an icon to select from. It is a convenience widget to avoid the need to do all the piecing together yourself. It is intended for a small number of items in the hoversel menu (no more than 8), though is capable of many more.

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

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

- `"clicked"` - the user clicked the hoversel button and popped up the sel
- `"selected"` - an item in the hoversel list is selected. event_info is the selected item
- `"dismissed"` - the hover is dismissed

Default content parts of the hoversel widget that you can use for are:

- "icon" - An icon of the hoversel

Default text parts of the hoversel widget that you can use for are:

- "default" - Label of the hoversel

Supported elm_object common APIs.

- elm_object_disabled_set
- elm_object_disabled_get
- elm_object_part_text_set
- elm_object_part_text_get
- elm_object_part_content_set
- elm_object_part_content_unset

Supported elm_object_item common APIs.

- elm_object_item_del
- elm_object_item_part_text_get
- elm_object_item_signal_emit - this works only when the item is created.

See Hoversel example for an example.

## Macro Definition Documentation

#define elm_obj_hoversel_clear | ( |  | ) | ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_CLEAR)

This will remove all the children items from the hoversel.

Since
  1.8

See Also
  elm_hoversel_clear

Referenced by elm_hoversel_clear().

#define elm_obj_hoversel_expanded_get | ( |  | ret | ) | ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_EXPANDED_GET), EO_TYPECHECK(Eina_Bool *, ret)

Returns whether the hoversel is expanded.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_hoversel_expanded_get

Referenced by elm_hoversel_expanded_get().

#define elm_obj_hoversel_horizontal_get | ( |  | ret | ) | ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_HORIZONTAL_GET), EO_TYPECHECK(Eina_Bool *, ret)

This returns whether the hoversel is set to expand horizontally.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_hoversel_horizontal_get

Referenced by elm_hoversel_horizontal_get().

#define elm_obj_hoversel_horizontal_set | ( |  | horizontal | ) | ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_HORIZONTAL_SET), EO_TYPECHECK(Eina_Bool, horizontal)

This sets the hoversel to expand horizontally.

Since
  1.8

Parameters

  [in] | horizontal |

See Also
  elm_hoversel_horizontal_set

Referenced by elm_hoversel_horizontal_set().

#define elm_obj_hoversel_hover_begin | ( |  | ) | ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_HOVER_BEGIN)

This triggers the hoversel popup from code, the same as if the user had clicked the button.

Since
  1.8

See Also
  elm_hoversel_hover_begin

Referenced by elm_hoversel_hover_begin().

#define elm_obj_hoversel_hover_end | ( |  | ) | ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_HOVER_END)

This dismisses the hoversel popup as if the user had clicked outside the hover.

Since
  1.8

See Also
  elm_hoversel_hover_end

Referenced by elm_hoversel_hover_end().

#define elm_obj_hoversel_hover_parent_get | ( |  | ret | ) | ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_HOVER_PARENT_GET), EO_TYPECHECK(Evas_Object **, ret)

Get the Hover parent.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_hoversel_hover_parent_get

Referenced by elm_hoversel_hover_parent_get().

#define elm_obj_hoversel_hover_parent_set | ( |  | parent | ) | ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_HOVER_PARENT_SET), EO_TYPECHECK(Evas_Object *, parent)

Set the Hover parent.

Since
  1.8

Parameters

  [in] | parent |

See Also
  elm_hoversel_hover_parent_set

Referenced by elm_hoversel_hover_parent_set().

#define elm_obj_hoversel_item_add | ( |  | label,
|  |  | icon_file,
|  |  | icon_type,
|  |  | func,
|  |  | data,
|  |  | ret
| ) |  | ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_ITEM_ADD), EO_TYPECHECK(const char *, label), EO_TYPECHECK(const char *, icon_file), EO_TYPECHECK(Elm_Icon_Type, icon_type), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret)

Add an item to the hoversel button.

Since
  1.8

Parameters

  [in] | label |
  [in] | icon_file |
  [in] | icon_type |
  [in] | func |
  [in] | data |
  [out] | ret |

See Also
  elm_hoversel_item_add

Referenced by elm_hoversel_item_add().

#define elm_obj_hoversel_items_get | ( |  | ret | ) | ELM_OBJ_HOVERSEL_ID(ELM_OBJ_HOVERSEL_SUB_ID_ITEMS_GET), EO_TYPECHECK(const Eina_List **, ret)

Get the list of items within the given hoversel.

Since
  1.8

Parameters

  [out] | ret |

See Also
  elm_hoversel_items_get

Referenced by elm_hoversel_items_get().

## Function Documentation

Evas_Object* elm_hoversel_add | ( | Evas_Object * | parent | ) |

Add a new Hoversel object.

Parameters

  parent | The parent object

Returns
  The new object or NULL if it cannot be created

void elm_hoversel_clear | ( | Evas_Object * | obj | ) |

This will remove all the children items from the hoversel.

Parameters

  obj | The hoversel object

Warning
  Should not be called while the hoversel is active; use elm_hoversel_expanded_get() to check first.

See Also
  elm_object_item_del()

References elm_obj_hoversel_clear.

Eina_Bool elm_hoversel_expanded_get | ( | const Evas_Object * | obj | ) |

Returns whether the hoversel is expanded.

Parameters

  obj | The hoversel object

Returns
  This will return EINA_TRUE if the hoversel is expanded or EINA_FALSE if it is not expanded.

References elm_obj_hoversel_expanded_get.

Eina_Bool elm_hoversel_horizontal_get | ( | const Evas_Object * | obj | ) |

This returns whether the hoversel is set to expand horizontally.

Parameters

  obj | The hoversel object

Returns
  If true, the hover will expand horizontally to the right.

See Also
  elm_hoversel_horizontal_set()

References elm_obj_hoversel_horizontal_get.

void elm_hoversel_horizontal_set | ( | Evas_Object * | obj,
|  | Eina_Bool | horizontal
| ) |  |

This sets the hoversel to expand horizontally.

Parameters

  obj | The hoversel object
  horizontal | If true, the hover will expand horizontally to the right.

Note
  The initial button will display horizontally regardless of this setting.

References elm_obj_hoversel_horizontal_set.

void elm_hoversel_hover_begin | ( | Evas_Object * | obj | ) |

This triggers the hoversel popup from code, the same as if the user had clicked the button.

Parameters

  obj | The hoversel object

References elm_obj_hoversel_hover_begin.

void elm_hoversel_hover_end | ( | Evas_Object * | obj | ) |

This dismisses the hoversel popup as if the user had clicked outside the hover.

Parameters

  obj | The hoversel object

References elm_obj_hoversel_hover_end.

Evas_Object* elm_hoversel_hover_parent_get | ( | const Evas_Object * | obj | ) |

Get the Hover parent.

Parameters

  obj | The hoversel object

Returns
  The used parent

Get the hover parent object.

See Also
  elm_hoversel_hover_parent_set()

References elm_obj_hoversel_hover_parent_get.

void elm_hoversel_hover_parent_set | ( | Evas_Object * | obj,
|  | Evas_Object * | parent
| ) |  |

Set the Hover parent.

Parameters

  obj | The hoversel object
  parent | The parent to use

Sets the hover parent object, the area that will be darkened when the hoversel is clicked. Should probably be the window that the hoversel is in. See Hover objects for more information.

References elm_obj_hoversel_hover_parent_set.

Elm_Object_Item* elm_hoversel_item_add | ( | Evas_Object * | obj,
|  | const char * | label,
|  | const char * | icon_file,
|  | Elm_Icon_Type | icon_type,
|  | Evas_Smart_Cb | func,
|  | const void * | data
| ) |  |

Add an item to the hoversel button.

Parameters

  obj | The hoversel object
  label | The text label to use for the item (NULL if not desired)
  icon_file | An image file path on disk to use for the icon or standard icon name (NULL if not desired)
  icon_type | The icon type if relevant
  func | Convenience function to call when this item is selected
  data | Data to pass to item-related functions

Returns
  A handle to the item added.

This adds an item to the hoversel to show when it is clicked. Note: if you need to use an icon from an edje file then use elm_hoversel_item_icon_set() right after this function, and set icon_file to NULL here.

For more information on what `icon_file` and `icon_type` are, see the icon documentation.

References elm_obj_hoversel_item_add.

void elm_hoversel_item_icon_get | ( | const Elm_Object_Item * | it,
|  | const char ** | icon_file,
|  | const char ** | icon_group,
|  | Elm_Icon_Type * | icon_type
| ) |  |

Get the icon object of the hoversel item.

Parameters

  it | The item to get the icon from
  icon_file | The image file path on disk used for the icon or standard icon name
  icon_group | The edje group used if `icon_file` is an edje file. NULL if the icon is not an edje file
  icon_type | The icon type

See Also
  elm_hoversel_item_icon_set()
  elm_hoversel_item_add()

void elm_hoversel_item_icon_set | ( | Elm_Object_Item * | it,
|  | const char * | icon_file,
|  | const char * | icon_group,
|  | Elm_Icon_Type | icon_type
| ) |  |

This sets the icon for the given hoversel item.

Parameters

  it | The item to set the icon
  icon_file | An image file path on disk to use for the icon or standard icon name
  icon_group | The edje group to use if `icon_file` is an edje file. Set this to NULL if the icon is not an edje file
  icon_type | The icon type

The icon can be loaded from the standard set, from an image file, or from an edje file.

See Also
  elm_hoversel_item_add()

const Eina_List* elm_hoversel_items_get | ( | const Evas_Object * | obj | ) |

Get the list of items within the given hoversel.

Parameters

  obj | The hoversel object

Returns
  Returns a list of Elm_Object_Item*

See Also
  elm_hoversel_item_add()

References elm_obj_hoversel_items_get.

Copyright ©2000-2014 Enlightenment.org - Samsung Electronics supports the EFL Documentation Project - Generated Wed Jan 8 2014 20:51:12