Tizen Native API
|
Functions | |
Evas_Object * | elm_hoversel_add (Evas_Object *parent) |
Add a new Hoversel object. | |
void | elm_hoversel_horizontal_set (Elm_Hoversel *obj, Eina_Bool horizontal) |
This sets the hoversel to expand horizontally. | |
Eina_Bool | elm_hoversel_horizontal_get (const Elm_Hoversel *obj) |
This returns whether the hoversel is set to expand horizontally. | |
void | elm_hoversel_hover_parent_set (Elm_Hoversel *obj, Evas_Object *parent) |
Set the Hover parent. | |
Evas_Object * | elm_hoversel_hover_parent_get (const Elm_Hoversel *obj) |
Get the Hover parent. | |
Eina_Bool | elm_hoversel_expanded_get (const Elm_Hoversel *obj) |
Returns whether the hoversel is expanded. | |
const Eina_List * | elm_hoversel_items_get (const Elm_Hoversel *obj) |
Get the list of items within the given hoversel. | |
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. | |
void | elm_hoversel_hover_end (Elm_Hoversel *obj) |
This dismisses the hoversel popup as if the user had clicked outside the hover. | |
Elm_Object_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. | |
void | elm_hoversel_item_icon_set (Elm_Hoversel_Item *obj, const char *icon_file, const char *icon_group, Elm_Icon_Type icon_type) |
Get the icon object of the hoversel item. | |
void | elm_hoversel_item_icon_get (const Elm_Hoversel_Item *obj, const char **icon_file, const char **icon_group, Elm_Icon_Type *icon_type) |
This sets the icon for the given hoversel item. |
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"expanded"
- This is called on clicking hoversel and elm_hoversel_hover_begin()."language,changed"
- the program's language changed (since 1.9)"item,focused"
- When the hoversel item has received focus. (since 1.10)"item,unfocused"
- When the hoversel item has lost focus. (since 1.10)
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" - A 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.
- elm_object_item_style_set - this works only when the item is created.
- elm_object_item_style_get - this works only when the item is created.
- elm_object_item_focus_set - this works only when the item is created.
- elm_object_item_focus_get - this works only when the item is created.
Function Documentation
Evas_Object* elm_hoversel_add | ( | Evas_Object * | parent | ) |
Add a new Hoversel object.
- Since :
- 2.4
- Parameters:
-
parent The parent object
- Returns:
- The new object or NULL if it cannot be created
void elm_hoversel_clear | ( | Elm_Hoversel * | obj | ) |
This will remove all the children items from the hoversel.
- Since :
- 2.4
- Warning:
- Should not be called while the hoversel is active; use elm_hoversel_expanded_get() to check first.
- See also:
- elm_object_item_del()
- Parameters:
-
[in] obj The elm hoversel object
Eina_Bool elm_hoversel_expanded_get | ( | const Elm_Hoversel * | obj | ) |
Returns whether the hoversel is expanded.
- Since :
- 2.4
- Returns:
- This will return
EINA_TRUE
if the hoversel is expanded orEINA_FALSE
if it is not expanded.
- Parameters:
-
[in] obj The elm hoversel object
Eina_Bool elm_hoversel_horizontal_get | ( | const Elm_Hoversel * | obj | ) |
This returns whether the hoversel is set to expand horizontally.
- Since :
- 2.4
- Returns:
- If true, the hover will expand horizontally to the right.
- See also:
- elm_hoversel_horizontal_set()
- Parameters:
-
[in] obj The elm hoversel object
void elm_hoversel_horizontal_set | ( | Elm_Hoversel * | obj, |
Eina_Bool | horizontal | ||
) |
This sets the hoversel to expand horizontally.
- Since :
- 2.4
- Note:
- The initial button will display horizontally regardless of this setting.
- Parameters:
-
[in] obj The elm hoversel object [in] horizontal If true, the hover will expand horizontally to the right.
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.
- Since :
- 2.4
- Parameters:
-
[in] obj The elm hoversel object
void elm_hoversel_hover_end | ( | Elm_Hoversel * | obj | ) |
This dismisses the hoversel popup as if the user had clicked outside the hover.
- Since :
- 2.4
- Parameters:
-
[in] obj The elm hoversel object
Evas_Object* elm_hoversel_hover_parent_get | ( | const Elm_Hoversel * | obj | ) |
Get the Hover parent.
- Since :
- 2.4
- Returns:
- The used parent
- Remarks:
- Get the hover parent object.
- See also:
- elm_hoversel_hover_parent_set()
- Parameters:
-
[in] obj The elm hoversel object
void elm_hoversel_hover_parent_set | ( | Elm_Hoversel * | obj, |
Evas_Object * | parent | ||
) |
Set the Hover parent.
- Since :
- 2.4
- Remarks:
- 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] obj The elm hoversel object [in] parent The parent to use
Elm_Object_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.
- Since :
- 2.4
- Returns:
- A handle to the item added.
- Remarks:
- 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
andicon_type
are, see the icon documentation.
- Parameters:
-
[in] obj The elm hoversel object [in] label The text label to use for the item (NULL if not desired) [in] icon_file An image file path on disk to use for the icon or standard icon name (NULL if not desired) [in] icon_type The icon type if relevant [in] func Convenience function to call when this item is selected. The last parameter event_info
offunc
is the selected item pointer.[in] data Data to pass to item-related functions
void elm_hoversel_item_icon_get | ( | const Elm_Hoversel_Item * | obj, |
const char ** | icon_file, | ||
const char ** | icon_group, | ||
Elm_Icon_Type * | icon_type | ||
) |
This sets the icon for the given hoversel item.
- Since :
- 2.4
- Remarks:
- The icon can be loaded from the standard set, from an image file, or from an edje file.
- See also:
- elm_hoversel_item_add()
- Parameters:
-
[in] obj The elm hoversel item object [out] icon_file An image file path on disk to use for the icon or standard icon name [out] 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[out] icon_type The icon type
void elm_hoversel_item_icon_set | ( | Elm_Hoversel_Item * | obj, |
const char * | icon_file, | ||
const char * | icon_group, | ||
Elm_Icon_Type | icon_type | ||
) |
Get the icon object of the hoversel item.
- Since :
- 2.4
- See also:
- elm_hoversel_item_add()
- Parameters:
-
[in] obj The elm hoversel item object [in] icon_file An image file path on disk to use for the icon or standard icon name [in] 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[in] icon_type The icon type
const Eina_List* elm_hoversel_items_get | ( | const Elm_Hoversel * | obj | ) |
Get the list of items within the given hoversel.
- Since :
- 2.4
- Returns:
- Returns a list of Elm_Object_Item
- See also:
- elm_hoversel_item_add()
- Parameters:
-
[in] obj The elm hoversel object