3
8ßL]  ã               @   s|   d Z ddlmZ ddlZddlm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.
é    )Úabsolute_importN)ÚStr)ÚToolkitEditorFactoryé   )ÚEditor)ÚTraitsUIPanelc                   s4   e Zd ZdZeZdd„ Zdd„ Z‡ fdd„Z‡  Z	S )ÚCompoundEditorzw Editor for compound traits, which displays editors for each of the
    combined traits, in the appropriate style.
    c             C   s¢   t |dƒ | _}tjtjƒ}g  | _}xd| jjD ]X}t|| j	ƒ| j
| j| j| j|ƒ}|j|ƒ |j|jdtjtjB |jB dƒ |j|ƒ q0W |j|ƒ | jƒ  dS )za Finishes initializing the editor by creating the underlying toolkit
            widget.
        r   é   Néÿÿÿÿ)r   ÚcontrolÚwxZBoxSizerZVERTICALÚ_editorsÚfactoryÚeditorsÚgetattrÚkindÚuiÚobjectÚnameÚdescriptionÚprepareÚAddZTOPZBOTTOMZlayout_styleÚappendZSetSizerAndFitZset_tooltip)ÚselfÚparentZpanelZsizerr   r   Úeditor© r   úA/tmp/pip-install-5sebvq2j/traitsui/traitsui/wx/compound_editor.pyÚinitA   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*   x| j D ]}|jƒ  qW tt| ƒjƒ  dS )z0 Disposes of the contents of an editor.
        N)r   ÚdisposeÚsuperr   )r   r   )Ú	__class__r   r   r    l   s    zCompoundEditor.dispose)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r    Ú__classcell__r   r   )r"   r   r   1   s
   !
r   c               @   s   e Zd ZdZdS )ÚSimpleEditorZsimple_editorN)r#   r$   r%   r   r   r   r   r   r(   y   s   r(   c               @   s   e Zd ZdZdS )ÚCustomEditorZcustom_editorN)r#   r$   r%   r   r   r   r   r   r)   „   s   r)   )r&   Ú
__future__r   r   Z
traits.apir   Z traitsui.editors.compound_editorr   r   r   Úhelperr   r   r(   r)   r   r   r   r   Ú<module>   s   H