The change of semantics of DoSendEvent() broke the logic in
OnDoubleClickSash(), fix it now and remove DoSendEvent() entirely as
it became useless now that it doesn't test whether the event was vetoed
any more and the code is simpler without it.
This is a merge of the branches 'fix-xrc-envvar-bitmapbundle' of
https://github.com/ousnius/wxWidgets & 'ak_fix-xrc-envvar-bitmapbundle'
of https://github.com/kosh543/wxWidgets.
Fix the recently introduced bug in environment variables expansion in
the bitmap paths and add a unit test ensuring it isn't introduced again.
See #22071, #22080.
The previous implementation initialized the version number only once.
This caused subsequent calls to wxWebView::GetBackendVersionInfo() to
return the same version number even if the runtime has been updated or
a fixed version runtime had been activated via
wxWebViewEdge::MSWSetBrowserExecutableDir().
This change allows to require a minimum runtime version and allow
a runtime update without requiring a restart of the application.
Closes#22076.
This improves the changes of f78db92462 (Avoid bitmap scaling in
wxArtProvider::GetBitmapBundle(), 2021-12-17) and still uses a custom
bundle to avoid scaling the bitmap if possible, but does it in
GetBitmapBundle() itself rather than CreateBitmapBundle().
This allows to also use CreateBitmapBundle() from GetBitmap(), as there
is no possibility of infinite recursion due to calling each of these
functions from the other one any more, and so allows defining art
providers overriding only CreateBitmapBundle() instead of having to
always override both it and CreateBitmap().
Also add a unit test, even if just a trivial one, for these functions,
to at least check that they don't crash.
Vcpkg defaults to installing packages for x86-windows, and from the
perspective of x64 builds, the packages installed just cannot be
found -- and the reason is not very obvious.
Having an example with commands that will install both x86 and x64 is
probably the right thing to do in this day and age -- and if somebody
only wants one and not the other, seeing a package name with architecture
specified helps with guessing how to achieve that.
Closes#22075.
libwebkitgtk-3.0-dev is long deprecated and isn't used anyway.
gstreamer-0.10* no longer exists even on Ubuntu 18.04.
gstreamermm* is not used by wxWidgets.
Closes#22069.
Because ConvertArrayToString() and ArrayStringToString() produce string
values it would more intuitive to just to return this string as a function
value instead of passing it through the parameter.
Because this function produces a string value it would more intuitive to
just to return this string as a function value instead of passing it
through the parameter.
This reverts 3b3169fa15 (Fix refresh problems when scrolling with
mousewheel in wxUniv/MSW, 2021-09-23) (see #2525) and replaces it with a
wxUniv-specific workaround in wxScrollHelperBase::HandleOnScroll().
Closes#2640.
These functions return the colour components as unsigned int and so
promote to this type in arithmetic expressions, unlike unsigned char
returned by the existing accessors without the "Get" prefix, which
promotes to (signed) int and results in gcc 12 -Warith-conversion
warnings when the result is then converted to unsigned, as it happened
in our own wxColour::GetRGB() and GetRGBA() functions and would probably
happen in a lot of code outside wx, which could also be updated to use
the new functions instead of inserting casts.
Allow creating wxBitmapBitmap from SVG image stored in an application
resource on the platforms where wxHAS_IMAGE_RESOURCES is defined.
On Windows, load the bundle from a resource with RT_RCDATA type and on
MacOS from a file with an extension "svg" placed in the "Resources"
subdirectory of the application bundle.
Closes#22061.
We often need the logical bitmap size when using it in size computations
involving window size, so add a function returning it directly to
wxBitmapBundle, similarly to wxBitmap::GetLogicalSize(), to avoid using
FromPhys() everywhere.
Also rename the existing wxBitmapBundle::GetPreferredSizeFor() to
GetPreferredBitmapSizeFor() to make it more clear that this is similar
to wxBitmap::GetSize() and so returns the size in physical units.
Closes#22056.
When SetPage() was called during the webview was still initializing
it would silently fail. This will now load the contents when the
webview is ready. Additionally error handling for the underlying
NavigateToString() has been added so it wont fail silently.
Closes#22052.
Performance tweak for samples/display, resulting in a much faster
application start, particularly when built in debug mode, when Windows
messages are dumped to the system debug channel for
inspection/diagnosis.
Speed up the Append() loop below by foregoing the repeated resizing of
the choice drop-down via repeated calls to GetBestSize() which happens
deep inside the Append() call chain and executes another inner loop
calling SendMessage() to get the control contents. (This exhibits
1/2*O(N^2) behaviour thanks to the linear growth of the length of the
inner loop to the length of the outer loop (= number of items to add),
while it is re-executed for every new added item.)
With the 'display' sample, that's about 500+ rounds and about 500*500/2
SendMessage() calls less now on my dev/test rig, taking noticeable time
to start the display application.
---
Issue was found due to the barrage of '(winmsg)' Windows Message debug
log lines zipping by in the monitor app when the sample was build in
Debug Mode. Only significant difference with the Release Build is those
debug lines being output, hence the performance gain is less, but still
measurable, in a Release build. When the machine is otherwise severely
loaded (UI render core maxing out), "measurable" becomes "obnoxiously
noticeable" again on Win10/64.
Closes#22049.
Add an event which can be handled by the application to determine the
splitter position when the splitter window itself is resized.
This can be used to e.g. preserve the splitter at the given proportion
of the window (and not just in the middle, as it would be already
possible by using gravity 0.5).
Closes#22035.