Functions
Hoversel

Functions

Evas_Object * elm_hoversel_add (Evas_Object *parent)
 Add a new Hoversel object. More...
 
EOAPI void elm_obj_hoversel_horizontal_set (Eina_Bool horizontal)
 Control if the hoversel should expand horizontally. More...
 
EOAPI Eina_Bool elm_obj_hoversel_horizontal_get (void)
 Control if the hoversel should expand horizontally. More...
 
EOAPI void elm_obj_hoversel_hover_parent_set (Evas_Object *parent)
 Control the hover parent. More...
 
EOAPI Evas_Object * elm_obj_hoversel_hover_parent_get (void)
 Control the hover parent. More...
 
EOAPI Eina_Bool elm_obj_hoversel_expanded_get (void)
 Returns whether the hoversel is expanded. More...
 
EOAPI const Eina_List * elm_obj_hoversel_items_get (void)
 Get the list of items within the given hoversel.
 
EOAPI void elm_obj_hoversel_auto_update_set (Eina_Bool auto_update)
 Update icon and text of hoversel same to those of selected item automatically. More...
 
EOAPI Eina_Bool elm_obj_hoversel_auto_update_get (void)
 Update icon and text of hoversel same to those of selected item automatically. More...
 
EOAPI void elm_obj_hoversel_hover_begin (void)
 This triggers the hoversel popup from code, the same as if the user had clicked the button.
 
EOAPI void elm_obj_hoversel_clear (void)
 This will remove all the children items from the hoversel. More...
 
EOAPI void elm_obj_hoversel_hover_end (void)
 This dismisses the hoversel popup as if the user had clicked outside the hover.
 
EOAPI Elm_Widget_Item * elm_obj_hoversel_item_add (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_horizontal_set (Elm_Hoversel *obj, Eina_Bool horizontal)
 Control if the hoversel should expand horizontally. More...
 
Eina_Bool elm_hoversel_horizontal_get (const Elm_Hoversel *obj)
 Control if the hoversel should expand horizontally. More...
 
void elm_hoversel_hover_parent_set (Elm_Hoversel *obj, Evas_Object *parent)
 Control the hover parent. More...
 
Evas_Object * elm_hoversel_hover_parent_get (const Elm_Hoversel *obj)
 Control the hover parent. More...
 
Eina_Bool elm_hoversel_expanded_get (const Elm_Hoversel *obj)
 Returns whether the hoversel is expanded. More...
 
const Eina_List * elm_hoversel_items_get (const Elm_Hoversel *obj)
 Get the list of items within the given hoversel. More...
 
void elm_hoversel_auto_update_set (Elm_Hoversel *obj, Eina_Bool auto_update)
 Update icon and text of hoversel same to those of selected item automatically. More...
 
Eina_Bool elm_hoversel_auto_update_get (const Elm_Hoversel *obj)
 Update icon and text of hoversel same to those of selected item automatically. More...
 
void elm_hoversel_hover_begin (Elm_Hoversel *obj)
 This triggers the hoversel popup from code, the same as if the user had clicked the button.
 
void elm_hoversel_clear (Elm_Hoversel *obj)
 This will remove all the children items from the hoversel. More...
 
void elm_hoversel_hover_end (Elm_Hoversel *obj)
 This dismisses the hoversel popup as if the user had clicked outside the hover.
 
Elm_Widget_Item * elm_hoversel_item_add (Elm_Hoversel *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...
 

Detailed Description

hoversel_inheritance_tree.png
preview-00.png

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:

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

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

Supported elm_object common APIs.

Supported elm_object_item common APIs.

See Hoversel example for an example.

Function Documentation

Evas_Object* elm_hoversel_add ( Evas_Object *  parent)

Add a new Hoversel object.

Parameters
parentThe parent object
Returns
The new object or NULL if it cannot be created
Eina_Bool elm_hoversel_auto_update_get ( const Elm_Hoversel *  obj)

Update icon and text of hoversel same to those of selected item automatically.

Returns
true if hoversel is updated automatically or false otherwise

References elm_obj_hoversel_auto_update_get().

void elm_hoversel_auto_update_set ( Elm_Hoversel *  obj,
Eina_Bool  auto_update 
)

Update icon and text of hoversel same to those of selected item automatically.

Parameters
[in]auto_updatetrue if hoversel is updated automatically or false otherwise

References elm_obj_hoversel_auto_update_set().

void elm_hoversel_clear ( Elm_Hoversel *  obj)

This will remove all the children items from the hoversel.

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

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 Elm_Hoversel *  obj)

Returns whether the hoversel is expanded.

Returns
true if the hoversel is expanded or false otherwise
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 Elm_Hoversel *  obj)

Control if the hoversel should expand horizontally.

Note
The initial button will display horizontally regradless of this setting.
Returns
If true, the hover will expand horizontally to the right.

Control if the hoversel should expand horizontally.

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 ( Elm_Hoversel *  obj,
Eina_Bool  horizontal 
)

Control if the hoversel should expand horizontally.

Note
The initial button will display horizontally regradless of this setting.
Parameters
[in]horizontalIf true, the hover will expand horizontally to the right.

Control if the hoversel should expand horizontally.

Note
The initial button will display horizontally regardless of this setting.
Parameters
[in]horizontalIf true, the hover will expand horizontally to the right.

References elm_obj_hoversel_horizontal_set().

Evas_Object* elm_hoversel_hover_parent_get ( const Elm_Hoversel *  obj)

Control the hover parent.

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.

Returns
The parent to use

Control the hover parent.

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 ( Elm_Hoversel *  obj,
Evas_Object *  parent 
)

Control the hover parent.

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.

Parameters
[in]parentThe parent to use

Control the hover parent.

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.

Parameters
[in]parentThe parent to use

References elm_obj_hoversel_hover_parent_set().

Elm_Widget_Item* elm_hoversel_item_add ( Elm_Hoversel *  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.

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.

Parameters
[in]icon_fileAn image file path on disk to use for the icon or standard icon name (NULL if not desired)
[in]icon_typeThe icon type if relevant
[in]funcConvenience function to call when this item is selected. The last parameter event_info of func is the selected item pointer.
[in]dataData to pass to item-related functions
Returns
A handle to the added item.
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.

Parameters
[in]labelThe text label to use for the item (NULL if not desired)
[in]icon_fileAn image file path on disk to use for the icon or standard icon name (NULL if not desired)
[in]icon_typeThe icon type if relevant
[in]funcConvenience function to call when this item is selected. The last parameter event_info of func is the selected item pointer.
[in]dataData to pass to item-related functions

References elm_obj_hoversel_item_add().

const Eina_List* elm_hoversel_items_get ( const Elm_Hoversel *  obj)

Get the list of items within the given hoversel.

Returns
Returns a list of Elm_Object_Item
See also
elm_hoversel_item_add()

References elm_obj_hoversel_items_get().

EOAPI Eina_Bool elm_obj_hoversel_auto_update_get ( void  )

Update icon and text of hoversel same to those of selected item automatically.

Returns
true if hoversel is updated automatically or false otherwise

Referenced by elm_hoversel_auto_update_get().

EOAPI void elm_obj_hoversel_auto_update_set ( Eina_Bool  auto_update)

Update icon and text of hoversel same to those of selected item automatically.

Parameters
[in]auto_updatetrue if hoversel is updated automatically or false otherwise

Referenced by elm_hoversel_auto_update_set().

EOAPI void elm_obj_hoversel_clear ( void  )

This will remove all the children items from the hoversel.

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

Referenced by elm_hoversel_clear().

EOAPI Eina_Bool elm_obj_hoversel_expanded_get ( void  )

Returns whether the hoversel is expanded.

Returns
true if the hoversel is expanded or false otherwise

Referenced by elm_hoversel_expanded_get().

EOAPI Eina_Bool elm_obj_hoversel_horizontal_get ( void  )

Control if the hoversel should expand horizontally.

Note
The initial button will display horizontally regradless of this setting.
Returns
If true, the hover will expand horizontally to the right.

Referenced by elm_hoversel_horizontal_get().

EOAPI void elm_obj_hoversel_horizontal_set ( Eina_Bool  horizontal)

Control if the hoversel should expand horizontally.

Note
The initial button will display horizontally regradless of this setting.
Parameters
[in]horizontalIf true, the hover will expand horizontally to the right.

Referenced by elm_hoversel_horizontal_set().

EOAPI Evas_Object* elm_obj_hoversel_hover_parent_get ( void  )

Control the hover parent.

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.

Returns
The parent to use

Referenced by elm_hoversel_hover_parent_get().

EOAPI void elm_obj_hoversel_hover_parent_set ( Evas_Object *  parent)

Control the hover parent.

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.

Parameters
[in]parentThe parent to use

Referenced by elm_hoversel_hover_parent_set().

EOAPI Elm_Widget_Item* elm_obj_hoversel_item_add ( 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.

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.

Parameters
[in]icon_fileAn image file path on disk to use for the icon or standard icon name (NULL if not desired)
[in]icon_typeThe icon type if relevant
[in]funcConvenience function to call when this item is selected. The last parameter event_info of func is the selected item pointer.
[in]dataData to pass to item-related functions
Returns
A handle to the added item.

Referenced by elm_hoversel_item_add().