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é   )ÚTaskPanec                       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 )	ÚTraitsTaskPanez0 A TaskPane 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pane)ÚmodelÚsuperÚtrait_context©Úself©Ú	__class__© ú`/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/tasks/traits_task_pane.pyr
   "   s    zTraitsTaskPane.trait_contextc                 C   s   | j d|d�| _| jj| _dS )z[ Create and set the toolkit-specific control that represents the
            pane.
        Zsubpanel)ÚkindÚparentN)Zedit_traitsÚuiÚcontrol)r   r   r   r   r   Úcreate-   s    zTraitsTaskPane.createc                 C   s   | j  ¡  d | _| _ dS )zH Destroy the toolkit-specific control that represents the pane.
        N)r   Zdisposer   r   r   r   r   Údestroy4   s    
zTraitsTaskPane.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	task_paner   r   r   r   r   r   Ú<module>   s   