A ctxpopup is a widget that, when shown, pops up a list of items. It automatically chooses an area inside its parent object’s view to optimally fit into it. In the default theme, it will also point an arrow to it’s top left position at the time one shows it. Ctxpopup items have a label and/or an icon. It is intended for a small number of items (hence the use of list, not genlist).
Note
Ctxpopup is a specialization of Hover
.
dismissed
- This is called when 1. the outside of ctxpopup was clicked
or 2. its parent area is changed or 3. the language is changed and also when
4. the parent object is resized due to the window rotation. Then ctxpopup is
dismissed.
geometry,update
- The geometry has changed (since 1.17)
default
- A content of the ctxpopup
icon
- An icon in the title area
default
- Title label in the title area
efl.elementary.
ELM_CTXPOPUP_DIRECTION_DOWN
¶Arrow is pointing down
efl.elementary.
ELM_CTXPOPUP_DIRECTION_RIGHT
¶Arrow is pointing right
efl.elementary.
ELM_CTXPOPUP_DIRECTION_LEFT
¶Arrow is pointing left
efl.elementary.
ELM_CTXPOPUP_DIRECTION_UP
¶Arrow is pointing up
efl.elementary.
ELM_CTXPOPUP_DIRECTION_UNKNOWN
¶Arrow direction is unknown
efl.elementary.
Ctxpopup
(Object parent, *args, **kwargs)¶Bases: efl.elementary.__init__.LayoutClass
Changed in version 1.8: Inherits from LayoutClass
parent (efl.evas.Object
) – The parent object
**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
auto_hide_disabled
¶Set ctxpopup auto hide mode triggered by ctxpopup policy.
Use this property when you want ctxpopup not to hide automatically. By default, ctxpopup is dismissed whenever mouse clicked its background area, language is changed, and its parent geometry is updated(changed).
bool
New in version 1.9.
auto_hide_disabled_get
¶auto_hide_disabled_set
¶callback_dismissed_add
¶the ctxpopup was dismissed
callback_dismissed_del
¶callback_geometry_update_add
¶the ctxpopup geometry has changed
New in version 1.17.
callback_geometry_update_del
¶clear
¶Clear all items in the given ctxpopup object.
direction
¶Get the current direction of a ctxpopup.
Warning
Only once the ctxpopup is shown can the direction be determined
direction_get
¶direction_priority
¶The direction priority order of a ctxpopup.
This functions gives a chance to user to set the priority of ctxpopup showing direction. This doesn’t guarantee the ctxpopup will appear in the requested direction.
(first, second, third, fourth) Ctxpopup arrow directions
direction_priority_get
¶direction_priority_set
¶dismiss
¶Dismiss a ctxpopup object
Use this function to simulate clicking outside the ctxpopup to dismiss it. In this way, the ctxpopup will be hidden and the “dismissed” signal will be emitted.
first_item
¶The first item of the Ctxpopup.
New in version 1.11.
first_item_get
¶horizontal
¶Ctxpopup objects orientation.
bool
horizontal_get
¶horizontal_set
¶hover_parent_get
¶hover_parent_set
¶item_append
¶A constructor for a CtxpopupItem
.
item_insert_after
¶Add a new item to the list after the indicated item
after (CtxpopupItem) – The item after which to add it
label (string) – The label of new item
icon (evasObject) – The icon of new item
func – The callback function to be invoked when this item is selected.
*args – The data to be attached for callback
**kwargs – The data to be attached for callback
New in version 1.21.
item_insert_before
¶Add a new item to the list before the indicated item
before (CtxpopupItem) – The item before which to add it
label (string) – The label of new item
icon (evasObject) – The icon of new item
func – The callback function to be invoked when this item is selected.
*args – The data to be attached for callback
**kwargs – The data to be attached for callback
New in version 1.21.
item_prepend
¶A constructor for a CtxpopupItem
.
New in version 1.11.
items
¶Get the list of items in the ctxpopup widget.
This list is not to be modified in any way and is only valid until the object internal items list is changed. It should be fetched again with another call to this function when changes happen.
list of CtxpopupItem
New in version 1.11.
items_get
¶last_item
¶The last item of the Ctxpopup.
New in version 1.11.
last_item_get
¶efl.elementary.
CtxpopupItem
(label=None, Object icon=None, callback=None, cb_data=None, *args, **kargs)¶Bases: efl.elementary.__init__.ObjectItem
Warning
Ctxpopup can’t hold both an item list and a content at the same time. When an item is added, any previous content will be removed.
label (string) – The Label of the new item
icon (efl.evas.Object
) – Icon to be set on new item
callback (callable) – Convenience function called when item selected
cb_data – User data for the callback function
**kwargs – All the remaining keyword arguments are interpreted as properties of the instance
append_to
¶Add a new item to a ctxpopup object.
See also
content
ctxpopup (Ctxpopup
) – The Ctxpopup widget this item is to be appended on
The item added or None
, on errors
next
¶The next item.
New in version 1.11.
prepend_to
¶Prepend a new item to a ctxpopup object.
See also
content
ctxpopup (Ctxpopup
) – The Ctxpopup widget this item is to be prepended on
The item added or None
, on errors
New in version 1.11.
prev
¶The previous item.
New in version 1.11.