if (!item->IsEnabled())
return;
- wxMenu* menu = item->GetMenu();
wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, item->GetId());
- event.SetEventObject( menu );
-
- wxEvtHandler* handler = menu->GetEventHandler();
- if (handler && handler->SafelyProcessEvent(event))
- return;
-
- wxWindow *win = menu->GetInvokingWindow();
- if (win) win->HandleWindowEvent( event );
+ DoCommonMenuCallbackCode(item->GetMenu(), event);
}
}
if (!item->IsEnabled())
return;
- wxMenu* menu = item->GetMenu();
wxMenuEvent event( wxEVT_MENU_HIGHLIGHT, -1 );
- event.SetEventObject( menu );
-
- wxEvtHandler* handler = menu->GetEventHandler();
- if (handler && handler->SafelyProcessEvent(event))
- return;
-
- wxWindow *win = menu->GetInvokingWindow();
- if (win)
- win->HandleWindowEvent( event );
+ DoCommonMenuCallbackCode(item->GetMenu(), event);
}
}