added EVT_AUI_PANECLOSE and updated sample accordingly

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Benjamin Williams
2006-07-05 16:38:02 +00:00
parent 17d4f7aca8
commit 5875464394
5 changed files with 106 additions and 73 deletions

View File

@@ -112,28 +112,11 @@ void wxFloatingPane::OnSize(wxSizeEvent& event)
m_owner_mgr->OnFloatingPaneResized(m_pane_window, event.GetSize());
}
void wxFloatingPane::OnClose(wxCloseEvent& WXUNUSED(event))
void wxFloatingPane::OnClose(wxCloseEvent& evt)
{
static wxList s_closing;
if (!s_closing.Member(this))
{
s_closing.Append(this);
wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
cancelEvent.SetEventObject( m_pane_window );
m_pane_window->GetEventHandler()->ProcessEvent(cancelEvent);
s_closing.DeleteObject(this);
// we should really return here without doing anything if the close was vetoed
}
// The problem here is that the above can cause the window itself to be destroyed
if (!IsBeingDeleted() && m_pane_window && !m_pane_window->IsBeingDeleted()
&& (m_pane_window->GetParent()==this))
{
m_owner_mgr->OnFloatingPaneClosed(m_pane_window);
m_owner_mgr->OnFloatingPaneClosed(m_pane_window, evt);
if (!evt.GetVeto())
Destroy();
}
}
void wxFloatingPane::OnMoveEvent(wxMoveEvent& event)