a
    ©ˆc  ã                   @   s4   d Z ddlmZmZ ddlmZ G dd„ deƒZdS )aa  
Envisage GUI Application
------------------------

This class handles the life-cycle of a Pyface GUI.  Plugins can
display windows via mechinisms such as edit_traits().

This is intended to be a very simple shell for lifting an existing
pure TraitsUI or Pyface (or even Qt) app into an Envisage app.

More sophisticated applications should use Tasks.

é    )ÚEventÚSupports)ÚApplicationc                   @   s4   e Zd ZdZedƒZedƒZeZdd„ Z	dd„ Z
dS )	ÚGUIApplicationax   The entry point for an Envisage GUI application.

    This class handles the life-cycle of a Pyface GUI.  Plugins can
    display windows via mechinisms such as edit_traits().

    This is intended to be a very simple shell for lifting an existing
    pure TraitsUI or Pyface (or even Qt) app into an Envisage app.

    More sophisticated applications should use Tasks.

    zpyface.i_gui.IGUIz$pyface.i_splash_screen.ISplashScreenc                 C   s4   | j }|  ¡ }|r0| | d| ¡ | ¡  |  ¡  |S )zª Run the application.

        Returns
        -------
        bool
            Whether the application started successfully (i.e., without a
            veto).

        Úapplication_initialized)ÚguiÚstartZset_trait_laterZstart_event_loopÚstop)Úselfr   Ústarted© r   ú^/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/envisage/ui/gui_application.pyÚrun;   s    zGUIApplication.runc                 C   s   ddl m} || jd�S )Nr   )ÚGUI)Úsplash_screen)Z
pyface.apir   r   )r
   r   r   r   r   Ú_gui_defaultW   s    zGUIApplication._gui_defaultN)Ú__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envisage.apir   r   r   r   r   r   Ú<module>
   s   