enthought / envisage

Envisage is a Python-based framework for building applications whose functionalities can be extended by adding "plug-ins".
http://docs.enthought.com/envisage/
Other
80 stars 26 forks source link

Experiment: Add a GUI-providing plugin #562

Open mdickinson opened 1 year ago

mdickinson commented 1 year ago

Recreation of #507 against the current main branch.

I cherry-picked the single commit of #507 onto the main branch, fixed up conflicts, and then applied style fixes.

Original description from @corranwebster:

This is a proof-of-concept which follows from some discussions about disentangling the GUI and SplashScreen objects: when using the SplashScreen support in a GUI object it requires very early creation of the GUI object, when it is really only needed at during the run method.

This shows how once this separation is done, the GUI object can be supplied by a plugin, and demonstrates use with the GUIApplication and TasksApplication classes and corresponding examples.

This attempts to be backwards compatible with existing code that (a) supplies a GUI directly and/or SplashScreen directly, or (b) relies on a default GUI and also doesn't know about GUIPlugin.

No tests right now, although existing tests might pass (it would be good if they did).