3
6ßL]ƒ	  ã               @   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 )	ÚGUIApplicationa„   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 }| jƒ }|r0|j| d| ƒ |jƒ  | jƒ  |S )z— Run the application.

        Returns:
        --------
        Whether the application started successfully (i.e., without a veto).
        
        Úapplication_initialized)ÚguiÚstartZset_trait_laterZstart_event_loopÚstop)Úselfr   Ústarted© r   úA/tmp/pip-install-5sebvq2j/envisage/envisage/ui/gui_application.pyÚrun2   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_defaultL   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   