: 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)
)
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);
}
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();
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)