diff --git a/include/wx/aui/framemanager.h b/include/wx/aui/framemanager.h index 08f058300d..2d94200ba3 100644 --- a/include/wx/aui/framemanager.h +++ b/include/wx/aui/framemanager.h @@ -412,6 +412,7 @@ public: void SetFlags(unsigned int flags); unsigned int GetFlags() const; + bool HasLiveResize() const; void SetManagedWindow(wxWindow* managedWnd); wxWindow* GetManagedWindow() const; diff --git a/interface/wx/aui/framemanager.h b/interface/wx/aui/framemanager.h index 295a7f381a..34fabd3f89 100644 --- a/interface/wx/aui/framemanager.h +++ b/interface/wx/aui/framemanager.h @@ -310,6 +310,20 @@ public: wxAuiPaneInfo& GetPane(const wxString& name); //@} + /** + Returns true if windows are resized live. + + Live resizing behaviour is specified by wxAUI_MGR_LIVE_RESIZE flag, + however some platforms (currently wxOSX) ignore it and always use live + resizing because this is the only implemented resize mode. + + Using this accessor allows to verify whether live resizing is being + actually used. + + @since 3.1.4 + */ + bool HasLiveResize() const; + /** HideHint() hides any docking hint that may be visible. */ diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index 09c0f9183d..c54f685dd2 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -771,17 +771,14 @@ unsigned int wxAuiManager::GetFlags() const return m_flags; } -// Convenience function -static -bool wxAuiManager_HasLiveResize(wxAuiManager& manager) +bool wxAuiManager::HasLiveResize() const { // With Core Graphics on Mac, it's not possible to show sash feedback, // so we'll always use live update instead. #if defined(__WXMAC__) - wxUnusedVar(manager); return true; #else - return (manager.GetFlags() & wxAUI_MGR_LIVE_RESIZE) == wxAUI_MGR_LIVE_RESIZE; + return (GetFlags() & wxAUI_MGR_LIVE_RESIZE) == wxAUI_MGR_LIVE_RESIZE; #endif } @@ -4429,13 +4426,13 @@ void wxAuiManager::OnLeftUp(wxMouseEvent& event) { m_frame->ReleaseMouse(); - if (!wxAuiManager_HasLiveResize(*this)) + if (!HasLiveResize()) { // get rid of the hint rectangle wxScreenDC dc; DrawResizeHint(dc, m_actionHintRect); } - if (m_currentDragItem != -1 && wxAuiManager_HasLiveResize(*this)) + if (m_currentDragItem != -1 && HasLiveResize()) m_actionPart = & (m_uiParts.Item(m_currentDragItem)); DoEndResizeAction(event); @@ -4539,7 +4536,7 @@ void wxAuiManager::OnMotion(wxMouseEvent& event) else pos.x = wxMax(0, event.m_x - m_actionOffset.x); - if (wxAuiManager_HasLiveResize(*this)) + if (HasLiveResize()) { m_frame->ReleaseMouse(); DoEndResizeAction(event);