X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1be7a35c5ec31b6cfcab9d969c7969586441a945..6bd719f16c64ac2757a40782b709d30e810d2eff:/include/wx/menu.h diff --git a/include/wx/menu.h b/include/wx/menu.h index 23cf0efa5b..f03dc59acb 100644 --- a/include/wx/menu.h +++ b/include/wx/menu.h @@ -87,12 +87,11 @@ public: } // append a submenu - wxMenuItem* Append(int itemid, - const wxString& text, - wxMenu *submenu, - const wxString& help = wxEmptyString) + wxMenuItem* AppendSubMenu(wxMenu *submenu, + const wxString& text, + const wxString& help = wxEmptyString) { - return DoAppend(wxMenuItem::New((wxMenu *)this, itemid, text, help, + return DoAppend(wxMenuItem::New((wxMenu *)this, wxID_ANY, text, help, wxITEM_NORMAL, submenu)); } @@ -309,6 +308,16 @@ public: Append(itemid, text, help, isCheckable ? wxITEM_CHECK : wxITEM_NORMAL); } + // use more readable and not requiring unused itemid AppendSubMenu() instead + wxMenuItem* Append(int itemid, + const wxString& text, + wxMenu *submenu, + const wxString& help = wxEmptyString) + { + return DoAppend(wxMenuItem::New((wxMenu *)this, itemid, text, help, + wxITEM_NORMAL, submenu)); + } + void Insert(size_t pos, int itemid, const wxString& text,