<s> """<STR_LIT>""" <EOL> import logging <EOL> import traitsui <EOL> from envisage . api import Application <EOL> from pyface . api import AboutDialog , Dialog , GUI , ImageResource <EOL> from pyface . api import SplashScreen <EOL> from pyface . workbench . api import IWorkbench <EOL> from traits . api import Callable , Instance , Str , Tuple <EOL> from . workbench import Workbench <EOL> logger = logging . getLogger ( __name__ ) <EOL> class WorkbenchApplication ( Application ) : <EOL> """<STR_LIT>""" <EOL> gui = Instance ( GUI ) <EOL> workbench = Instance ( IWorkbench ) <EOL> workbench_factory = Callable ( Workbench ) <EOL> about_dialog = Instance ( Dialog ) <EOL> icon = Instance ( ImageResource , ImageResource ( '<STR_LIT>' ) ) <EOL> name = Str ( '<STR_LIT>' ) <EOL> splash_screen = Instance ( SplashScreen ) <EOL> window_position = Tuple ( ( <NUM_LIT:200> , <NUM_LIT:200> ) ) <EOL> window_size = Tuple ( ( <NUM_LIT> , <NUM_LIT> ) ) <EOL> def run ( self ) : <EOL> """<STR_LIT>""" <EOL> logger . debug ( '<STR_LIT>' ) <EOL> gui = self . gui <EOL> if self . start ( ) : <EOL> window = self . workbench . create_window ( <EOL> position = self . window_position , size = self . window_size <EOL> ) <EOL> window . open ( ) <EOL> self . workbench . on_trait_change ( self . _on_workbench_exited , '<STR_LIT>' ) <EOL> gui . start_event_loop ( ) <EOL> return <EOL> def _about_dialog_default ( self ) : <EOL> """<STR_LIT>""" <EOL> return AboutDialog ( image = ImageResource ( '<STR_LIT>' ) ) <EOL> def _gui_default ( self ) : <EOL> """<STR_LIT>""" <EOL> return GUI ( splash_screen = self . splash_screen ) <EOL> def _workbench_default ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . create_workbench ( ) <EOL> def about ( self ) : <EOL> """<STR_LIT>""" <EOL> self . about_dialog . open ( ) <EOL> return <EOL> def create_workbench ( self ) : <EOL> """<STR_LIT>""" <EOL> logger . debug ( '<STR_LIT>' , self . workbench_factory ) <EOL> return self . workbench_factory ( application = self ) <EOL> def exit ( self ) : <EOL> """<STR_LIT>""" <EOL> self . workbench . exit ( ) <EOL> return <EOL> def _on_workbench_exited ( self ) : <EOL> """<STR_LIT>""" <EOL> self . gui . invoke_later ( self . stop ) <EOL> return </s>
