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)ÚDockPanec                       sD   e Zd ZdZeeƒZedƒZ‡ fdd„Z‡ fdd„Z	dd„ Z
‡  ZS )	ÚTraitsDockPanez0 A DockPane 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_dock_pane.pyr	   "   s    zTraitsDockPane.trait_contextc                    s   | j  ¡  d| _ tƒ  ¡  dS )zH Destroy the toolkit-specific control that represents the pane.
        N)ÚuiZdisposer   Údestroyr
   r   r   r   r   -   s    
zTraitsDockPane.destroyc                 C   s   | j d|d�| _| jjS )zK Create and return the toolkit-specific contents of the dock pane.
        Zsubpanel)ÚkindÚparent)Zedit_traitsr   Úcontrol)r   r   r   r   r   Úcreate_contents;   s    zTraitsDockPane.create_contents)Ú__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.dock_paner   r   r   r   r   r   Ú<module>   s   