a
    §ˆcG  ã                   @   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                   @   s@   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   úd/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/preference/preference_node.pyÚ__str__1   s    zPreferenceNode.__str__c                 C   s
   t ƒ ‚dS )z, Creates the preference page for this node. N)ÚNotImplementedErrorr   r   r   r	   Úcreate_page:   s    zPreferenceNode.create_pagec                 C   s"   | j D ]}|j|kr qq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	   Úlookup?   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   