Hover¶
Widget description¶
A Hover object will hover over its parent
object at the target
location.
Anything in the background will be given a darker coloring to indicate that the hover object is on top (at the default theme). When the hover is clicked it is dismissed(hidden), if the contents of the hover are clicked that doesn’t cause the hover to be dismissed.
A Hover object has two parents. One parent that owns it during creation and the other parent being the one over which the hover object spans.
Available styles¶
default
popout
menu
hoversel_vertical
Emitted signals¶
clicked
- the user clicked the empty space in the hover to dismiss.dismissed
- the user clicked the empty space in the hover to dismiss. (since 1.8)smart,changed
- a content object placed under the “smart” policy was replaced to a new slot direction.
Layout content parts¶
left
top-left
top
top-right
right
bottom-right
bottom
bottom-left
middle
smart
All directions may have contents at the same time, except for “smart”.
This is a special placement hint and its use case depends of the
calculations coming from best_content_location_get()
. Its use
is for cases when one desires only one hover content, but with a dynamic
special placement within the hover area. The content’s geometry,
whenever it changes, will be used to decide on a best location, not
extrapolating the hover’s parent object view to show it in (still being
the hover’s target determinant of its medium part – move and resize it
to simulate finger sizes, for example). If one of the directions other
than “smart” are used, a previously content set using it will be
deleted, and vice-versa.
Note
The hover object will take up the entire space of target
object.
Note
The content parts listed indicate the direction that the content will be displayed
Enumerations¶
Inheritance diagram¶
- class efl.elementary.Hover(Object parent, *args, **kwargs)¶
Bases:
efl.elementary.__init__.LayoutClass
This is the class that actually implement the widget.
- Parameters
parent (
efl.evas.Object
) – The parent object**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
- best_content_location_get(pref_axis)¶
Returns the best swallow location for content in the hover.
Best is defined here as the location at which there is the most available space.
If
ELM_HOVER_AXIS_HORIZONTAL
is chosen the returned position will necessarily be along the horizontal axis(“left” or “right”). IfELM_HOVER_AXIS_VERTICAL
is chosen the returned position will necessarily be along the vertical axis(“top” or “bottom”). ChoosingELM_HOVER_AXIS_BOTH
orELM_HOVER_AXIS_NONE
has the same effect and the returned position may be in either axis.See also
part_content_set()
- Parameters
pref_axis (Hover axis) – The preferred orientation axis for the hover object to use
- Returns
The edje location to place content into the hover or None, on errors.
- Return type
string
- callback_clicked_add(func, *args, **kwargs)¶
the user clicked the empty space in the hover to dismiss
- callback_clicked_del(func)¶
- callback_dismissed_add(func, *args, **kwargs)¶
the user clicked the empty space in the hover to dismiss
New in version 1.8.1.
- callback_dismissed_del(func)¶
- callback_smart_changed_add(func, *args, **kwargs)¶
a content object placed under the “smart” policy was replaced to a new slot direction.
- callback_smart_changed_del(func)¶
- dismiss()¶
Dismiss a hover object
Use this function to simulate clicking outside the hover to dismiss it. In this way, the hover will be hidden and the “clicked” signal will be emitted.
- parent¶
The parent object for the hover.
This will cause the hover to take up the entire space that the parent object fills.
- Type
Object
- parent_get()¶
- parent_set(parent)¶
- target¶
The target object for the hover.
Setting this will cause the hover to be centered on the target object.
- Type
Object
- target_get()¶
- target_set(target)¶