Additionally implement wxWebViewEdge::GetUserAgent() via SDK.
This functionality is available with the slightly newer
WebView2 SDK required by previous changes.
See #23225.
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.
It doesn't make much sense to set this option programmatically, as the
application could just call MSWEnableDarkMode() directly instead, but
it's useful to have to allow enabling dark mode for any wx application
by just setting WX_MSW_DARK_MODE environment variable.
The edge backend has various accelerator keys enable per default.
This include Ctrl-P, Ctrl-F, F5 and others. In many uses of webview
this might not be desirable and can be disabled.
This is currently only implemented for the Edge backend.
Raises required WebView2 SDK version from 1.0.705.50 to 1.0.864.35
It needs to be stated clearly that the limit applies only to the text
the user can enter in the editor associated with property.
This constraint does not apply to the length of text represenations
of values set programmatically.
Corresponding test were added.
Document that wxLog::SetLogLevel() is not MT-safe and that wxLogNull
should be used instead of calling it to temporarily change the log level
from the other threads.
Also update the listctrl sample to show it's effect on the second column
wxLIST_AUTOSIZE (Ctrl+R) to resize the column to content
wxLIST_AUTOSIZE_USEHEADER (Ctrl+Shift+R) to resize it to header section
Use QTreeView's viewport height to get the right count per page
Also document that the control must contain at least one item in
order to return a valid value from the function.
Since wxListCtrl under wxMSW cannot edit labels without the presence of
this flag, and an assertion failure triggered if the flag is missing to
it and also all the other ports for consistency.
Also document that wxLC_EDIT_LABELS flag is required in EditLabel()
description.
See #23024.
Add experimental wxApp::MSWEnableDarkMode().
For now this is very incomplete and just uses the basic API for setting
the preferred application mode, which only works for the standard
dialogs and popup menus, but it's a start.
Support of dark mode is also limited to Windows 10 20H1 and later, but
this should, hopefully, be not a problem in practice as few people
should be using pre-2020 Windows 10 versions by now.
This function was supposed to be overridden in the subclasses to allow
efficiently implementing GetDataSize(), but it wasn't actually called
any longer since 229f00eb69 (Translate wxTextDataObject to/from native
EOL format., 2012-07-29).
And while it was probably a mistake to stop calling it in that commit,
the fact that nobody has complained about it since then seems to prove
that nobody was overriding it anyhow and it's not worth resurrecting it,
so just deprecate it instead.
There are many checks in the code whether wxPGProperty has any child.
Doing so by checking if GetChildCount() is greater than zero doesn't
seem to express intent simply and clearly. With dedicated method this
could be done simpler and hopefully in a more optimal way.
We're going to need to do it in a couple of places, so extend the
existing function for testing for Wine presence to also return its
version, if requested.
Use it to show the version of Wine being used when running the tests.
This reverts commit 616586f301 because it
turns out that using WS_EX_TRANSPARENT is incompatible with using
WS_EX_COMPOSITED (see parent commit).
Reintroducing all this code is painful, but there doesn't seem to be any
way of avoiding to have it as long as we use WS_EX_COMPOSITED. If we
stop using this style, we could revert this commit, this re-applying the
original change.
Closes#22982.
This style never did anything useful in wxMSW and did nothing at all in
all the other ports, so always was rather useless, but became actively
harmful not that WS_EX_COMPOSITED is used in wxMSW because using it and
WS_EX_TRANSPARENT, enabled by wxTRANSPARENT_WINDOW, together doesn't
work and results in an endless stream of WM_PAINT messages being sent to
the _siblings_ of the window with wxTRANSPARENT_WINDOW style.
Some of wxImageList methods asserted when called on an invalid image
list while others just failed silently.
Assert in all of them now for consistency and to help detecting problems
in the code using invalid wxImageList objects.
Extend the documentation and the tests.