The functions InformFirstDirection() in wxWindow and wxSizer forced the
code overriding it to be written in unnatural way, by storing the
parameters passed to this function and then using them in other
functions later.
Add new functions wxWindow::GetMinSizeFromKnownDirection() and
wxSizer::CalcMinSizeFromKnownDirection() taking the same parameters as
InformFirstDirection() but which can use them directly to return the
desired result.
Change wxStaticText and wxWrapSizer to use them instead of the old
function to simplify their code (that of wxWrapSizer could probably be
still simplified further, as it doesn't seem necessary to store these
values at all any longer, but for now keep it as is).
This allows wxWrapSizer to just override the new function instead of
using m_lastUsed variable to distinguish between calculating min size
during the first and second layout passes.
Also add wxWindow::GetMinSizeUsingLayoutDirection() following similar
logic. This is not used yet but will be in the upcoming commit.
Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
Add a unit test for a special case of a wrap sizer min size caclulation.
Test wxWrapSizer::CalcMinFromMinor function for this case, when a wrap
sizer used inside a sizer with the same alignment.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.
If nothing else, this will make an eventual transition to Git simpler.
Closes#14487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775