Inherits from
- HasPrivateTraits: enthought.traits.has_traits.HasPrivateTraits
Attributes
- add
List of object classes than can be added or copied
add = List(Any)
- auto_close
Automatically close sibling tree nodes?
auto_close = Bool(False)
- auto_open
Should tree nodes be automatically opened (expanded)?
auto_open = Bool(False)
- children
Name of trait containing children (if '', the node is a leaf).
children = Str
- copy
Can the object's children be copied?
copy = Bool(True)
- delete
Can the object's children be deleted?
delete = Bool(True)
- delete_me
Can the object be deleted (if its parent allows it)?
delete_me = Bool(True)
- formatter
Function for formatting the label
formatter = Callable
- icon_group
Name of group item icon
icon_group = Str('<group>')
- icon_item
Name of leaf item icon
icon_item = Str('<item>')
- icon_open
Name of opened group item icon
icon_open = Str('<open>')
- icon_path
Resource path used to locate the node icon
icon_path = Str
- insert
Can children be inserted (vs. appended)?
insert = Bool(True)
- label
Either the name of a trait containing a label, or a constant label, if the string starts with '='.
label = Str
- move
List of object classes that can be moved
move = List(Any)
- name
Name to use for a new instance
name = Str
- node_for
List of object classes and/or interfaces that the node applies to
node_for = List(Any)
- node_for_class
Tuple of object classes that the node applies to
node_for_class = Property(depends_on = 'node_for')
- node_for_interface
List of object interfaces that the node applies to
node_for_interface = Property(depends_on = 'node_for')
- on_click
Function for handling clicking an object
on_click = Callable
- on_dclick
Function for handling double-clicking an object
on_dclick = Callable
- on_select
Function for handling selecting an object
on_select = Callable
- rename
Can the object's children be renamed?
rename = Bool(True)
- rename_me
Can the object be renamed?
rename_me = Bool(True)
- tooltip
Either the name of a trait containing a tooltip, or constant tooltip, if the string starts with '='.
tooltip = Str
- tooltip_formatter
Function for formatting the tooltip
tooltip_formatter = Callable
- view
View to use for editing the object
view = Instance(View)
Inherited from base classes
Method summary
- __init__(self, **traits)
- allows_children(self, object)
- append_child(self, object, child)
- can_add(self, object, add_object)
- can_auto_close(self, object)
- can_auto_open(self, object)
- can_copy(self, object)
- can_delete(self, object)
- can_delete_me(self, object)
- can_insert(self, object)
- can_rename(self, object)
- can_rename_me(self, object)
- click(self, object)
- confirm_delete(self, object)
- dclick(self, object)
- delete_child(self, object, index)
- drop_object(self, object, dropped_object)
- get_add(self, object)
- get_children(self, object)
- get_children_id(self, object)
- get_drag_object(self, object)
- get_icon(self, object, is_expanded)
- get_icon_path(self, object)
- get_label(self, object)
- get_menu(self, object)
- get_name(self, object)
- get_tooltip(self, object)
- get_view(self, object)
- has_children(self, object)
- insert_child(self, object, index, child)
- is_addable(self, klass)
- is_node_for(self, object)
- select(self, object)
- set_label(self, object, label)
- when_children_changed(self, object, listener, remove)
- when_children_replaced(self, object, listener, remove)
- when_label_changed(self, object, listener, remove)
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, **traits)
- allows_children(self, object)
Returns whether this object can have children.
- append_child(self, object, child)
Appends a child to the object's children.
- can_add(self, object, add_object)
Returns whether a given object is droppable on the node.
- can_auto_close(self, object)
Returns whether the object's children should be automatically closed.
- can_auto_open(self, object)
Returns whether the object's children should be automatically opened.
- can_copy(self, object)
Returns whether the object's children can be copied.
- can_delete(self, object)
Returns whether the object's children can be deleted.
- can_delete_me(self, object)
Returns whether the object can be deleted.
- can_insert(self, object)
Returns whether the object's children can be inserted (vs. appended).
- can_rename(self, object)
Returns whether the object's children can be renamed.
- can_rename_me(self, object)
Returns whether the object can be renamed.
- click(self, object)
Handles an object being clicked.
- confirm_delete(self, object)
Checks whether a specified object can be deleted.
Returns
- True if the object should be deleted with no further prompting.
- False if the object should not be deleted.
- Anything else: Caller should take its default action (which might include prompting the user to confirm deletion).
- dclick(self, object)
Handles an object being double-clicked.
- delete_child(self, object, index)
Deletes a child at a specified index from the object's children.
- drop_object(self, object, dropped_object)
Returns a droppable version of a specified object.
- get_add(self, object)
Returns the list of classes that can be added to the object.
- get_children(self, object)
Gets the object's children.
- get_children_id(self, object)
Gets the object's children identifier.
- get_drag_object(self, object)
Returns a draggable version of a specified object.
- get_icon(self, object, is_expanded)
Returns the icon for a specified object.
- get_icon_path(self, object)
Returns the path used to locate an object's icon.
- get_label(self, object)
Gets the label to display for a specified object.
- get_name(self, object)
Returns the name to use when adding a new object instance (displayed in the "New" submenu).
- get_tooltip(self, object)
Gets the tooltip to display for a specified object.
- get_view(self, object)
Gets the view to use when editing an object.
- has_children(self, object)
Returns whether the object has children.
- insert_child(self, object, index, child)
Inserts a child into the object's children.
- is_addable(self, klass)
Returns whether a specified object class can be added to the node.
- is_node_for(self, object)
Returns whether this is the node that handles a specified object.
- select(self, object)
Handles an object being selected.
- set_label(self, object, label)
Sets the label for a specified object.
- when_children_changed(self, object, listener, remove)
Sets up or removes a listener for children being changed on a specified object.
- when_children_replaced(self, object, listener, remove)
Sets up or removes a listener for children being replaced on a specified object.
- when_label_changed(self, object, listener, remove)
Sets up or removes a listener for the label being changed on a specified object.