pyface.viewer.tree_content_provider module

Abstract base class for tree content providers.

class pyface.viewer.tree_content_provider.TreeContentProvider[source]

Bases: pyface.viewer.content_provider.ContentProvider

Abstract base class for tree content providers.

Tree content providers are used by (surprise, surprise) tree viewers!

get_elements(element)[source]

Returns a list of the elements to display in a viewer.

Returns a list of elements to display in a viewer when its (ie. the viewer’s) input is set to the given element.

The returned list should not be modified by the viewer.

get_parent(element)[source]

Returns the parent of an element.

Returns None if the element either has no parent (ie. it is the root of the tree), or if the parent cannot be computed.

get_children(element)[source]

Returns the children of an element.

has_children(element)[source]

Returns True iff the element has children, otherwise False.