-wxMenuBar::wxMenuBar(int n, wxMenu *menus[], const wxString titles[])
+wxMenuBar::wxMenuBar(size_t n, wxMenu *menus[], const wxArrayString& titles, long WXUNUSED(style))
+ m_menus.Append(menus[i]);
+}
+
+wxMenuBar::wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long WXUNUSED(style))
+{
+ Init();
+
+ for ( size_t i = 0; i < n; i++ )
- wxCHECK_MSG( menu, FALSE, wxT("invalid menu") );
- wxCHECK_MSG( !menu->GetParent() && !menu->GetButtonWidget(), FALSE,
+ wxCHECK_MSG( menu, false, wxT("invalid menu") );
+ wxCHECK_MSG( !menu->GetParent() && !menu->GetButtonWidget(), false,
- WXWidget w = menu->CreateMenu(this, GetMainWidget(), menu, title, TRUE);
- wxCHECK_MSG( w, FALSE, wxT("failed to create menu") );
+ WXWidget w = menu->CreateMenu(this, GetMainWidget(), menu, title, true);
+ wxCHECK_MSG( w, false, wxT("failed to create menu") );
bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
{
if ( !wxMenuBarBase::Insert(pos, menu, title) )
bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
{
if ( !wxMenuBarBase::Insert(pos, menu, title) )
{
wxStripMenuCodes (wxConstCast(m_titles[i].c_str(), char), buf2);
if (strcmp (buf1, buf2) == 0)
{
wxStripMenuCodes (wxConstCast(m_titles[i].c_str(), char), buf2);
if (strcmp (buf1, buf2) == 0)
}
Widget menuBarW = XmCreateMenuBar ((Widget) parent->GetMainWidget(), "MenuBar", NULL, 0);
}
Widget menuBarW = XmCreateMenuBar ((Widget) parent->GetMainWidget(), "MenuBar", NULL, 0);
- menu->SetButtonWidget(menu->CreateMenu (this, menuBarW, menu, title, TRUE));
+ menu->SetButtonWidget(menu->CreateMenu (this, menuBarW, menu, title, true));
if (strcmp (wxStripMenuCodes(title), "Help") == 0)
XtVaSetValues ((Widget) menuBarW, XmNmenuHelpWidget, (Widget) menu->GetButtonWidget(), NULL);
if (strcmp (wxStripMenuCodes(title), "Help") == 0)
XtVaSetValues ((Widget) menuBarW, XmNmenuHelpWidget, (Widget) menu->GetButtonWidget(), NULL);
NULL);
Widget tearOff = XmGetTearOffControl(GetWidget(menu));
wxDoChangeForegroundColour((Widget) tearOff, m_foregroundColour);
NULL);
Widget tearOff = XmGetTearOffControl(GetWidget(menu));
wxDoChangeForegroundColour((Widget) tearOff, m_foregroundColour);