-
Notifications
You must be signed in to change notification settings - Fork 54
Description
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:
class MainWindowProtocol(ContainerProtocol, Protocol):
def _mgui_create_menu_item(
self,
menu_name: str,
action_name: str,
callback: Callable | None = None,
shortcut: str | None = None,
) -> None:
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 using widget.native
if they choose.
fwiw, it looks like mne-python doesn't use AppLayout directly anywhere?
@larsoner, any insights/opinions from your mne applications?