Hoversel

A hoversel is a button that pops up a list of items (automatically choosing the direction to display) that have a lable and/or an icon to select from. More...


Functions

EAPI Evas_Object * elm_hoversel_add (Evas_Object *parent)
 Add a new Hoversel object.
EAPI void elm_hoversel_hover_parent_set (Evas_Object *obj, Evas_Object *parent)
 Set the Hover parent.
EAPI void elm_hoversel_label_set (Evas_Object *obj, const char *label)
 Set the hoversel button label.
EAPI const char * elm_hoversel_label_get (Evas_Object *obj)
 Get the hoversel button label.
EAPI void elm_hoversel_icon_set (Evas_Object *obj, Evas_Object *icon)
 Set the icon of the hoversel button.
EAPI Evas_Object * elm_hoversel_icon_get (Evas_Object *obj)
 Get the icon of the hoversel button.
EAPI void elm_hoversel_hover_begin (Evas_Object *obj)
 Trigger the hoversel popup from code.
EAPI void elm_hoversel_hover_end (Evas_Object *obj)
 This ends the hoversel popup.
EAPI void elm_hoversel_clear (Evas_Object *obj)
 Remove all the items from the given hoversel object.
EAPI Elm_Hoversel_Item * elm_hoversel_item_add (Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, void(*func)(void *data, Evas_Object *obj, void *event_info), const void *data)
 Add an item to the hoversel button.
EAPI void elm_hoversel_item_del (Elm_Hoversel_Item *it)
 Delete an item from the hoversel.
EAPI void * elm_hoversel_item_data_get (Elm_Hoversel_Item *it)
 Get the data pointer passed to the item add function.
EAPI const char * elm_hoversel_item_label_get (Elm_Hoversel_Item *it)
 Get the text label of an hoversel item.
EAPI void elm_hoversel_item_icon_set (Elm_Hoversel_Item *it, const char *icon_file, const char *icon_group, Elm_Icon_Type icon_type)
 Set the icon of the hoversel item.


Detailed Description

A hoversel is a button that pops up a list of items (automatically choosing the direction to display) that have a lable and/or 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 numbr of items in the hoversel menu (no more than 8), though is capable of many more.

Signals that you can add callbacks for are:

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 item selected - Elm_Hoversel_Item

dismissed - the hover is dismissed


Function Documentation

EAPI 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

EAPI void elm_hoversel_clear ( Evas_Object *  obj  ) 

Remove all the items from the given hoversel object.

This will remove all the children items from the hoversel. (should not be called while the hoversel is active).

Parameters:
obj The hoversel object

References elm_hoversel_item_del().

EAPI void elm_hoversel_hover_begin ( Evas_Object *  obj  ) 

Trigger the hoversel popup from code.

This makes the hoversel popup activate with the items added being listed.

Parameters:
obj The hoversel object

EAPI void elm_hoversel_hover_end ( Evas_Object *  obj  ) 

This ends the hoversel popup.

This will close the hoversel popup, making it disappear, if it was active.

Parameters:
obj The hoversel object

Referenced by elm_hoversel_item_del().

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

Set the Hover parent.

Sets the hover parent object. See Hover objects for more information.

Parameters:
obj The hoversel object
parent The parent to use

EAPI Evas_Object* elm_hoversel_icon_get ( Evas_Object *  obj  ) 

Get the icon of the hoversel button.

Get the icon of the button that is always visible (before it is clicked and expanded). Also see elm_button_icon_get().

Parameters:
obj The hoversel object
Returns:
The icon object

EAPI void elm_hoversel_icon_set ( Evas_Object *  obj,
Evas_Object *  icon 
)

Set the icon of the hoversel button.

Sets the icon of the button that is always visible (before it is clicked and expanded). Also see elm_button_icon_set().

Parameters:
obj The hoversel object
icon The icon object

EAPI Elm_Hoversel_Item* elm_hoversel_item_add ( Evas_Object *  obj,
const char *  label,
const char *  icon_file,
Elm_Icon_Type  icon_type,
void(*)(void *data, Evas_Object *obj, void *event_info)  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 the this function, and set icon_file to NULL here.

Parameters:
obj The hoversel object
label The text abel to use for the item (NULL if not desired)
icon_file A 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 the conveience function
Returns:
A handle to the item added.

EAPI void* elm_hoversel_item_data_get ( Elm_Hoversel_Item *  it  ) 

Get the data pointer passed to the item add function.

This returns the data pointer supplied with elm_hoversel_item_add() that will be passed to the select function callback.

Parameters:
it The item to get the data from
Returns:
The data pointer set with elm_hoversel_item_add()

EAPI void elm_hoversel_item_del ( Elm_Hoversel_Item *  it  ) 

Delete an item from the hoversel.

This deletes the item from the hoversel (should not be called while the hoversel is active).

Parameters:
it The item to delete

References elm_hoversel_hover_end().

Referenced by elm_hoversel_clear().

EAPI void elm_hoversel_item_icon_set ( Elm_Hoversel_Item *  it,
const char *  icon_file,
const char *  icon_group,
Elm_Icon_Type  icon_type 
)

Set the icon of the hoversel item.

This set the icon for the given hoversel item. The icon can be loaded from the standard set, from an image file or from an edje file.

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

EAPI const char* elm_hoversel_item_label_get ( Elm_Hoversel_Item *  it  ) 

Get the text label of an hoversel item.

This returns the text of the label of the given hoversel item

Parameters:
it The item to get the label
Returns:
The text label of the hoversel item

EAPI const char* elm_hoversel_label_get ( Evas_Object *  obj  ) 

Get the hoversel button label.

Parameters:
obj The hoversel object
Returns:
The label text.

EAPI void elm_hoversel_label_set ( Evas_Object *  obj,
const char *  label 
)

Set the hoversel button label.

This sets the label of the button that is always visible (before it is clicked and expanded). Also see elm_button_label_set().

Parameters:
obj The hoversel object
label The label text.