Inherits from
- HasPrivateTraits: enthought.traits.has_traits.HasPrivateTraits
Attributes
- context_object
The context object the editor is editing (e.g. object):
context_object = Property
- control
The GUI widget defined by this editor:
control = Any
- enabled
Is the underlying GUI widget enabled?
enabled = Bool(True)
- extended_name
The extended name of the object trait being edited. That is, 'object_name.name' minus the context object name at the beginning. For example: 'link1.link2.value':
extended_name = Property
- factory
The EditorFactory used to create this editor:
factory = factory_trait
- invalid
The current editor invalid state status:
invalid = Bool(False)
- item
The Item object used to create this editor:
item = Instance(Item, ())
- label_control
The GUI label (if any) defined by this editor:
label_control = Any
- object
The object this editor is editing (e.g. object.link1.link2):
object = Instance(HasTraits)
- object_name
Full name of the object the editor is editing (e.g. 'object.link1.link2'):
object_name = Str('object')
- old_value
Original value of object.name (e.g. object.link1.link2.value):
old_value = Any
- scrollable
Is the underlying GUI widget scrollable?
scrollable = Bool(False)
- str_value
Current value of object trait as a string:
str_value = Property
- ui
The UI (user interface) this editor is part of:
ui = Instance('enthought.traits.ui.ui.UI')
- updating
Is the editor updating the object.name value?
updating = Bool(False)
- value
Current value for object.name:
value = Property
- value_trait
The trait the editor is editing (not its value, but the trait itself):
value_trait = Property
- visible
Is the underlying GUI widget visible?
visible = Bool(True)
Inherited from base classes
Traits
- description
Text description of the object trait being edited:
description = ReadOnly
- name
The name of the trait this editor is editing (e.g. 'value'):
name = ReadOnly
Inherited from base classes
Method summary
- __init__(self, parent, **traits)
- __set_value(self, value)
- dispose(self)
- error(self, excp)
- get_undo_item(self, object, name, old_value, new_value)
- init(self, parent)
- log_change(self, undo_factory, *undo_args)
- parse_extended_name(self, name)
- prepare(self, parent)
- restore_prefs(self, prefs)
- save_prefs(self)
- string_value(self, value, format_func = None)
- sync_value(self, user_name, editor_name, mode = 'both', is_list = False)
- update_editor(self)
Inherited from base classes
- __deepcopy__(self, memo)
- __getstate__(self)
- __prefix_trait__(self, name, is_set)
- __reduce_ex__(self, protocol)
- __setstate__(self, state, trait_change_notify = True)
- add_class_trait(cls, name, *trait)
- add_trait(self, name, *trait)
- add_trait_category(cls, category)
- add_trait_listener(self, object, prefix = '')
- all_trait_names(self)
- base_trait(self, name)
- class_default_traits_view(cls)
- class_editable_traits(cls)
- class_trait_names(cls, **metadata)
- class_trait_view(cls, name = None, view_element = None)
- class_trait_view_elements(cls)
- class_traits(cls, **metadata)
- clone_traits(self, traits = None, memo = None, copy = None, **metadata)
- configure_traits(self, filename = None, view = None, kind = None, edit = True, context = None, handler = None, id = '', scrollable = None, **args)
- copy_traits(self, other, traits = None, memo = None, copy = None, **metadata)
- copyable_trait_names(self, **metadata)
- default_traits_view(self)
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
- editable_traits(self)
- has_traits_interface(self, *interfaces)
- on_trait_change(self, handler, name = None, remove = False, dispatch = 'same', priority = False, deferred = False)
- print_traits(self, show_help = False, **metadata)
- remove_trait(self, name)
- remove_trait_listener(self, object, prefix = '')
- reset_traits(self, traits = None, **metadata)
- set_trait_dispatch_handler(cls, name, klass, override = False)
- sync_trait(self, trait_name, object, alias = None, mutual = True, remove = False)
- trait(self, name, force = False, copy = False)
- trait_context(self)
- trait_get(self, *names, **metadata)
- trait_monitor(cls, handler, remove = False)
- trait_names(self, **metadata)
- trait_set(self, trait_change_notify = True, **traits)
- trait_setq(self, **traits)
- trait_subclasses(cls, all = False)
- trait_view(self, name = None, view_element = None)
- trait_view_elements(self)
- trait_views(self, klass = None)
- traits(self, **metadata)
- validate_trait(self, name, value)
Methods
- __init__(self, parent, **traits)
Initializes the editor object.
- __set_value(self, value)
- dispose(self)
Disposes of the contents of an editor.
- error(self, excp)
Handles an error that occurs while setting the object's trait value.
- get_undo_item(self, object, name, old_value, new_value)
Creates an undo history entry.
- init(self, parent)
Finishes initializing the editor by creating the underlying toolkit widget.
- log_change(self, undo_factory, *undo_args)
Logs a change made in the editor.
- parse_extended_name(self, name)
Returns a tuple of the form ( context_object, 'name[.name...], callable ) for a specified extended name of the form: 'name' or 'context_object_name.name[.name...]'.
- prepare(self, parent)
Finishes setting up the editor.
- restore_prefs(self, prefs)
Restores any saved user preference information associated with the editor.
- save_prefs(self)
Returns any user preference information associated with the editor.
- string_value(self, value, format_func = None)
Returns the text representation of a specified object trait value.
If the format_func attribute is set on the editor factory, then this method calls that function to do the formatting. If the format_str attribute is set on the editor factory, then this method uses that string for formatting. If neither attribute is set, then this method just calls the built-in str() function.
- sync_value(self, user_name, editor_name, mode = 'both', is_list = False)
Sets or unsets synchronization between an editor trait and a user object trait.
- update_editor(self)
Updates the editor when the object trait changes externally to the editor.