exopy.utils.widgets.dict_editor module¶
Template to edit a dictionary content.
This is a simplified version of a list editor automatically handling the adding removing of keys and syncing by re-assigning the dict to the underlying model. This is fit only for editing dict holding standard python types.
-
class
exopy.utils.widgets.dict_editor.
FieldFieldCompleterEditor
(parent=None, **kwargs)¶ Bases:
enaml.widgets.container.Container
Possible content for the Dictionary Editor containing a pair of key-value Fields (String-like fields) where the second one has the line-completer.
It expects the model to declare either the entries or entries_updater function and to declare an evaluator_tooltip.
-
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.
-
-
class
exopy.utils.widgets.dict_editor.
FieldFieldEditor
(parent=None, **kwargs)¶ Bases:
enaml.widgets.container.Container
Possible content for the Dictionary Editor containing a pair of key-value Fields (String-like fields).
-
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.
-
-
class
exopy.utils.widgets.dict_editor.
Pair
(**kwargs)¶ Bases:
atom.atom.Atom
Base model to represent a key/value pair of a dictionary.
-
key
¶ A member class which supports value initialization.
A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).
-
refresh_method
¶ A value which is callable.
-
value
¶ A member class which supports value initialization.
A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).
-