Since VS 2015 Update 3, the C++ standard targeted by the compiler can be
detected through _MSVC_LANG. This macro is like __cplusplus, but reflects the
actual standard understood by the compiler, unlike __cplusplus which by default
is left to an ancient value for compatibility.
Closes#22099.
Change various occurrences of wxBitmap to wxBitmapBundle to reflect the
changes of 9a5123afed (Use wxBitmapBundle in wxAuiToolBar and
wxAuiPaneInfo too, 2021-11-14).
Closes#22106.
This will replace the wxHAS_NATIVE_OVERLAY macro, allowing the determination
to be made at runtime. Ideally this should not be necessary, but it seems the
generic implementation may not always be good enough.
Add a new build option wxUSE_WEBVIEW_EDGE_STATIC.
If it is set to 1 the WebView2 loader is static linked into the binary
and removes the runtime dependency on WebView2Loader.dll.
Use the alpha channel of bitmaps added to wxImageList even if it was
created with "mask = true" ctor parameter (which is the default value).
To avoid using both mask and alpha, which is not supported by the native
image list, convert mask to alpha if we have it and either we also have
alpha or we are not using mask at all.
This restores the behaviour until the changes of 8f08233a13 (Fix adding
wxBitmap with mask to wxImageList not supporting masks (wxMSW),
2021-01-12), fixes compatibility with the other ports and, last but not
least, is the expected and actually useful behaviour: alpha shouldn't be
ignored if it exists in the bitmap.
Closes#22021.
This method allows to exclude a top level window from screen captures.
Windows 7 or newer is required and any macOS version is supported.
Other platforms are not implemented and will return false.
The display example has been extended to demo this ability.
Closes#22066.
This function doesn't exist in the other ports and is not really needed
in this one neither, so just remove it for now.
If we really want to have it, we need to make it available everywhere.
We must keep storing the currently used bitmap in wxMSW wxMenuItem to
ensure that its HBITMAP remains valid, as keeping wxBitmapBundle is not
enough: it may not preserve the bitmap at all (if it generates it on
demand, for example), and we may also use a different bitmap from what
we get from it (e.g. we convert mask to alpha).
Don't rescale these bitmaps because, as the pre-existing comment said,
this would be too ugly, but still ensure that the returned bitmap has
the correct size to satisfy the post-condition of GetBitmap().
This ensures that we don't rescale 16x15 bitmaps to 16x16 ones, which is
very noticeable and very ugly.
This was previously done in wxDefaultArtProvider, but not here and
didn't seem to be necessary, but since wxBitmapBundle-related changes it
has become possible for bitmaps to be rescaled here too, so use the same
logic for them.
See #22094.
This was broken by c1abbe6473 (Refactor wxMSW wxStaticBitmap to separate
bitmaps and icons, 2021-10-21), where the code for creating an icon for
a bitmap with mask was simply lost.
Note that an alternative fix could be to convert mask to alpha and use
this instead of switching to using an icon in this case, but for now
keep doing what we did before, even if it's not really clear which
approach is better.
See #22094.
/dev/log doesn't exist in certain types of containers (e.g., Fedora's
build system). Additionally, this enables us to run this test on
platforms other than Linux.
Closes#22090.
Replace wxBitmap with wxBitmapBundle in wxComboCtrl to make it show the
bitmap appropriate to the current DPI scaling.
Also add an event handler updating bitmaps on DPI change.
Closes#22032.
The change of 8aae7ad937 (Fatal exception fixed in DVC on macOS while
wxDataViewModel::Cleared call + editing item., 2022-01-17) broke change
of selection when deleting an item from wxDataViewCtrl and the unit test
checking for this but, somehow, only when it was merged into the latest
master and not when it was originally done.
It's not really clear how did it work before, but fix this now by
distinguishing between just deleting some items and clearing everything
and only returning nil from -[wxCocoaOutlineDataSource
outlineView🧒ofItem:] in the latter case, but not the former one.
Also replace wxDataViewCtrl::m_Deleting boolean with an (opaque)
pointer, so that we could improve this further in the future without
breaking the ABI.
See #22025.
Use a RAII-based helper class to reset this flag automatically on scope
exit instead of doing it manually.
This also ensures that we restore the original value rather than just
resetting it which would be more correct in the (admittedly, very
unlikely) case when any of the functions changing m_Deleting is called
recursively.
SetIncrement() was already available in wxSpinCtrlDouble and GTK version
of wxSpinCtrl, now implement support for it in wxMSW and wxOSX as well.
In fact, in wxMSW, implement it at wxSpinButton level, so that both this
class and wxSpinCtrl inheriting from it (in wxMSW only) support setting
custom increment now.
Also add support for it to XRC, show it in the sample and add a unit
test verifying that it works.
Closes#2597.
This is needed since GitHub CI images update to windows-2022 base image,
which notably changes Python version from 3.7 to 3.9 and requires
building wheels for some of the packages not available on PyPI for this
version.
Closes#22091.