This ensures that the parent frame doesn't close if any of the children
can't be closed and also that all children are closed before the parent
if they do agree to close.
Closes https://github.com/wxWidgets/wxWidgets/pull/1734Closes#15170.
This doesn't work anyhow, so it's better to prevent the code doing this
from compiling instead of getting run-time asserts or worse.
Also simplify construction of these events inside wxWidgets by passing
the window itself to the ctor instead of passing just its ID and calling
SetEventObject() separately later.
For consistency, do the same thing for wxNcPaintEvent too.
This allows to give at least some explanation about why the secrets
can't be stored to the user, e.g. they could search for a message such
as
The name org.freedesktop.secrets was not provided by any .service files
to find out that gnome-keyring package needs to be installed on their
system.
Note that this change means that under Unix an attempt to connect to the
secret service is now made when wxSecretStore is constructed and not
just when it's used for the first time, as before.
There doesn't seem to be any reason to use secret_service_xxx()
functions for Save() and Load(), but use simple API function
secret_password_clearv_sync() for Delete().
Use the equivalent function from the same API layer for it too instead.
Creating wxPaintDC for a window outside of any wxEVT_PAINT handler
already resulted in assert failures and crash due to using the empty
wxDidCreatePaintDC stack, but the assert message was not really clear,
so improve it by stating explicitly that wxPaintDC can only be created
from wxEVT_PAINT handlers.
Also check that wxPaintDC is being created for the correct window: this
wasn't detected at all before, but could still result in a lot of grief,
so check for this too.
Finally, create a new private header with the paint data stack variable
declaration instead of using "extern" to declare it manually in wxDC
code.
This doesn't seem to actually be doing anything useful, as it only
checks that wxPaintDCImpl is not created without creating wxPaintDC
which is impossible to do accidentally anyhow.
This will be replaced by a more useful check in the next commit.
There is a dedicated template class wxD2DResourceHolder<T> to support
managing backend D2D resources and wxD2DGradientStopsHelper should be
derived from wxD2DResourceHolder<ID2D1GradientStopCollection> for the
sake of consistency with other D2D resource holders.
Since wxPGChoiceAndButtonEditor derives from wxPGChoiceEditor so making
a call to the base class virtual function CreateControls() from the child
CreateControls() is legitimate and more clean than calling to this
function in the another instance of the base class wxPGChoiceEditor
(which may not exists).
Provide GetAttrPtr() and GetCellAttrPtr() convenience functions that can
be used instead of the original Ptr-less versions to avoid the need to
manually call DecRef() on the returned wxGridCellAttr pointers.
No real changes, just simplify the code and make it safer.
Doing it for cells using a different alignment doesn't work correctly
and it's not clear whether it really makes sense, so just don't do it at
all for now.
Closes https://github.com/wxWidgets/wxWidgets/pull/1726
The same wxRibbonBar can use multiple button bars with different icon
sizes, so 2 image lists are not enough. But OTOH there is no need to
distinguish between small and large images neither, so 2 may be also 1
too many.
Instead, use however many image lists we need, depending on the size.
For now, just store them in a vector and use linear search in it,
instead of using a map or, maybe, sorted vector, as we suppose there are
never going to be more than a couple of elements in this vector anyhow.
Before drawing the overflowing text we need to redraw the cells it
overflows into to avoid visual artefacts, that could appear even just
due to drawing new text over the same existing text due to
anti-aliasing. E.g. the text in the cell B2 in the grid sample visibly
changed appearance when repeatedly switching the current cell from A1 to
A2 and back again, just due to redrawing A2 contents.
Closes https://github.com/wxWidgets/wxWidgets/pull/1729
Don't store the buttons used by a pane separately, but take them
directly from the flags, as this ensures that updating the pane flags,
e.g. by calling CloseButton(false), really removes the corresponding
button.
This also makes wxAuiPaneButton helper completely unnecessary, so just
remove it to simplify the code.
Closes https://github.com/wxWidgets/wxWidgets/pull/1723Closes#18223.
This escape character doesn't seem to be handled by IE in the default
emulation mode and it's not worth complicating the test code just to
test for it, so simply remove it from the test.
For example, a newline was escaped to be a backslash followed by a
newline, but it actually shall be a backslash followed by a character
'n'. It seemed okay with most of codes until in the case that C++ style
comments, i.e. single line comments, in the JavaScript codes. If the
newline characters are not escaped correctly, the JavaScript interpreter
will ignore everything that goes after the single line comments because
the interpreter obviously cannot find the newline where it's supposed to
stop treating codes as comments.
Instead of specializing wxStrtoxCharType and then testing whether endptr
is null, just define separate, and simpler, overloads of wxStrtox()
functions taking nullptr_t -- we can avoid the unnecessary test
completely in this case, as nullptr is, by definition, always null
anyhow.
Also add a test of using wxStrtol() with nullptr too.
This should fix the build with older gcc and MSVS versions.