Inherits from
- HasPrivateTraits: enthought.traits.has_traits.HasPrivateTraits
Attributes
Inherited from base classes
Method summary
- apply(self, info)
- can_drop(self, info, object)
- can_import(self, info, category)
- close(self, info, is_ok)
- closed(self, info, is_ok)
- configure_traits(self, filename = None, view = None, kind = None, edit = True, context = None, handler = None, id = '', scrollable = None, **args)
- dock_control_for(self, info, parent, object)
- dock_window_empty(self, dock_window)
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
- init(self, info)
- init_info(self, info)
- open_view_for(self, control, use_mouse = True)
- position(self, info)
- revert(self, info)
- setattr(self, info, object, name, value)
- show_help(self, info, control = None)
- trait_view_for(self, info, view, object, object_name, trait_name)
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)
- copy_traits(self, other, traits = None, memo = None, copy = None, **metadata)
- copyable_trait_names(self, **metadata)
- default_traits_view(self)
- 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
- apply(self, info)
Handles the Apply button being clicked.
- can_drop(self, info, object)
Can the specified object be inserted into the view?
- can_import(self, info, category)
- close(self, info, is_ok)
Handles the user attempting to close a dialog-based user interface.
Parameters
- info : UIInfo object
- The UIInfo object associated with the view
- is_ok : Boolean
- Indicates whether the user confirmed the changes (such as by clicking OK.)
Returns
A Boolean, indicating whether the window should be allowed to close.
Description
This method is called when the user attempts to close a window, by clicking an OK or Cancel button, or clicking a Close control on the window). It is called before the window is actually destroyed. Override this method to perform any checks before closing a window.
While Traits UI handles "OK" and "Cancel" events automatically, you can use the value of the is_ok parameter to implement additional behavior.
- closed(self, info, is_ok)
Handles a dialog-based user interface being closed by the user.
Parameters
- info : UIInfo object
- The UIInfo object associated with the view
- is_ok : Boolean
- Indicates whether the user confirmed the changes (such as by clicking OK.)
Description
This method is called after the window is destroyed. Override this method to perform any clean-up tasks needed by the application.
- configure_traits(self, filename = None, view = None, kind = None, edit = True, context = None, handler = None, id = '', scrollable = None, **args)
Configures the object's traits.
- dock_control_for(self, info, parent, object)
Returns the DockControl object for a specified object.
- dock_window_empty(self, dock_window)
Handles a DockWindow becoming empty.
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
Edits the object's traits.
- init(self, info)
Initializes the controls of a user interface.
Parameters
- info : UIInfo object
- The UIInfo object associated with the view
Returns
A Boolean, indicating whether the user interface was successfully initialized. A True value indicates that the UI can be displayed; a False value indicates that the display operation should be cancelled. The default implementation returns True without taking any other action.
Description
This method is called after all user interface elements have been created, but before the user interface is displayed. Override this method to customize the user interface before it is displayed.
- init_info(self, info)
Informs the handler what the UIInfo object for a View will be.
This method is called before the UI for the View has been constructed. It is provided so that the handler can save the reference to the UIInfo object in case it exposes viewable traits whose values are properties that depend upon items in the context being edited.
- open_view_for(self, control, use_mouse = True)
Creates a new view of a specified control.
- position(self, info)
Positions a dialog-based user interface on the display.
Parameters
- info : UIInfo object
- The UIInfo object associated with the window
Returns
Nothing.
Description
This method is called after the user interface is initialized (by calling init()), but before the user interface is displayed. Override this method to position the window on the display device. The default implementation calls the position() method of the current toolkit.
Usually, you do not need to override this method, because you can control the window's placement using the x and y attributes of the View object.
- revert(self, info)
Handles the Revert button being clicked.
- setattr(self, info, object, name, value)
Handles the user setting a specified object trait's value.
Parameters
- object : object
- The object whose attribute is being set
- name : string
- The name of the attribute being set
- value
- The value to which the attribute is being set
Description
This method is called when an editor attempts to set a new value for a specified object trait attribute. Use this method to control what happens when a trait editor tries to set an attribute value. For example, you can use this method to record a history of changes, in order to implement an "undo" mechanism. No result is returned. The default implementation simply calls the built-in setattr() function. If you override this method, make sure that it actually sets the attribute, either by calling the parent method or by setting the attribute directly
- show_help(self, info, control = None)
Shows the help associated with the view.
Parameters
- info : UIInfo object
- The UIInfo object associated with the view
- control : UI control
- The control that invokes the help dialog box
Description
This method is called when the user clicks a Help button in a Traits user interface. The method calls the global help handler, which might be the default help handler, or might be a custom help handler. See enthought.traits.ui.help for details about the setting the global help handler.
- trait_view_for(self, info, view, object, object_name, trait_name)
Gets a specified View object.