Table Of Contents

Previous topic

hover Module

Next topic

icon Module

hoversel Module

Widget description

../_images/hoversel-preview.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 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 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

Enumerations

Icon types

efl.elementary.hoversel.ELM_ICON_NONE

No icon

efl.elementary.hoversel.ELM_ICON_FILE

Icon is a file

efl.elementary.hoversel.ELM_ICON_STANDARD

Icon is set with standards names

class efl.elementary.hoversel.Hoversel

Bases: efl.elementary.button.Button

This is the class that actually implements the widget.

callback_clicked_add()

The user clicked the hoversel button and popped up the sel.

callback_dismissed_add()

The hover is dismissed.

callback_selected_add()

An item in the hoversel list is selected. event_info is the item.

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.

Type :bool
horizontal

Whether the hoversel is set to expand horizontally.

Note

The initial button will display horizontally regardless of this setting.

Type :bool
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.

Type :Object
items

Get the list of items within the given hoversel.

Type :tuple of HoverselItem‘s
class efl.elementary.hoversel.HoverselItem

Bases: efl.elementary.object_item.ObjectItem

An item for the Hoversel widget.

For more information on what icon_file and icon_type are, see Icon.

Parameters:
  • 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 types) – The icon type if relevant
  • callback (function) – Convenience function to call when this item is selected
add_to(Hoversel hoversel)

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.

Returns:The item added.
Return type:HoverselItem
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.

Type :(string file, string group, Icon type type)