exopy.utils.widgets.list_editor module

Template widget allowing to edit a list member from an Atom object.

The list should be composed of Atom object itself, and should be paired with a Signal used to notify listeners about internal changes of the list. It is the responsability of the model to signal internal changes to the list.

class exopy.utils.widgets.list_editor.ListContainer(parent=None, **kwargs)

Bases: enaml.widgets.container.Container

Custom container handling the layout for the list editor.

The user specifies which widget to use to edit the list and this container takes care of correctly laying out the PushButton used to edit the list content.

alignment

A value of type str.

Under Python 2 this is a byte string and behaves as Bytes with respect to promotion, under Python 3 it is a unicode string and behaves as Unicode with respect to promotion.

The use of this member is discouraged in Python 2/3 compatible codebase as Bytes and Unicode provide a more homogeneous behavior.

layout_constraints()

Layout the push buttons used to edit the list content.

class exopy.utils.widgets.list_editor.PopupListMenu(parent=None, **kwargs)

Bases: enaml.widgets.menu.Menu

Popup menu used to alter add, delete or move elements in the list.

index

A value which allows objects of a given type or types.

Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.

The value of an Instance may be set to None.

model

A value which allows objects of a given type or types.

Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.

The value of an Instance may be set to None.

operations

A value which allows objects of a given type or types.

Values will be tested using the PyObject_IsInstance C API call. This call is equivalent to isinstance(value, kind) and all the same rules apply.

The value of an Instance may be set to None.