a
    §ˆcÂ	  ã                   @   s@   d Z ddlmZmZ ddlmZ ddlmZ G dd„ deƒZdS )	ú8 A wizard model that can be chained with other wizards. é    )ÚInstanceÚobserveé   )ÚIWizard)ÚWizardc                   @   s@   e Zd ZdZeeƒZdd„ Zedƒdd„ ƒZ	edƒdd	„ ƒZ
d
S )ÚChainedWizardr   c                 C   s   ddl m} |ƒ S )z Provide a default controller. r   )ÚChainedWizardController)Zchained_wizard_controllerr	   )Úselfr	   © r   ú_/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/wizard/chained_wizard.pyÚ_controller_default#   s    z!ChainedWizard._controller_defaultÚnext_wizardc                 C   s,   |j dur|j j| j_| jdur(|  ¡  dS )z' Handle the next wizard being changed. N)ÚnewÚ
controllerÚnext_controllerÚcontrolÚ_update©r
   Úeventr   r   r   Ú!_reset_next_controller_and_update.   s    

z/ChainedWizard._reset_next_controller_and_updater   c                 C   s6   |j dur | jdur | jj| j_| jdur2|  ¡  dS )z& handle the controller being changed. N)r   r   r   r   r   r   r   r   r   r   Ú&_reset_traits_on_controller_and_update=   s
    
z4ChainedWizard._reset_traits_on_controller_and_updateN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r   r   r   r   r      s   
r   N)	r   Z
traits.apir   r   Zi_wizardr   Zwizardr   r   r   r   r   r   Ú<module>   s   