From: Julian Smart Date: Sat, 14 Jun 2003 19:44:54 +0000 (+0000) Subject: Added wxMenuBase::FindItemByPosition X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/bd582574c2b98f7ba8049821a1241516396daecf Added wxMenuBase::FindItemByPosition git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/changes.txt b/docs/changes.txt index e779dec3d8..2b9c0c27ac 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -81,6 +81,7 @@ All GUI ports: - Added BLOB support to wxDB (John Skiff) - Wizard now validates when pressing Back or Next - Implemented wxNotebook::DoGetBestSize so Fit now works +- Added FindItemByPosition to wxMenu Unix: diff --git a/docs/latex/wx/menu.tex b/docs/latex/wx/menu.tex index c18f5e60b0..219b7bcbba 100644 --- a/docs/latex/wx/menu.tex +++ b/docs/latex/wx/menu.tex @@ -349,6 +349,12 @@ before matching. \pythonnote{The name of this method in wxPython is {\tt FindItemById} and it does not support the second parameter.} +\membersection{wxMenu::FindItemByPosition}\label{wxmenufinditembyposition} + +\constfunc{wxMenuItem*}{FindItemByPosition}{\param{size_t }{position}} + +Returns the wxMenuItem given a position in the menu. + \membersection{wxMenu::GetHelpString}\label{wxmenugethelpstring} \constfunc{wxString}{GetHelpString}{\param{int}{ id}} diff --git a/include/wx/menu.h b/include/wx/menu.h index 12ed139425..77633a7814 100644 --- a/include/wx/menu.h +++ b/include/wx/menu.h @@ -242,6 +242,9 @@ public: virtual int FindItem(const wxString& item) const; wxMenuItem* FindItem(int itemid, wxMenu **menu = NULL) const; + // find by position + wxMenuItem* FindItemByPosition(size_t position) const; + // get/set items attributes void Enable(int itemid, bool enable); bool IsEnabled(int itemid) const;