]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/menu.h
Escape underscores
[wxWidgets.git] / include / wx / menu.h
index 23cf0efa5b41109a1395123e11c672882a055f81..f03dc59acbe2d69ca15febe16186497cf1d96dd5 100644 (file)
@@ -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,