X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e5ab82d310f12d56978f1e36d9cec6d3c84b0b8f..da87911d658e7dd7f08936b3f52fed9ab17a5712:/src/aui/floatpane.cpp diff --git a/src/aui/floatpane.cpp b/src/aui/floatpane.cpp index e79355872e..b365752ee1 100644 --- a/src/aui/floatpane.cpp +++ b/src/aui/floatpane.cpp @@ -41,7 +41,8 @@ wxFloatingPane::wxFloatingPane(wxWindow* parent, : wxFloatingPaneBaseClass(parent, id, wxEmptyString, pane.floating_pos, pane.floating_size, wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | - wxCLOSE_BOX | wxFRAME_NO_TASKBAR | + (pane.HasCloseButton()?wxCLOSE_BOX:0) | + wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT | wxCLIP_CHILDREN | (pane.IsFixed()?0:wxRESIZE_BORDER) ) @@ -49,7 +50,7 @@ wxFloatingPane::wxFloatingPane(wxWindow* parent, m_owner_mgr = owner_mgr; m_moving = false; m_last_rect = wxRect(); - m_mgr.SetFrame(this); + m_mgr.SetManagedWindow(this); SetExtraStyle(wxWS_EX_PROCESS_IDLE); } @@ -69,6 +70,9 @@ void wxFloatingPane::SetPaneWindow(const wxPaneInfo& pane) PaneBorder(false). Layer(0).Row(0).Position(0); + // Carry over the minimum size + SetMinSize(pane.window->GetMinSize()); + m_mgr.AddPane(m_pane_window, contained_pane); m_mgr.Update(); @@ -112,10 +116,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) { - m_owner_mgr->OnFloatingPaneClosed(m_pane_window); - Destroy(); + m_owner_mgr->OnFloatingPaneClosed(m_pane_window, evt); + if (!evt.GetVeto()) + Destroy(); } void wxFloatingPane::OnMoveEvent(wxMoveEvent& event)