a
    §ˆc£  ã                   @   s0   d dl mZmZ d dlmZ G dd„ deƒZdS )é    )Ú	HasTraitsÚInstance)ÚEditorc                       s@   e Zd ZdZeeƒZedƒZ‡ fdd„Zdd„ Z	dd„ Z
‡  ZS )	ÚTraitsEditorz/ An Editor that displays a Traits UI View.
    ztraitsui.ui.UIc                    s   | j r| j | dœS tƒ  ¡ S )zI Use the model object for the Traits UI context, if appropriate.
        )ÚobjectZeditor)ÚmodelÚsuperÚtrait_context©Úself©Ú	__class__© ú]/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/tasks/traits_editor.pyr	   "   s    zTraitsEditor.trait_contextc                 C   s   | j d|d�| _| jj| _dS )zE Create and set the toolkit-specific contents of the editor.
        Zsubpanel)ÚkindÚparentN)Zedit_traitsÚuiÚcontrol)r   r   r   r   r   Úcreate-   s    zTraitsEditor.createc                 C   s$   d| _ | jdur| j ¡  d| _dS )zJ Destroy the toolkit-specific control that represents the editor.
        N)r   r   Zdisposer
   r   r   r   Údestroy3   s    

zTraitsEditor.destroy)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r	   r   r   Ú__classcell__r   r   r   r   r      s   r   N)Z
traits.apir   r   Zpyface.tasks.editorr   r   r   r   r   r   Ú<module>   s   