Add wxAuiManager::AlwaysUsesLiveResize()

This allows to check if it's worth specifying wxAUI_MGR_LIVE_RESIZE or
not and allows to get rid of the corresponding menu item in the sample
if it doesn't do anything anyhow.
This commit is contained in:
Vadim Zeitlin
2020-05-25 17:59:42 +02:00
parent 4f7eb2b145
commit f6727a17a2
4 changed files with 35 additions and 7 deletions

View File

@@ -207,6 +207,19 @@ public:
const wxPoint& drop_pos);
//@}
/**
Returns true if live resize is always used on the current platform.
If this function returns true, ::wxAUI_MGR_LIVE_RESIZE flag is ignored
and live resize is always used, whether it's specified or not.
Currently this is the case for wxOSX port, as live resizing is the only
implemented method there.
@since 3.1.4
*/
static bool AlwaysUsesLiveResize();
/**
This function is used by controls to calculate the drop hint rectangle.
@@ -313,9 +326,9 @@ public:
/**
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.
This function combines the check for AlwaysUsesLiveResize() and, for
the platforms where live resizing is optional, the check for
wxAUI_MGR_LIVE_RESIZE flag.
Using this accessor allows to verify whether live resizing is being
actually used.