-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experiment: Add a GUI-providing plugin #507
Conversation
@corranwebster and I have discussed this a bit offline. I'm summarising some of that discussion here (so the below isn't for @corranwebster, but for other readers, and possibly also for future me and Corran).
|
In particular, this would allow initial "cheap" solutions where an existing |
Thanks for the feedback. I guess to keep consistency if we had class IEventLoop(Interface):
def create(self):
# after calling create, can start and stop and register things to be invoked
def destroy(self):
# after calling destroy, can no longer start, stop or invoke
def start_event_loop(self):
...
def stop_event_loop(self):
...
def invoke_later(self, callback, ...):
...
def invoke_after(self, delay, callback, ...):
... etc. I think we either have to have |
Yep, that's pretty much what I was imagining. Agreed about needing something that does timing. There's also things like |
@corranwebster I've recreated this PR as #562, since the style fixes in |
Let's close this one. |
This is a proof-of-concept which follows from some discussions about disentangling the
GUI
andSplashScreen
objects: when using theSplashScreen
support in aGUI
object it requires very early creation of theGUI
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).