public:
wxRibbonButtonBarEvent(wxEventType command_type = wxEVT_NULL,
int win_id = 0,
- wxRibbonButtonBar* bar = NULL)
+ wxRibbonButtonBar* bar = NULL,
+ wxRibbonButtonBarButtonBase* button = NULL)
: wxCommandEvent(command_type, win_id)
- , m_bar(bar)
+ , m_bar(bar), m_button(button)
{
}
#ifndef SWIG
wxRibbonButtonBarEvent(const wxRibbonButtonBarEvent& e) : wxCommandEvent(e)
{
m_bar = e.m_bar;
+ m_button = e.m_button;
}
#endif
wxEvent *Clone() const { return new wxRibbonButtonBarEvent(*this); }
wxRibbonButtonBar* GetBar() {return m_bar;}
+ wxRibbonButtonBarButtonBase *GetButton() { return m_button; }
void SetBar(wxRibbonButtonBar* bar) {m_bar = bar;}
+ void SetButton(wxRibbonButtonBarButtonBase* button) { m_button = button; }
bool PopupMenu(wxMenu* menu);
protected:
wxRibbonButtonBar* m_bar;
+ wxRibbonButtonBarButtonBase *m_button;
#ifndef SWIG
private:
*/
wxRibbonButtonBarEvent(wxEventType command_type = wxEVT_NULL,
int win_id = 0,
- wxRibbonButtonBar* bar = NULL);
+ wxRibbonButtonBar* bar = NULL,
+ wxRibbonButtonBarButtonBase* button = NULL);
/**
Returns the bar which contains the button which the event relates to.
*/
void SetBar(wxRibbonButtonBar* bar);
+ /**
+ Returns the button which the event relates to.
+
+ @since 2.9.5
+ */
+ wxRibbonButtonBarButtonBase* GetButton();
+
+ /**
+ Sets the button relating to this event.
+
+ @since 2.9.5
+ */
+ void SetButton(wxRibbonButtonBarButtonBase* bar);
+
/**
Display a popup menu as a result of this (dropdown clicked) event.
*/
}
notification.SetEventObject(this);
notification.SetBar(this);
+ notification.SetButton(m_active_button->base);
m_lock_active_state = true;
ProcessWindowEvent(notification);
m_lock_active_state = false;