wxMenuEvent event( wxEVT_MENU_HIGHLIGHT, id );
event.SetEventObject( menu );
-/* wxMSW doesn't call callback here either
-
- if (menu->m_callback)
- {
- (void) (*(menu->m_callback)) (*menu, event);
- return;
- }
-*/
-
if (menu->GetEventHandler()->ProcessEvent(event))
return;
IMPLEMENT_DYNAMIC_CLASS(wxMenu,wxEvtHandler)
-wxMenu::wxMenu( const wxString& title, const wxFunction func, long style )
-{
- Init(title, func, style);
-}
-
-wxMenu::wxMenu(long style)
-{
- Init(wxEmptyString, (wxFunction) NULL, style);
-}
-
void
-wxMenu::Init( const wxString& title, const wxFunction func, long style )
+wxMenu::Init( const wxString& title,
+ long style
+#ifdef WXWIN_COMPATIBILITY
+ , const wxFunction func
+#endif
+ )
{
m_title = title;
m_items.DeleteContents( TRUE );
m_menu = gtk_menu_new(); // Do not show!
#endif
+#ifdef WXWIN_COMPATIBILITY
m_callback = func;
+#endif
+
m_eventHandler = this;
m_clientData = (void*) NULL;