DoDrawSpline() implementations for all ports work for the number of points
>= 2 (for 2 points there is drawn a straight line) so we need to add checks
whether this requirement is met.
See #19172.
This is the case for wxMSW implementation and while the other ones seem
to accept 1 or 2 points too, document the most stringent requirement,
especially because not satisfying it results not "just" in assertion
failure, but also in a crash in wxMSW.
This should obviously be improved further by, at the very least, using
wxCHECK and not wxASSERT in wxMSW code or, maybe, actually handling the
degenerate cases there if all the other ports really support them.
See #19172.
Explicitly document that wxDataViewRenderer::SetValue() is never called
with null values (if we ever really need this, we should add a separate
ClearValue() method) and also document that MakeHighlighted() both
receives and must return a non-null value (the latter is required
because the returned value is passed to SetValue()).
See #18934.
This isn't needed when the comment comes right before the define,
and also in newer doxygen versions it causes the __WXDEBUG__ macro
to be not documented because it interprets @def __WXDEBUG__ as being
the WXDEBUG macro instead.
This provides a less intrusive, and also usable by the end users rather
than only by the developers, way of doing the same thing as the just
added wxSizerFlags::DisableConsistencyChecks() does.
Add more functions for manipulating wxImage colours.
Show using them in the same and add new unit tests for them.
This is a squashed commit of branch 'tomay3000/image-lightness'.
Closes https://github.com/wxWidgets/wxWidgets/pull/2310
This control was removed during the Carbon code removal in commit
5ba67c67e4, so the system option
does nothing now (and was only mentioned in the documentation
and the sample).
This should have been done together with the other related updates in
35fa1f93bc (Reset wxSpinCtrl value to GetMin() if text string is
invalid, 2021-04-23), but was forgotten there.
See #19140.
wxSpinCtrlDouble::SetIncrement() should increase the number of digits if
necessary because not doing it would be inconsistent with the initial
determination of the number of digits in the ctor and would actually
lose the digits displayed, but it seems unnecessary to decrease the
number of digits and it might be surprising, so don't do it.
Add a test for this behaviour and document it.
Previously, wxSpinCtrl (using native control) and wxSpinCtrlDouble
(using the generic implementation) behaved differently in this case,
with the former changing its value but the latter keeping the last valid
value instead.
Make them behave the same by resetting the value in both cases and
document this behaviour.
This allows to retrieve the current contents of the text entry part of
wxSpinCtrl.
For now provide a stub in the base class, will be made pure virtual
later.
Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
This just uses the existing wxImage ctor from XPM data and wxCursor ctor
from wxImage, but will allow the code creating cursors from XPM to still
work even when wxImage ctor from XPM is made explicit.
Add a trivial test just to check that the new ctor can be used.
Make wxAppTraitsBase::GetAssertStackTrace() and reuse it in the assert
handler defined in the test to show more information about the asserts,
especially those failing in worker threads, if possible.
Previously, splitting a string obtained by joining together array
with (any but last) elements ending in the escape character (normally
the backslash), didn't recover the original array because the separator
character following it in the resulting string was considered to be
escaped by wxSplit().
Fix this by escaping the trailing escape character itself.
Add a test confirming that this works as expected now, document this
behaviour and also slightly simplify wxSPlit() logic.
See https://github.com/wxWidgets/wxWidgets/pull/2311Closes#19131.
Send a wxFullScreenEvent when the user enters or exits full screen on
macOS. EnableFullScreenView() has to be used to enable the native
full screen API.
Closes https://github.com/wxWidgets/wxWidgets/pull/2284