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.
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.
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
Replace it with a private DoRefreshLabels() and call it ourselves from
SetMenuPathStyle() to make the class simpler (and less error-prone, as
it's now impossible to forget to call RefreshLabels() any more) to use.
It seems useful to have the word "Path" in the name of this enum to
indicate that it applies to the paths shown in the menu labels.
Also rename the methods using this enum.
Add a missing ampersand to the third parameter of overridden
CreateBitmap(), to make it clear it is a reference.
Also add semicolons after methods declarations.
Closes https://github.com/wxWidgets/wxWidgets/pull/2299Closes#19125.
In the docs, replace mentions of wxEvtHandler::Connect() with
wxEvtHandler::Bind(), mostly to match the actual code but also
because Bind() is the recommended way to dynamically bind events.
Closes https://github.com/wxWidgets/wxWidgets/pull/2298
Show message box from wxSafeShowMessage() in the other ports too, if
possible.
Currently this is done using wxMessageBox() if it can be sure that it's
safe to call and only MSW uses native function which is always safe to
call. Ideal would be to also use a native function under Mac, where it
should also be the case, but this doesn't seem to work for whichever
reason.
See https://github.com/wxWidgets/wxWidgets/pull/2270