diff --git a/include/wx/aui/framemanager.h b/include/wx/aui/framemanager.h index 201768dccc..0307c3d4f2 100644 --- a/include/wx/aui/framemanager.h +++ b/include/wx/aui/framemanager.h @@ -476,15 +476,22 @@ public: void Update(); public: + virtual wxAuiFloatingFrame* CreateFloatingFrame(wxWindow* parent, const wxAuiPaneInfo& p); - wxRect CalculateHintRect(wxWindow* pane_window, - const wxPoint& pt, - const wxPoint& offset); + void StartPaneDrag( + wxWindow* pane_window, + const wxPoint& offset); + + wxRect CalculateHintRect( + wxWindow* pane_window, + const wxPoint& pt, + const wxPoint& offset); - void DrawHintRect(wxWindow* pane_window, - const wxPoint& pt, - const wxPoint& offset); + void DrawHintRect( + wxWindow* pane_window, + const wxPoint& pt, + const wxPoint& offset); virtual void ShowHint(const wxRect& rect); virtual void HideHint(); diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index 9d35f47f7f..2e3aecb032 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -3074,6 +3074,27 @@ void wxAuiManager::HideHint() +void wxAuiManager::StartPaneDrag(wxWindow* pane_window, + const wxPoint& offset) +{ + wxAuiPaneInfo& pane = GetPane(pane_window); + if (!pane.IsOk()) + return; + + if (pane.IsToolbar()) + { + m_action = actionDragToolbarPane; + } + else + { + m_action = actionDragFloatingPane; + } + + m_action_window = pane_window; + m_action_offset = offset; + m_frame->CaptureMouse(); +} + // CalculateHintRect() calculates the drop hint rectangle. The method // first calls DoDrop() to determine the exact position the pane would @@ -4041,9 +4062,8 @@ void wxAuiManager::OnMotion(wxMouseEvent& event) pt.y - m_action_offset.y); // float the window - if(pane_info->IsMaximized()) { + if (pane_info->IsMaximized()) RestorePane(*pane_info); - } pane_info->Float(); Update();