Applied patch [ 760463 ] wxMenu::FindItemByPosition for 2.4 branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@21841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -184,6 +184,7 @@ All:
|
||||
All (GUI):
|
||||
|
||||
- rare crash in wxFontMapper fixed (Robert Vazan)
|
||||
- Added wxMenu::FindItemByPosition.
|
||||
|
||||
Generic:
|
||||
|
||||
@@ -211,6 +212,7 @@ wxMotif:
|
||||
- fixed "make install"
|
||||
|
||||
|
||||
>>>>>>> 1.212.2.72
|
||||
2.4.1
|
||||
-----
|
||||
|
||||
|
@@ -323,6 +323,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}}
|
||||
|
||||
Finds the menu item for the given position, returning NULL if not found.
|
||||
|
||||
\membersection{wxMenu::GetHelpString}\label{wxmenugethelpstring}
|
||||
|
||||
\constfunc{wxString}{GetHelpString}{\param{int}{ id}}
|
||||
|
@@ -138,7 +138,8 @@ instead.
|
||||
|
||||
\membersection{wxWizardPageSimple::wxWizardPageSimple}\label{wxwizardpagesimplewxwizardpagesimple}
|
||||
|
||||
\func{}{wxWizardPageSimple}{\param{wxWizard* }{parent = NULL}, \param{wxWizardPage* }{prev = NULL}, \param{wxWizardPage* }{next = NULL}}
|
||||
\func{}{wxWizardPageSimple}{\param{wxWizard* }{parent = NULL}, \param{wxWizardPage* }{prev = NULL}, \param{wxWizardPage* }{next = NULL},
|
||||
\param{const wxBitmap& }{bitmap = wxNullBitmap}}
|
||||
|
||||
Constructor takes the previous and next pages. They may be modified later by
|
||||
\helpref{SetPrev()}{wxwizardpagesimplesetprev} or
|
||||
|
@@ -242,6 +242,9 @@ public:
|
||||
virtual int FindItem(const wxString& item) const;
|
||||
wxMenuItem* FindItem(int id, wxMenu **menu = NULL) const;
|
||||
|
||||
// find by position
|
||||
wxMenuItem* FindItemByPosition(size_t position) const;
|
||||
|
||||
// get/set items attributes
|
||||
void Enable(int id, bool enable);
|
||||
bool IsEnabled(int id) const;
|
||||
|
@@ -533,6 +533,13 @@ wxMenuItem *wxMenuBase::FindChildItem(int id, size_t *ppos) const
|
||||
return item;
|
||||
}
|
||||
|
||||
// find by position
|
||||
wxMenuItem* wxMenuBase::FindItemByPosition(size_t position) const
|
||||
{
|
||||
if ( position >= m_items.GetCount()) return NULL;
|
||||
return m_items.Item( position )->GetData();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMenu helpers used by derived classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user