a
    §ˆc£
  ã                   @   sd   d Z ddlZddlmZ ddlmZ ddlmZ G dd„ deƒZG d	d
„ d
eƒZ	G dd„ deƒZ
dS )zj Defines the compound editor and the compound editor factory for the
    wxPython user interface toolkit.
é    N)ÚStré   )ÚEditor)ÚTraitsUIPanelc                       s6   e Zd ZdZeƒ Zdd„ Zdd„ Z‡ fdd„Z‡  Z	S )ÚCompoundEditorzvEditor for compound traits, which displays editors for each of the
    combined traits, in the appropriate style.
    c                 C   sž   t |dƒ | _}t tj¡}g  | _}| jjD ]X}t|| j	ƒ| j
| j| j| j|ƒ}| |¡ | |jdtjtjB |jB d¡ | |¡ q.| |¡ |  ¡  dS )z\Finishes initializing the editor by creating the underlying toolkit
        widget.
        éÿÿÿÿr   é   N)r   ÚcontrolÚwxZBoxSizerZVERTICALÚ_editorsÚfactoryÚeditorsÚgetattrÚkindZuiÚobjectÚnameÚdescriptionÚprepareÚAddZTOPZBOTTOMZlayout_styleÚappendZSetSizerAndFitZset_tooltip)ÚselfÚparentZpanelZsizerr   r   Úeditor© r   ú^/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/traitsui/wx/compound_editor.pyÚinit)   s    

ÿ
ÿ
zCompoundEditor.initc                 C   s   dS )z[Updates the editor when the object trait changes externally to the
        editor.
        Nr   )r   r   r   r   Úupdate_editorB   s    zCompoundEditor.update_editorc                    s"   | j D ]}| ¡  qtƒ  ¡  dS )z&Disposes of the contents of an editor.N)r   ÚdisposeÚsuper)r   r   ©Ú	__class__r   r   r   H   s    

zCompoundEditor.dispose)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   Ú__classcell__r   r   r   r   r      s
   	r   c                   @   s   e Zd ZdZdS )ÚSimpleEditorZsimple_editorN©r!   r"   r#   r   r   r   r   r   r&   P   s   r&   c                   @   s   e Zd ZdZdS )ÚCustomEditorZcustom_editorNr'   r   r   r   r   r(   W   s   r(   )r$   r
   Z
traits.apir   r   r   Úhelperr   r   r&   r(   r   r   r   r   Ú<module>   s   3