3
<Ad]Á  ã               @   sd   d Z ddlmZmZmZ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dS )z' The interface for all pyface wizards. é    )ÚBoolÚInstanceÚListÚUnicode)ÚIDialogé   )ÚIWizardController)ÚIWizardPagec               @   s@   e Zd ZdZeeƒZeeƒZ	e
dƒZedƒZdd„ Zdd„ ZdS )	ÚIWizardz' The interface for all pyface wizards. TZWizardc             C   s   dS )z) Advance to the next page in the wizard. N© )Úselfr   r   úp/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.6/site-packages/pyface-6.1.2-py3.6.egg/pyface/wizard/i_wizard.pyÚnext2   s    zIWizard.nextc             C   s   dS )z, Return to the previous page in the wizard. Nr   )r   r   r   r   Úprevious5   s    zIWizard.previousN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r	   Zpagesr   r   Ú
controllerr   Zshow_cancelr   Útitler   r   r   r   r   r   r
      s   r
   c                   sX   e Zd ZdZdd„ Zdd„ Z‡ fdd„Zdd	„ Zd
d„ Zdd„ Z	dd„ Z
dd„ Z‡  ZS )ÚMWizardz¼ The mixin class that contains common code for toolkit specific
    implementations of the IWizard interface.

    Implements: next(), previous()
    Reimplements: _create_contents()

    c             C   s   | j j| j jƒ}| j|ƒ dS )z) Advance to the next page in the wizard. N)r   Zget_next_pageÚcurrent_pageÚ
_show_page)r   Úpager   r   r   r   F   s    
zMWizard.nextc             C   s   | j j| j jƒ}| j|ƒ dS )z, Return to the previous page in the wizard. N)r   Zget_previous_pager   r   )r   r   r   r   r   r   N   s    
zMWizard.previousc                s0   t t| ƒj|ƒ | j| jƒ | j| jjƒ ƒ dS )z Creates the window contents. N)Úsuperr   Ú_create_contentsÚ_initialize_controllerr   r   Zget_first_page)r   Úparent)Ú	__class__r   r   r   Z   s    zMWizard._create_contentsc             C   s   || j _dS )z Show the specified page. N)r   r   )r   r   r   r   r   r   l   s    zMWizard._show_pagec             C   s   dS )z@ Enables/disables buttons depending on the state of the wizard. Nr   )r   r   r   r   Ú_updatev   s    zMWizard._updatec             C   s    |j | jdƒ |j | jdƒ dS )z$ Initializes the wizard controller. Úcompleter   N)Úon_trait_changer   Ú_on_current_page_changed)r   r   r   r   r   r      s    
zMWizard._initialize_controllerc             C   s<   |dk	r|j | jddd� |dk	r0|j | jdƒ | jƒ  dS )z* Called when the current page is changed. Nr    T)Úremove)r!   r   )r   ÚobjZ
trait_nameÚoldÚnewr   r   r   r"   Œ   s    z MWizard._on_current_page_changedc             C   s   | j jƒ  dS )z# Called when the wizard is closed. N)r   Zdispose_pages)r   r   r   r   Ú_on_closed_changed™   s    
zMWizard._on_closed_changed)r   r   r   r   r   r   r   r   r   r   r"   r'   Ú__classcell__r   r   )r   r   r   9   s   
	r   N)r   Z
traits.apir   r   r   r   Zpyface.i_dialogr   Zi_wizard_controllerr   Zi_wizard_pager	   r
   Úobjectr   r   r   r   r   Ú<module>   s   