-
Notifications
You must be signed in to change notification settings - Fork 49
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
MainWindow for ipywidgets #601
Comments
Correct, currently we don't. I'm planning to rework all that stuff from scratch with I think Qt MainWindow is (much?) more widely used than ipywidgets AppLayout and also looks more feature-complete, so it might make the most sense to roughly follow the Qt naming scheme / model and squeeze this stuff into ipywidgets somehow. One possible way to unify Qt and notebook is to map the notebook
This allows only toolbars at the top, but that seems to be by far the most widely used mode so I think this is okay. Another option beyond FWIW In MNE we currently use all of the entries in the second column above except |
Here is at least some proof of concept for ipywidgets code
|
thanks so much @larsoner ... that proposal seems as good as any to me!
I agree with this too and i like your proposed model. I'm sure we'll encounter some challenges with it at some point (related to mismatched user expectations)... but since the two models don't map exactly onto each other it does seem like we just have to make an opinion.
Your help on that would be awesome. I like what you've started with. I'd be curious to hear what you would propose for methods and their behavior on the |
Yeah that sounds good! To keep things simple to start we could allow just a single widget per area: one ToolBar per toolbar area top/bottom/left/right (Qt allows multiple per area I think), a single Widget per dock area top/bottom/left/right, a single Widget as the central widget, etc. Someday if we want to allow multiple per area we can add a |
Love it! |
the Qt backend has a MainWindow but the ipywidgets backend doesn't. As @larsoner has pointed out, the closest ipywidgets analog is probably
AppLayout
In Qt, a main window is characterized by the ability to add a menu bar (top), status bar (bottom), dock widgets, and toolbars:
In ipywidgets, it's more a layout issue, with a header, a footer, two sidebars and a central pane:
Currently, our MainWindow protocol is a minimal subclass of
Container
that can add menus:but will likely gain
_mgui_add_toolbar
after #597...This raises the question of how represent these somewhat different concepts of "main window" in our API. If we use
AppLayout
behind the scenes, how do we assign stuff to left/middle/right? Or do we just ignore the left and right (and allow people to manually edit usingwidget.native
if they choose.fwiw, it looks like mne-python doesn't use AppLayout directly anywhere?
@larsoner, any insights/opinions from your mne applications?
The text was updated successfully, but these errors were encountered: