+wxRibbonButtonBarButtonBase *wxRibbonButtonBar::GetActiveItem() const
+{
+ return m_active_button == NULL ? NULL : m_active_button->base;
+}
+
+
+wxRibbonButtonBarButtonBase *wxRibbonButtonBar::GetHoveredItem() const
+{
+ return m_hovered_button == NULL ? NULL : m_hovered_button->base;
+}
+
+
+wxRibbonButtonBarButtonBase *wxRibbonButtonBar::GetItem(size_t n) const
+{
+ wxCHECK_MSG(n < m_buttons.GetCount(), NULL, "wxRibbonButtonBar item's index is out of bound");
+ return m_buttons.Item(n);
+}
+
+wxRibbonButtonBarButtonBase *wxRibbonButtonBar::GetItemById(int button_id) const
+{
+ size_t count = m_buttons.GetCount();
+ for ( size_t i = 0; i < count; ++i )
+ {
+ wxRibbonButtonBarButtonBase* button = m_buttons.Item(i);
+ if ( button->id == button_id )
+ return button;
+ }
+
+ return NULL;
+
+}
+
+int wxRibbonButtonBar::GetItemId(wxRibbonButtonBarButtonBase *item) const
+{
+ wxCHECK_MSG(item != NULL, wxNOT_FOUND, "wxRibbonButtonBar item should not be NULL");
+ return item->id;
+}
+
+