Table Of Contents

Previous topic

conformant Module

Next topic

datetime_elm Module

ctxpopup Module

Widget description

../_images/ctxpopup-preview.png

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).

Signals that you can add callbacks for are:

  • 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 content parts of the ctxpopup widget that you can use for are:

  • “default” - A content of the ctxpopup

Default content parts of the ctxpopup items that you can use for are:

  • “icon” - An icon in the title area

Default text parts of the ctxpopup items that you can use for are:

  • “default” - Title label in the title area

Note

Ctxpopup is a specialization of Hover.

Enumerations

Ctxpopup arrow directions

efl.elementary.ctxpopup.ELM_CTXPOPUP_DIRECTION_DOWN

Arrow is pointing down

efl.elementary.ctxpopup.ELM_CTXPOPUP_DIRECTION_RIGHT

Arrow is pointing right

efl.elementary.ctxpopup.ELM_CTXPOPUP_DIRECTION_LEFT

Arrow is pointing left

efl.elementary.ctxpopup.ELM_CTXPOPUP_DIRECTION_UP

Arrow is pointing up

efl.elementary.ctxpopup.ELM_CTXPOPUP_DIRECTION_UNKNOWN

Arrow direction is unknown

class efl.elementary.ctxpopup.Ctxpopup

Bases: efl.elementary.layout_class.LayoutClass

This is the class that actually implements the widget.

Changed in version 1.8: Inherits from LayoutClass

callback_dismissed_add()

the ctxpopup was dismissed

callback_focused_add()

When the ctxpopup has received focus.

New in version 1.8.

callback_language_changed_add()

This is called when the program’s language is changed.

callback_unfocused_add()

When the ctxpopup has lost focus.

New in version 1.8.

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_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
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 “clicked” signal will be emitted.

horizontal

Ctxpopup objects orientation.

Type :bool
hover_parent

Ctxpopup hover’s parent

Type :Object
item_append(unicode label, evas.Object icon, func, *args, **kwargs) → CtxpopupItem

A constructor for a CtxpopupItem.

See :CtxpopupItem.append_to()
class efl.elementary.ctxpopup.CtxpopupItem

Bases: efl.elementary.object_item.ObjectItem

An item for Ctxpopup widget.

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:
  • icon (Object) – Icon to be set on new item
  • label (string) – The Label of the new item
  • func (function) – Convenience function called when item selected
Returns:

The item added or None, on errors

Return type:

CtxpopupItem

append_to(Object ctxpopup) → CtxpopupItem

Add a new item to a ctxpopup object.

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.

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