Will the DocumentWindow::menuBar please step forward?


#1

It would be great if DocumentWindow could expose some access to the underlying MenuBarComponent so that I could get at it to fix my ComponentBoundsConstrainer issue:

Component* DocumentWindow::getMenuBarComponent()

Plus, rather than a MenuBarComponent it would be cool if DocumentWindow just treated the menu bar as a plain old Component so I could provide my own native menu or fancy menu or whatever widget I want to live at the top of my window. This way we can write a new menu bar that works more like the Windows native menus without bothering Jules.

New function:

void DocumentWindow::setMenuBarComponent (Component* menuBarComponent);

The old function would of course just call the new one after creating a standard MenuBarComponent like before:

void DocumentWindow::setMenuBar (MenuBarModel* menuBarModel_,
                                                       const int menuBarHeight_)
{
  setMenuBarComponent (new MenuBarComponent(menuBarModel_);
}

Of course, the issue of the menu bar height and the adjustments in resized() will need to be addressed, but I left that out of these examples for clarity.


#2

Ok, thanks, I’ll see what I can do…