X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c7e52709fcfaf87da5ccd9f5457022a94e0f8575..178c77606f3186250b42685ca752d0bc34cd02e9:/interface/wx/menu.h diff --git a/interface/wx/menu.h b/interface/wx/menu.h index 175b574cb1..f1c9b97d05 100644 --- a/interface/wx/menu.h +++ b/interface/wx/menu.h @@ -27,7 +27,7 @@ @library{wxcore} @category{menus} - @see wxMenu, @ref overview_eventhandling + @see wxMenu, @ref overview_events */ class wxMenuBar : public wxWindow { @@ -427,12 +427,12 @@ public: specifying an object whose class has @c EVT_MENU entries; Note that instead of static @c EVT_MENU macros you can also use dynamic - connection; see @ref overview_eventhandling_connect. + connection; see @ref overview_events_bind. @library{wxcore} @category{menus} - @see wxMenuBar, wxWindow::PopupMenu, @ref overview_eventhandling, + @see wxMenuBar, wxWindow::PopupMenu, @ref overview_events, @ref wxFileHistory "wxFileHistory (most recently used files menu)" */ class wxMenu : public wxEvtHandler @@ -678,6 +678,23 @@ public: */ void Enable(int id, bool enable); + /** + Finds the menu item object associated with the given menu item identifier + and, optionally, the position of the item in the menu. + + Unlike FindItem(), this function doesn't recurse but only looks at the + direct children of this menu. + + @param id + The identifier of the menu item to find. + @param pos + If the pointer is not @NULL, it is filled with the item's position if + it was found or @c (size_t)wxNOT_FOUND otherwise. + @return + Menu item object or @NULL if not found. + */ + wxMenuItem *FindChildItem(int id, size_t *pos = NULL) const; + /** Finds the menu id for a menu item string.