a
    §ˆcq  ã                   @   s0   d Z ddlmZmZmZmZ G dd„ deƒZdS )zx Defines the UIInfo class used to represent the object and editor content of
    an active Traits-based user interface.
é    )ÚHasPrivateTraitsÚInstanceÚConstantÚBoolc                   @   s6   e Zd ZdZeddd�ZedƒZdd„ Zdd	d
„Z	dS )ÚUIInfozZRepresents the object and editor content of an active Traits-based
    user interface
    ztraitsui.ui.UIT)Ú
allow_noneFc                 C   s&   | j j ¡ D ]\}}|  ||¡ qdS )zUBinds all of the associated context objects as traits of the
        object.
        N)ÚuiÚcontextÚitemsÚbind)ÚselfÚnameÚvalue© r   úS/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/traitsui/ui_info.pyÚbind_context!   s    zUIInfo.bind_contextNc                 C   s@   |du r|}t | |ƒs<|  |t|ƒ¡ |dkr<| jj |¡ dS )z3Binds a name to a value if it is not already bound.NÚ )ÚhasattrZ	add_traitr   r   Z_namesÚappend)r   r   r   Úidr   r   r   r   (   s    
zUIInfo.bind)N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   Zinitializedr   r   r   r   r   r   r      s
   	r   N)r   Z
traits.apir   r   r   r   r   r   r   r   r   Ú<module>   s   