X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e93ca17294b6da0d8cf63bffb0017cdfa0013df..1b1ca07a708a2375c3fa6a568c1e29a710d6d56a:/src/common/menucmn.cpp?ds=sidebyside diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 7ce3d36fde..5e9ea0f289 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -520,6 +520,15 @@ wxMenuItem *wxMenuBase::FindChildItem(int id, size_t *ppos) const return item; } +// find by position +wxMenuItem* wxMenuBase::FindItemByPosition(size_t position) const +{ + wxCHECK_MSG( position < m_items.GetCount(), NULL, + _T("wxMenu::FindItemByPosition(): invalid menu index") ); + + return m_items.Item( position )->GetData(); +} + // ---------------------------------------------------------------------------- // wxMenu helpers used by derived classes // ----------------------------------------------------------------------------