+
+ // ask owner if it's ok to close the tab
+ wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, m_windowId);
+ e.SetSelection(m_tabs.GetIdxFromWindow(close_wnd));
+ e.SetOldSelection(evt.GetSelection());
+ e.SetEventObject(this);
+ GetEventHandler()->ProcessEvent(e);
+ if (!e.IsAllowed())
+ return;
+
+