3
7ßL]š	  ã               @   s0   d Z ddlmZ ddlmZ G dd„ deƒZdS )zÂ Abstract base class for a node in a preference dialog.

A preference node has a label and an image which are used to represent the node
in a preference dialog (usually in the form of a tree).

é    )ÚTreeItem)ÚStrc               @   s8   e Zd ZdZeZeZeZeZdd„ Z	dd„ Z
dd„ ZdS )	ÚPreferenceNodezÍ Abstract base class for a node in a preference dialog.

    A preference node has a name and an image which are used to represent the
    node in a preference dialog (usually in the form of a tree).

    c             C   s   | j S )z0 Returns the string representation of the item. )Úname)Úself© r   úE/tmp/pip-install-5sebvq2j/pyface/pyface/preference/preference_node.pyÚ__str__5   s    zPreferenceNode.__str__c             C   s   t ‚dS )z, Creates the preference page for this node. N)ÚNotImplementedError)r   r   r   r   Úcreate_page>   s    zPreferenceNode.create_pagec             C   s$   x| j D ]}|j|krP qW d}|S )zo Returns the child of this node with the specified Id.

        Returns None if no such child exists.

        N)ÚchildrenÚid)r   r   Únoder   r   r   ÚlookupC   s
    
zPreferenceNode.lookupN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úimager   Zhelp_idr	   r   r   r   r   r   r   r      s   	r   N)r   Zpyface.viewer.tree_itemr   Z
traits.apir   r   r   r   r   r   Ú<module>   s   