Add wxSplitterWindow::AlwaysUsesLiveUpdate()

This is similar to wxAuiManager::AlwaysUsesLiveResize() and does the
same thing, i.e. returns true if live update is always used, whether
wxSP_LIVE_UPDATE is enabled or not.

Use the new function in the sample to disable the menu item in the
environments where it doesn't do anything, as it was confusing to have
it under e.g. Wayland.
This commit is contained in:
Vadim Zeitlin 2023-12-26 18:51:42 +01:00
parent 298fef23ad
commit 1d328aa4e1
4 changed files with 30 additions and 5 deletions

View file

@ -131,6 +131,9 @@ 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)) { }