Inherits from
- HasPrivateTraits: enthought.traits.has_traits.HasPrivateTraits
Attributes
- context
Context objects that the UI is editing
context = DictStrAny
- control
Panel or dialog associated with the user interface
control = Any
- disposable_traits
List of additional traits that are discarded when a user interface is disposed.
disposable_traits = [ 'view_elements', 'info', 'handler', 'context', 'view', 'history', 'key_bindings', 'icon', 'rebuild' ]
- errors
The number of currently pending editor error conditions
errors = Int
- handler
Handler object used for event handling
handler = Instance(Handler)
- history
Undo and Redo history
history = Any
- icon
The ImageResource of the icon, if any
icon = Any
- id
The unique ID for this UI for persistence
id = Str
- info
UIInfo object containing context or editor objects
info = Instance(UIInfo)
- key_bindings
The KeyBindings object (if any) for this UI:
key_bindings = Property
- modified
Have any modifications been made to UI contents?
modified = Bool(False)
- owner
Toolkit-specific object that "owns" control
owner = Any
- parent
The parent UI (if any) of this UI
parent = Instance('UI')
- rebuild
The code used to rebuild an updated user interface
rebuild = Callable
- recyclable_traits
List of traits that are reset when a user interface is recycled (i.e. rebuilt).
recyclable_traits = [ '_context', '_revert', '_defined', '_visible', '_enabled', '_checked', '_search', '_dispatchers', '_editors', '_names', '_active_group', '_undoable', '_rebuild', '_groups_cache' ]
- result
Result from a modal or wizard dialog:
result = Bool(False)
- scrollable
Should the created UI have scroll bars?
scrollable = Bool(False)
- title
Title of the dialog, if any
title = Str
- updated
Event when the user interface has changed
updated = Event(Bool)
- view
View template used to construct the user interface
view = Instance('enthought.traits.ui.view.View')
- view_elements
The ViewElements object from which this UI resolves Include items
view_elements = Instance(ViewElements)
Inherited from base classes
Method summary
- add_checked(self, checked_when, editor)
- add_defined(self, method)
- add_enabled(self, enabled_when, editor)
- add_visible(self, visible_when, editor)
- dispose(self, result = None, abort = False)
- do_undoable(self, action, *args, **kw)
- eval_when(self, when, result = True)
- evaluate(self, function, *args, **kw_args)
- find(self, include)
- finish(self)
- get_error_controls(self)
- get_extended_value(self, name)
- get_prefs(self, prefs = None)
- get_ui_db(self, mode = 'r')
- key_handler(self, event, skip = True)
- pop_level(self, level)
- prepare_ui(self)
- push_level(self)
- recycle(self)
- reset(self, destroy = True)
- restore_prefs(self)
- route_event(self, event)
- save_prefs(self, prefs = None)
- set_prefs(self, prefs)
- sync_view(self)
- traits_init(self)
- ui(self, parent, kind)
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
- add_checked(self, checked_when, editor)
Adds a conditionally enabled (menu) Editor object to the list of monitored 'checked_when' objects.
- add_defined(self, method)
Adds a Handler method to the list of methods to be called once the user interface has been constructed.
- add_enabled(self, enabled_when, editor)
Adds a conditionally enabled Editor object to the list of monitored 'enabled_when' objects.
- add_visible(self, visible_when, editor)
Adds a conditionally enabled Editor object to the list of monitored 'visible_when' objects.
- dispose(self, result = None, abort = False)
Disposes of the contents of a user interface.
- do_undoable(self, action, *args, **kw)
Performs an action that can be undone.
- eval_when(self, when, result = True)
Evaluates an expression in the UI's context and returns the result.
- evaluate(self, function, *args, **kw_args)
Evaluates a specified function in the UI's context.
- find(self, include)
Finds the definition of the specified Include object in the current user interface building context.
- finish(self)
Finishes disposing of a user interface.
- get_error_controls(self)
Returns the list of editor error controls contained by the user interface.
- get_extended_value(self, name)
Gets the current value of a specified extended trait name.
- get_prefs(self, prefs = None)
Gets the preferences to be saved for the user interface.
- get_ui_db(self, mode = 'r')
Returns a reference to the Traits UI preference database.
- key_handler(self, event, skip = True)
Handles key events.
- pop_level(self, level)
Restores a previously pushed search stack level.
- prepare_ui(self)
Performs all processing that occurs after the user interface is created.
- push_level(self)
Returns the current search stack level.
- recycle(self)
Recycles the user interface prior to rebuilding it.
- reset(self, destroy = True)
Resets the contents of a user interface.
- restore_prefs(self)
Retrieves and restores any saved user preference information associated with the UI.
- route_event(self, event)
Routes a "hooked" event to the correct handler method.
- save_prefs(self, prefs = None)
Saves any user preference information associated with the UI.
- set_prefs(self, prefs)
Sets the values of user preferences for the UI.
- sync_view(self)
Synchronize context object traits with view editor traits.
- traits_init(self)
Initializes the traits object.
- ui(self, parent, kind)
Creates a user interface from the associated View template object.