]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/menucmn.cpp
fix the incoherence pointed out by ifacecheck between wx docs, that documents usage...
[wxWidgets.git] / src / common / menucmn.cpp
index 49f2b2d20ffafc7b9e64d59fac4181cb1ceac7ab..37c0c127f11178e0866c10233995177382e16db6 100644 (file)
@@ -58,7 +58,8 @@ wxMenuItemBase::wxMenuItemBase(wxMenu *parentMenu,
                                wxItemKind kind,
                                wxMenu *subMenu)
 {
-    wxASSERT_MSG( parentMenu != NULL, wxT("menuitem should have a menu") );
+    // notice that parentMenu can be NULL: the item can be attached to the menu
+    // later with SetMenu()
 
     m_parentMenu  = parentMenu;
     m_subMenu     = subMenu;
@@ -125,6 +126,13 @@ void wxMenuItemBase::SetHelp(const wxString& str)
     }
 }
 
+#ifndef __WXPM__
+wxString wxMenuItemBase::GetLabelText(const wxString& text)
+{
+    return wxStripMenuCodes(text);
+}
+#endif
+
 #if WXWIN_COMPATIBILITY_2_8
 wxString wxMenuItemBase::GetLabelFromText(const wxString& text)
 {
@@ -820,7 +828,7 @@ wxString wxMenuBarBase::GetHelpString(int id) const
     return item->GetHelp();
 }
 
-void wxMenuBarBase::UpdateMenus( void )
+void wxMenuBarBase::UpdateMenus()
 {
     wxEvtHandler* source;
     wxMenu* menu;