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.
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
dismissed
- the hover is dismissed
expanded
- the hover is expanded (since 1.9)
item,focused
- the hoversel item has received focus. (since 1.10)
item,unfocused
- the hoversel item has lost focus. (since 1.10)
icon
- An icon of the hoversel
default
- Label of the hoversel
efl.elementary.
Hoversel
(Object parent, *args, **kwargs)¶Bases: efl.elementary.__init__.Button
parent (efl.evas.Object
) – The parent object
**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
auto_update
¶Automatically change the label and icon of hoversel to that of the selected item.
bool
..versionadded:: 1.16
auto_update_get
¶auto_update_set
¶callback_clicked_add
¶The user clicked the hoversel button and popped up the sel.
callback_clicked_del
¶callback_dismissed_add
¶The hover is dismissed.
callback_dismissed_del
¶callback_expanded_add
¶The hover is expanded.
New in version 1.9.
callback_expanded_del
¶callback_item_focused_add
¶When the hoversel item has received focus.
New in version 1.10.
callback_item_focused_del
¶callback_item_unfocused_add
¶When the hoversel item has lost focus.
New in version 1.10.
callback_item_unfocused_del
¶callback_selected_add
¶An item in the hoversel list is selected. event_info is the item.
callback_selected_del
¶clear
¶This will remove all the children items from the hoversel.
Warning
Should not be called while the hoversel is active;
use expanded
to check first.
See also
delete()
expanded
¶Returns whether the hoversel is expanded.
bool
expanded_get
¶horizontal
¶Whether the hoversel is set to expand horizontally.
Note
The initial button will display horizontally regardless of this setting.
bool
horizontal_get
¶horizontal_set
¶hover_begin
¶This triggers the hoversel popup from code, the same as if the user had clicked the button.
hover_end
¶This dismisses the hoversel popup as if the user had clicked outside the hover.
hover_parent
¶The Hover parent.
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.
Object
hover_parent_get
¶hover_parent_set
¶item_add
¶items
¶Get the list of items within the given hoversel.
See also
tuple of HoverselItem
’s
items_get
¶efl.elementary.
HoverselItem
(label=None, icon_file=None, icon_type=enums.ELM_ICON_NONE, callback=None, cb_data=None, *args, **kwargs)¶Bases: efl.elementary.__init__.ObjectItem
For more information on what icon_file
and icon_type
are,
see Icon
.
label (string) – The text label to use for the item (None if not desired)
icon_file (string) – An image file path on disk to use for the icon or standard icon name (None if not desired)
icon_type (Icon type) – The icon type if relevant
callback (function) – Convenience function to call when this item is selected
cb_data – User data for the callback function
**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
add_to
¶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 HoverselItem.icon
right after this function.
The item added.
icon
¶This sets 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.
(string file, string group, Icon type type)
icon_get
¶icon_set
¶