Replace macro-based scoped pointers with the standard class.
Also mention that using these macros and wxScopedPtr itself is
deprecated (but there are too many occurrences of the latter in the code
to change all of them now).
Note that wxMsgCatalog ctor and dtor had to be moved out of line to
allow using unique_ptr<> to an incomplete class as member. On the bright
side, we can just use unique_ptr<> instead of wxPluralFormsNodePtr which
was a local reimplementation of wxScopedPtr.
No real changes.
There is no real need to document this, it's not a valid enum value and
having it in this file without a trailing comma was a syntax error.
Closes#23298.
Adding such function was discussed a few times in the past and it's
going to be needed by wxWidgets itself in the next commit, so do add it,
finally, so that it could also be used from the application code too.
Although @see was used predominantly, a few places used @sa which is
equivalent to it but less readable, so switch to using @see everywhere.
No real changes.
Store data passed to AddTool() in wxAuiToolBarItem and provide
wxToolBar-like functions for setting and getting this pointer.
See #23276.
Closes#23271.
Rename the new overload of DoSetSplitterPosition() to use a different
name: not only this avoids deprecation warnings that broke all the CI
builds, but it also makes things more clear and simpler to use as all
the derived classes don't need to override both the deprecated overload
and the new one to avoid warnings about hiding a base class virtual
function and can just override the new one.
Also remove the default value "Refresh" for the flags which seems to be
inconsistent with the default value "Null" used elsewhere and prefer to
specify it explicitly.
Using the box itself as the parent for some items and its parent window
as the parent for the other ones results in layout problems because the
correct offset is not used when positioning the items not using the box
as parent.
This has always been the case and it doesn't seem to be worth fixing, as
the scenario with the items not using the box as the parent is only
still supported for backwards compatibility anyhow, so just add an
assert checking for this and document this limitation.
Closes#23239.
Disable compositing when adding a window which is not a child of
wxStaticBox to wxStaticBoxSizer as sibling windows can't be painted
correctly inside one another when compositing is on.
Also add a debug warning when not using the static box as parent for the
windows inside it, to make it easier to notice the windows using a wrong
parent, and emphasize even more strongly that this is not the right way
to do it in the documentation.
Closes#23182.
Add both the Scintilla and Lexilla iface to the script.
Remove unused LinkLexers code.
Allow to get the Lexilla version, and show it in the stc sample.
It didn't make any sense to have Create() functions in this class
without the default ctor as they could be never used -- calling them
would result in creating the window twice.
Add the default ctor to make this class more similar to all the other
windows.
Allows to determine if a navigation is happening in the main frame
or an embedded iframe when handling wxEVT_WEBVIEW_NAVIGATING.
Additionally implement previously missing wxEVT_WEBVIEW_NAVIGATING
events for frames with the Edge backend.
See #23238.
Fix another pixel units confusion in wxToolBar code and ensure that
"sizeNeeded" is expressed in logical units when a fixed bitmap size is
set, to make it consistent with the case when it is not set, and also
because bitmap size is supposed to be expressed in logical pixels, in
both SetToolBitmapSize() and, for consistency, GetToolBitmapSize() too.
Also explicitly mention the latter in the documentation.
See #23228.
Closes#23222.
Additionally implement wxWebViewEdge::GetUserAgent() via SDK.
This functionality is available with the slightly newer
WebView2 SDK required by previous changes.
See #23225.
This function replaces the existing GetSystemLocale() as it can
represent the locales that don't have any corresponding wxLanguage
values and for which GetSystemLocale() has no choice but to return
wxLANGUAGE_UNKNOWN.
The wxUILocale function really returns the default language unlike the
one in wxLocale which must kepe using the default locale for
compatibility, making its name confusing.
The documentation for wxChoiceBook discusses using this method, but it
was not previously documented.
See #23211.
Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
This is a generalization of the existing "platform" attribute and allows
to only include some XRC elements if and only if an arbitrary "feature"
is enabled by the application before loading the XRC document.
Explain that the overload taking wxFontInfo is preferred and why,
mention that the returned pointer must not be deleted and also give a
trivial example of using this function.
Drop disabled by default and pretty useless memory tracing code and all
the overlapping and poorly documented build options related to it.
Remove memory.cpp entirely and update all the make/project files, but
preserve the now completely trivial wx/memory.h for compatibility and
also keep including wx/string.h from wx/object.h as it seems like a lot
of existing code actually depends on this, even if it should not.
Replace the options in the propgrid sample with a couple of other
debug-related options that were not used before to avoid leaving the
"Debugging Section" completely empty.
This allows to determine if dark mode is enabled (for the applications
and/or the system UI itself, respectively) system-wide which is useful
now that IsDark() returns false unless MSWEnableDarkMode() is called.
Also document the incompatible change to IsDark().
Even if the system is configured to use the dark mode, we shouldn't
return true from this function unless the application itself uses dark
mode, otherwise we're going to use wrong colours not providing enough
contrast with the system-provided ones.
This basically reverts #22020 as now that we have real dark mode
support, we should be using it instead.
Add a convenient helper allowing to select between the two colours
depending on whether we're using light or dark mode.
Use this in a couple of places instead of manual tests for IsDark().
No real changes.
Fix labels and highlight colour and get rid of the white line on top of
the toolbar.
Unfortunately drop-down items are still not drawn correctly as I
couldn't find any way to customize the colour used for their arrow.