Use wxOverlay to show sash feedback in non-live resize mode in wxSplitterWindow

Make non-live resizing possible on all supported platforms thanks to wxOverlay.
Previously, live resizing was the only supported mode under these platforms:
wxMac, wxQt and wxGTK3 under Wayland.

Also remove no longer needed function AlwaysUsesLiveUpdate and its documentation.
This commit is contained in:
ali kettab 2024-01-25 03:10:23 +01:00 committed by AliKet
parent fafc714057
commit a38175885c
4 changed files with 44 additions and 70 deletions

View file

@ -12,6 +12,7 @@
#include "wx/window.h" // base class declaration
#include "wx/containr.h" // wxControlContainer
#include "wx/overlay.h"
class WXDLLIMPEXP_FWD_CORE wxSplitterEvent;
@ -131,9 +132,6 @@ public:
// Is the window split?
bool IsSplit() const { return (m_windowTwo != nullptr); }
// Return true if wxSP_LIVE_UPDATE is always used.
bool AlwaysUsesLiveUpdate() const;
// Sets the border size
void SetBorderSize(int WXUNUSED(width)) { }
@ -293,7 +291,7 @@ protected:
int m_minimumPaneSize;
wxCursor m_sashCursorWE;
wxCursor m_sashCursorNS;
wxPen *m_sashTrackerPen;
wxOverlay m_overlay;
// when in live mode, set this to true to resize children in idle
bool m_needUpdating:1;