Add wxRibbonButtonBar::GetItem(), GetItemById() and GetItemId().

Allow accessing the ribbon bar buttons either by index or ID.

See #14630.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72526 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-09-20 20:01:12 +00:00
parent 4f97cb83cf
commit 71a77e77d1
3 changed files with 53 additions and 0 deletions

View File

@@ -377,6 +377,29 @@ public:
*/
virtual size_t GetButtonCount() const;
/**
Returns the N-th button of the bar.
@see GetButtonCount()
@since 2.9.5
*/
virtual wxRibbonButtonBarButtonBase *GetItem(size_t n) const;
/**
Returns the first button having a given id or NULL if none matches.
@since 2.9.5
*/
virtual wxRibbonButtonBarButtonBase *GetItemById(int id) const;
/**
Returns the id of a button.
@since 2.9.5
*/
virtual int GetItemId(wxRibbonButtonBarButtonBase *) const;
/**
Calculate button layouts and positions.