This allows to write code using this function without any preprocessor
checks.
It should arguably be added to wxBitmapBase to ensure that it's
available in all ports, but should be done together with UseAlpha(),
which is not quite trivial, so leave it for later.
Mention that RecalcSizes() shouldn't be called any more, after the
changes of 622deec262 (Replace wxSizer::RecalcSizes() with
RepositionChildren(), 2015-10-11), and that RepositionChildren()
replacing it shouldn't be directly called neither.
The old version resulted in
error: this condition has identical branches [-Werror=duplicated-branches]
| (dlg ? typeid(*dlg) : typeid(T)).name());
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
from gcc 10 when compiling with -O2.
Change the code to avoid using this condition entirely: not only this
avoids the warning, but it also makes it unnecessary to make
wxGetDialogClassDescription() function a template, so should result in
slightly faster compilation and smaller code size too.
No real changes.
The correct condition for adding the extra border to the buttons that
would be clipped without it due to the bezel style used for them is to
check that their height is < 20, as SetBezelStyleFromBorderFlags(),
which determines the bezel to use, does, and not if their width is 16,
as this is not the same thing, especially for non-square buttons.
Closes https://github.com/wxWidgets/wxWidgets/pull/1887
It's not really clear why do we have this function at all, but
SetMinSize() name is more clear and consistent with wxWindow, so prefer
using it instead.
This function explicitly accepts ASCII strings only, so it's limited to
"const char*", but was incorrectly documented as taking wxString.
Closes https://github.com/wxWidgets/wxWidgets/pull/1879
There is no reason to use wxMutex and wxCondition in C++11 programs as
they have about the same API as the corresponding standard classes but
are, well, non-standard.
wxThread API is different from std::thread, so it's a less obvious
replacement, but still at least mention the standard class in its
documentation.
Use Mac version for the other ports too, instead of the weird hardcoded
numbers introduced back in 40aa1a7e60 (Implement GetSizeFromTextSize()
for wxSpinCtrl., 2012-11-20) which don't make much sense, as they use
vertical text control size to determine the horizontal size of the spin
control.
Do not use the max of spin button height and text control height,
however, as we really want to have the same height as just a normal text
control.
Always return fully initialized wxSize value, even if one of the input
values is unspecified.
Also use TEXTCTRL_BORDER_SIZE to make it slightly more clear what's
going on.
These functions are much simpler to use in the application code using
wxGrid in row- or column-only selection mode than GetSelectedBlocks()
itself because they take care of deduplicating, ordering and squashing
together the adjacent ranges, so that the application can use their
results directly, unlike with GetSelectedBlocks().
Remove the group around it to avoid problems due to the existence of
another overload.
This completes the changes of ca59d38cfd (Add missing static to
wxZipEntry::GetInternalName() documentation, 2020-05-25).
Closes https://github.com/wxWidgets/wxWidgets/pull/1876
Don't generate dozens of deprecation warnings (one for each OpenGL
function used in the code) for any program using wxGLCanvas being built
using macOS 10.14 or later SDK.
Closes https://github.com/wxWidgets/wxWidgets/pull/1875
There is no need to specify the comparison function when defining the
variables of this type when we can just specify it once when defining
the array type itself.
No real changes.
The "unique" rows/columns arrays used in the implementation of these
functions were not unique at all, as we happily added duplicates of the
existing items into them. Fix this by checking that a row/column is not
already present before adding it.
Add a (previously failing) unit test checking that this works correctly
with overlapping selected blocks.
Use wxSYS_COLOUR_BTNFACE instead of the hardcoded value of this colour
in "Windows Classic" theme, which was probably used back when the commit
73145b0ed1 (Applied patches by Scott Pleiter:, 2002-12-09), which was
supposed to change wxGrid to use system colours (among other things),
was done.
Nowadays wxSYS_COLOUR_BTNFACE is 0xF0F0F0 rather than 0xC0C0C0, which is
quite different visually, but it still seems better to use the system
colour rather than the fixed value, especially for platforms with dark
mode support.
Closes https://github.com/wxWidgets/wxWidgets/pull/1866
Skip the key events other than Ctrl-C/Ins which are used for copying
grid contents to the clipboard, notably Alt-C which should still be
usable for opening the menus.
This fixes a problems introduced in 67c1c412c6 (Implement support for
copying wxGrid cells to clipboard, 2020-04-26), see #13562.
Do for GTK 3 the same thing as was already done for macOS in 68030cae69
(Added wxAUI_MGR_LIVE_RESIZE flag for live sash sizing, the default on
wxOSX, 2009-01-07) and for the same reasons: sash feedback is simply
invisible with this port and so can't be used.
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 method was added back in d3e8d3f271 (Support or disable "insert"
for drag/drop wxDataViewCtrl on OSX, 2018-07-16) but didn't appear in
the documentation at all, so describe it, at least minimally.
See #18167.