- bool processed = FALSE;
-
-#if wxUSE_MENU_CALLBACK
- // Try a callback
- if (m_callback)
- {
- (void) (*(m_callback)) (*this, event);
- processed = TRUE;
- }
-#endif // wxUSE_MENU_CALLBACK
+ bool processed = false;
-wxMenuBar::wxMenuBar(int n, wxMenu *menus[], const wxArrayString& titles)
+wxMenuBar::wxMenuBar(size_t n, wxMenu *menus[], const wxArrayString& titles, long WXUNUSED(style))
-wxMenuBar::wxMenuBar(int n, wxMenu *menus[], const wxString titles[])
+wxMenuBar::wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long WXUNUSED(style))
- 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) )
- Widget menuBarW = XmCreateMenuBar ((Widget) parent->GetMainWidget(), "MenuBar", NULL, 0);
+ Widget menuBarW = XmCreateMenuBar ((Widget) parent->GetMainWidget(),
+ wxMOTIF_STR("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);
- menu = XmCreatePopupMenu ((Widget) parent, "popup", args, 2);
+ menu = XmCreatePopupMenu ((Widget) parent, wxMOTIF_STR("popup"), args, 2);
- menu = XmCreatePulldownMenu ((Widget) parent, "pulldown", args, 2);
+ menu = XmCreatePulldownMenu ((Widget) parent, wxMOTIF_STR("pulldown"), args, 2);
- // Lesstif 0.87 hangs here, but 0.93 does not
-#if !wxCHECK_LESSTIF() || wxCHECK_LESSTIF_VERSION( 0, 93 )
+ // Lesstif 0.87 hangs here, but 0.93 does not; MBN: sometimes it does
+#if !wxCHECK_LESSTIF() // || wxCHECK_LESSTIF_VERSION( 0, 93 )
if (m_menuWidget && item->GetButtonWidget() && m_font.Ok())
{
XtVaSetValues ((Widget) item->GetButtonWidget(),
if (m_menuWidget && item->GetButtonWidget() && m_font.Ok())
{
XtVaSetValues ((Widget) item->GetButtonWidget(),
for (size_t i = 0; i < menuCount; i++)
m_menus.Item(i)->GetData()->SetBackgroundColour((wxColour&) col);
for (size_t i = 0; i < menuCount; i++)
m_menus.Item(i)->GetData()->SetBackgroundColour((wxColour&) col);
for (size_t i = 0; i < menuCount; i++)
m_menus.Item(i)->GetData()->SetForegroundColour((wxColour&) col);
for (size_t i = 0; i < menuCount; i++)
m_menus.Item(i)->GetData()->SetForegroundColour((wxColour&) col);