#ifdef __VMS__
#pragma message disable nosimpint
-#define XtDisplay XTDISPLAY
-#define XtWindow XTWINDOW
#endif
#include <Xm/Label.h>
#include <Xm/LabelG.h>
bool wxMenu::ProcessCommand(wxCommandEvent & event)
{
- bool processed = false;
+ // Try the menu's event handler first
+ wxEvtHandler * const handler = GetEventHandler();
+ bool processed = handler ? handler->SafelyProcessEvent(event) : false;
- // Try the menu's event handler
- if ( !processed && GetEventHandler())
- {
- processed = GetEventHandler()->ProcessEvent(event);
- }
// Try the window the menu was popped up from (and up
// through the hierarchy)
if ( !processed && GetInvokingWindow())
- processed = GetInvokingWindow()->ProcessEvent(event);
+ processed = GetInvokingWindow()->HandleWindowEvent(event);
return processed;
}
XmNlabelString, label_str(),
NULL);
}
- m_titles[i] = label;
+ m_titles[pos] = label;
}
wxString wxMenuBar::GetMenuLabel(size_t pos) const