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.language,changed
- This is called when the program’s language is
changed.focused
- When the ctxpopup has received focus. (since 1.8)unfocused
- When the ctxpopup has lost focus. (since 1.8)default
- A content of the ctxpopupicon
- An icon in the title areadefault
- Title label in the title areaefl.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
Parameters: |
|
---|
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).
Type: | bool |
---|
New in version 1.9.
auto_hide_disabled_get
()¶auto_hide_disabled_set
(disabled)¶callback_dismissed_add
(func, *args, **kwargs)¶the ctxpopup was dismissed
callback_dismissed_del
(func)¶callback_focused_add
(func, *args, **kwargs)¶When the ctxpopup has received focus.
New in version 1.8.
callback_focused_del
(func)¶callback_language_changed_add
(func, *args, **kwargs)¶This is called when the program’s language is changed.
callback_language_changed_del
(func)¶callback_unfocused_add
(func, *args, **kwargs)¶When the ctxpopup has lost focus.
New in version 1.8.
callback_unfocused_del
(func)¶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
Type: | Ctxpopup arrow directions |
---|
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.
Type: | (first, second, third, fourth) Ctxpopup arrow directions |
---|
direction_priority_get
()¶direction_priority_set
(first, second, third, fourth)¶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.
Type: | CtxpopupItem |
---|
New in version 1.11.
first_item_get
()¶horizontal
¶Ctxpopup objects orientation.
Type: | bool |
---|
horizontal_get
()¶horizontal_set
(horizontal)¶hover_parent_get
()¶hover_parent_set
(parent)¶item_append
(label, icon=None, func=None, *args, **kwargs)¶A constructor for a CtxpopupItem
.
See: | CtxpopupItem.append_to() |
---|
item_prepend
(label, icon=None, func=None, *args, **kwargs)¶A constructor for a CtxpopupItem
.
See: | CtxpopupItem.prepend_to() |
---|
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.
Type: | list of CtxpopupItem |
---|
New in version 1.11.
items_get
()¶last_item
¶The last item of the Ctxpopup.
Type: | CtxpopupItem |
---|
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.
Parameters: |
|
---|
append_to
(ctxpopup)¶Add a new item to a ctxpopup object.
See also
content
Parameters: | ctxpopup (Ctxpopup ) – The Ctxpopup widget this item is to be appended on |
---|---|
Returns: | The item added or None , on errors |
Return type: | CtxpopupItem |
next
¶The next item.
Type: | CtxpopupItem |
---|
New in version 1.11.
prepend_to
(ctxpopup)¶Prepend a new item to a ctxpopup object.
See also
content
Parameters: | ctxpopup (Ctxpopup ) – The Ctxpopup widget this item is to be prepended on |
---|---|
Returns: | The item added or None , on errors |
Return type: | CtxpopupItem |
New in version 1.11.
prev
¶The previous item.
Type: | CtxpopupItem |
---|
New in version 1.11.