3
7ßL]ô  ã               @   s$   d Z ddlmZ G dd„ deƒZdS )z1 Abstract base class for tree content providers. é   )ÚContentProviderc               @   s0   e Zd ZdZdd„ Zdd„ Zdd„ Zdd	„ Zd
S )ÚTreeContentProviderz� Abstract base class for tree content providers.

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

    c             C   s   t |ƒS )a   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_children)ÚselfÚelement© r   úG/tmp/pip-install-5sebvq2j/pyface/pyface/viewer/tree_content_provider.pyÚget_elements    s    
z TreeContentProvider.get_elementsc             C   s   dS )zµ 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.

        Nr   )r   r   r   r   r   Ú
get_parent0   s    zTreeContentProvider.get_parentc             C   s   t ‚dS )z% Returns the children of an element. N)ÚNotImplementedError)r   r   r   r   r   r   :   s    z TreeContentProvider.get_childrenc             C   s   t ‚dS )z= Returns True iff the element has children, otherwise False. N)r   )r   r   r   r   r   Úhas_children?   s    z TreeContentProvider.has_childrenN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r	   r
   r   r   r   r   r   r   r      s
   
r   N)r   Zcontent_providerr   r   r   r   r   r   Ú<module>   s   