void OnMouseRightUp(wxMouseEvent& evt);
void OnMouseMove(wxMouseEvent& evt);
void OnMouseLeave(wxMouseEvent& evt);
+ void OnMouseDoubleClick(wxMouseEvent& evt);
void DoMouseButtonCommon(wxMouseEvent& evt, wxEventType tab_event_type);
wxRibbonPageTabInfoArray m_pages;
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP, wxRibbonBarEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN, wxRibbonBarEvent);
wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP, wxRibbonBarEvent);
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_RIBBON, wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK, wxRibbonBarEvent);
typedef void (wxEvtHandler::*wxRibbonBarEventFunction)(wxRibbonBarEvent&);
wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN, winid, wxRibbonBarEventHandler(fn))
#define EVT_RIBBONBAR_TAB_RIGHT_UP(winid, fn) \
wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP, winid, wxRibbonBarEventHandler(fn))
+#define EVT_RIBBONBAR_TAB_LEFT_DCLICK(winid, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK, winid, wxRibbonBarEventHandler(fn))
#else
// wxpython/swig event work
%constant wxEventType wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP;
%constant wxEventType wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN;
%constant wxEventType wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP;
+%constant wxEventType wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK;
%pythoncode {
EVT_RIBBONBAR_PAGE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED, 1 )
EVT_RIBBONBAR_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP, 1 )
EVT_RIBBONBAR_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN, 1 )
EVT_RIBBONBAR_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP, 1 )
+ EVT_RIBBONBAR_TAB_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK, 1 )
}
#endif
wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP, wxRibbonBarEvent);
wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN, wxRibbonBarEvent);
wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP, wxRibbonBarEvent);
+wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK, wxRibbonBarEvent);
IMPLEMENT_CLASS(wxRibbonBar, wxRibbonControl)
IMPLEMENT_DYNAMIC_CLASS(wxRibbonBarEvent, wxNotifyEvent)
EVT_PAINT(wxRibbonBar::OnPaint)
EVT_RIGHT_DOWN(wxRibbonBar::OnMouseRightDown)
EVT_RIGHT_UP(wxRibbonBar::OnMouseRightUp)
+ EVT_LEFT_DCLICK(wxRibbonBar::OnMouseDoubleClick)
EVT_SIZE(wxRibbonBar::OnSize)
END_EVENT_TABLE()
DoMouseButtonCommon(evt, wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP);
}
+void wxRibbonBar::OnMouseDoubleClick(wxMouseEvent& evt)
+{
+ DoMouseButtonCommon(evt, wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK);
+}
+
void wxRibbonBar::DoMouseButtonCommon(wxMouseEvent& evt, wxEventType tab_event_type)
{
wxRibbonPageTabInfo *tab = HitTestTabs(evt.GetPosition());