3
8Ad]’
  ã               @   s<   d Z ddlm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.
é    )Úabsolute_import)Ú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 )ÚUIInfoz[ Represents the object and editor content of an active Traits-based
    user interface
    ztraitsui.ui.UIT)Ú
allow_noneFc             C   s*   x$| j jjƒ D ]\}}| j||ƒ qW dS )zZ Binds all of the associated context objects as traits of the
            object.
        N)ÚuiÚcontextÚitemsÚbind)ÚselfÚnameÚvalue© r   úl/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.6/site-packages/traitsui-6.1.2-py3.6.egg/traitsui/ui_info.pyÚbind_context6   s    zUIInfo.bind_contextNc             C   s@   |dkr|}t | |ƒs<| j|t|ƒƒ |dkr<| jjj|ƒ dS )z= Binds a name to a value if it is not already bound.
        NÚ )ÚhasattrZ	add_traitr   r	   Ú_namesÚappend)r   r   r   Úidr   r   r   r   A   s    
zUIInfo.bind)N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r	   r   Úinitializedr   r   r   r   r   r   r   #   s
   r   N)	r   Ú
__future__r   Z
traits.apir   r   r   r   r   r   r   r   r   Ú<module>   s   