// dynamic classes implementation
// ----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject)
-
// ----------------------------------------------------------------------------
// wxMenuItem
// ----------------------------------------------------------------------------
}
}
-/* static */
-wxString wxMenuItemBase::GetLabelFromText(const wxString& text)
-{
- return wxStripMenuCodes(text);
-}
-
// ----------------------------------------------------------------------------
// wxMenuItemBase
// ----------------------------------------------------------------------------
wxMenuItemDisarmCallback, (XtPointer) this);
}
}
- else if (GetId() == wxID_SEPARATOR)
+ else if (IsSeparator())
{
; // Nothing
}
}
-void wxMenuItem::SetText(const wxString& label)
+void wxMenuItem::SetItemLabel(const wxString& label)
{
char mnem = wxFindMnemonic (label);
wxString label2 = wxStripMenuCodes(label);
wxMenuItem *item = (wxMenuItem *) clientData;
if (item)
{
- wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED, item->GetId());
+ wxCommandEvent event(wxEVT_MENU, item->GetId());
event.SetInt( item->GetId() );
if (item->IsCheckable())
event.SetEventObject(item->GetMenuBar()->GetMenuBarFrame());
item->GetMenuBar()->GetMenuBarFrame()
- ->GetEventHandler()->ProcessEvent(event);
+ ->HandleWindowEvent(event);
}
// this is the child of a popup menu
else if (item->GetTopMenu())
menuEvent.SetEventObject(item->GetMenuBar()->GetMenuBarFrame());
item->GetMenuBar()->GetMenuBarFrame()
- ->GetEventHandler()->ProcessEvent(menuEvent);
+ ->HandleWindowEvent(menuEvent);
}
}
}
menuEvent.SetEventObject(item->GetMenuBar()->GetMenuBarFrame());
item->GetMenuBar()->GetMenuBarFrame()
- ->GetEventHandler()->ProcessEvent(menuEvent);
+ ->HandleWindowEvent(menuEvent);
}
}
}