This doesn't seem to be doing anything useful but does result in
-Wdeprecated-copy from clang 10, as normally a custom copy ctor should
be defined as well, if the assignment operator is defined.
This check didn't work in configure when using C++17 or later, as
std::bind2nd() is removed in C++17 and so was worse than useless as it
actually prevented --enable-stl from working.
And while it was only done when using C++98 in CMake, it still seems
pretty useless there too as there should be no environments in which
basic stuff like std::vector<> or std::find_if() is not available.
So just remove it entirely.
This allows the caller to log the message to the console in addition to
showing the message box, for example. Previously, this would be
impossible to do without getting the duplicates if the message box was
not shown, but now it is.
These tests were also broken by transition to CATCH and didn't run any
longer.
Fix this by replacing CppUnit test suite objects with CATCH test cases
and using a simple helper CheckRE() function instead of creating
complicated test objects hierarchies.
These tests didn't run at all since the changes of e70fc11ef1 (Replace
CppUnit with Catch for unit tests, 2017-11-01) that removed CppUnit:
while they still compiled, the required suite functions were not called
automatically any longer and so nothing happened during run-time.
Finish really removing CppUnit stuff now and just use simple functions
for the checks: this might not be as elegant, but is much simpler and
more transparent.
It looks only left- and top-aligned images stored in the image list
(BUTTON_IMAGELIST) are drawn with proper margins (with BCM_SETIMAGELIST).
For some reasons (bug in Win API?) margins for right- and bottom-aligned
images are applied only on one side of the image so the image drawn in
the button is misplaced in relation to the label.
It seems the only possible workaround for such images is to switch to
the owner-drawn mode and to draw the image manually in the proper location.
Closes#13130.
When wxButton is switched to owner-drawn mode we need to store its image
data in the dedicated wxODButtonImageData structure. We shouldn't use
in this case wxXPButtonImageData structure because it is dedicated for
native buttons and every time it's updated a BCM_SETIMAGELIST message is
sent to the button what is unnecessary action.
Calling wxWindow::SetForegroundColour() also changed the window font,
which was unexpected and unnecessary.
Add a separate peer SetForegroundColour() method and implement it to
change just the colour in Cocoa version (and leave unimplemented, just
as it was before, for iOS) and use it in wxWindow to avoid the font
change.