a
    §ˆc�  ã                   @   sH   d dl mZmZ ddlmZ d dlmZ G dd„ deƒZeZeZ	eZ
dS )é    )ÚQtCoreÚQtGuié   )ÚEditor)ÚHeadingTextc                       s,   e Zd Zdd„ Zdd„ Z‡ fdd„Z‡  ZS )ÚSimpleEditorc                 C   sj   t |tjƒr| ¡ }t|dd�| _| j ¡  | jj| _| jj	r^| j 
¡ tjjjB }| j |¡ |  ¡  dS )z\Finishes initializing the editor by creating the underlying toolkit
        widget.
        F)ÚparentÚcreateN)Ú
isinstancer   ZQLayoutZparentWidgetr   Ú_controlr	   ÚcontrolÚfactoryZallow_selectionZtextInteractionFlagsr   ZQtZTextInteractionFlagZTextSelectableByMouseZsetTextInteractionFlagsZset_tooltip)Úselfr   Úflags© r   ú\/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/traitsui/qt4/title_editor.pyÚinit!   s    

ÿÿzSimpleEditor.initc                 C   s   | j | j_dS )zYUpdates the editor when the object trait changes external to the
        editor.
        N)Z	str_valuer   Útext©r   r   r   r   Úupdate_editor2   s    zSimpleEditor.update_editorc                    s"   | j dur| j  ¡  tƒ  ¡  dS )zkCleanly dispose of the editor.

        This ensures that the wrapped Pyface Widget is cleaned-up.
        N)r   ÚdestroyÚsuperÚdisposer   ©Ú	__class__r   r   r   8   s    

zSimpleEditor.dispose)Ú__name__Ú
__module__Ú__qualname__r   r   r   Ú__classcell__r   r   r   r   r      s   r   N)Z	pyface.qtr   r   Zeditorr   Z
pyface.apir   r   ZCustomEditorZReadonlyEditorZ
TextEditorr   r   r   r   Ú<module>   s   #