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.
Specifying e.g. wxBORDER_NONE for wxSpinCtrlDouble should work, i.e.
remove the border from the wxTextCtrl used by it internally in the
generic version, so add wxBORDER_MASK to the list of styles respected by
this wxTextCtrl.
Closes https://github.com/wxWidgets/wxWidgets/pull/1864
This partially reverts the changes of a98d8448fa (Fix size of
wxDateTimePickerCtrl after DPI change, 2019-01-13) to still use
DTM_GETIDEALSIZE, even if it returns wrong height value after a DPI
change, because it still computes the best width more precisely than we
do and using our code could result in the date being partially truncated
when using some date formats.
Without the extra margin, part of the thumb was truncated when
wxSL_TICKS was not used, but wxSL_BOTH (which makes the thumb bigger
than without it) was.
Under wxOSX the order of calls to wxItemContainer::Clear()
and wxTextEntry::Clear() matters.
Number of data objects to delete in wxItemContainer::Clear()
is obtained by call to wxComboBox::Count(). Counter of items
in wxComboBox is reset by wxTextEntry()::Clear()
so this method has to be called after wxItemContainer::Clear().
Closes#18768.
Gnome seems to use it as a fallback display name with X11. By default, it will
be the capitalized program name, which is what GTK would set it to anyway.
We cannot use GetSizeFromText() to calculate
numeric box size under wxOSX because this function
calls GetSizeFromTextSize() which is implemented
only in wxMSW and wxGTK.
Currently, DeletePage() and RemovePage() functions don't send any events
when deleting the last page of the control and while this is
inconsistent with the behaviour when deleting the other pages, it seems
too dangerous to change this now, as the existing application code might
not expect getting page change events with the invalid page index.
So just document the current behaviour.
Ideal would be to add a unit test checking that this is really the case
under all platforms, for now it was just checked manually under MSW and
GTK.
Closes https://github.com/wxWidgets/wxWidgets/pull/1848
Every time spin control precision, minimal or maximal value changes there
is necessary to adjust numeric box size to the new dimension of displayed
number.
See #18734.