]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/menu.h
removed obsolete build files which are likely to confuse more than help people now
[wxWidgets.git] / include / wx / menu.h
index 624e2669efacf1d250ec6deb69a34e19b32cbbd3..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,
@@ -476,6 +485,9 @@ public:
     // don't want menu bars to accept the focus by tabbing to them
     virtual bool AcceptsFocusFromKeyboard() const { return false; }
 
+    // update all menu item states in all menus
+    virtual void UpdateMenus();
+
 protected:
     // the list of all our menus
     wxMenuList m_menus;
@@ -501,8 +513,10 @@ protected:
     #include "wx/msw/menu.h"
 #elif defined(__WXMOTIF__)
     #include "wx/motif/menu.h"
-#elif defined(__WXGTK__)
+#elif defined(__WXGTK20__)
     #include "wx/gtk/menu.h"
+#elif defined(__WXGTK__)
+    #include "wx/gtk1/menu.h"
 #elif defined(__WXMAC__)
     #include "wx/mac/menu.h"
 #elif defined(__WXCOCOA__)