Use a dirty hack to accommodate wxUniv by deriving wxRadioButtonBase
from wxCheckBox, rather than wxControl, there. This is not pretty, but
should be addressed by refactoring wxUniv code and in the meanwhile all
the other ports don't have to bother with using a template class
unnecessarily.
Now that we do have wxRadioButtonBase class, declare wxRadioButton API
methods as pure virtual in it, to force the derived classes to implement
them.
Also remove the outdated comment saying that there is no base class for
wxRadioButtons in different ports, this is not true any longer.
Allow creating wxWindowPtr from wxScopedPtr<> too, to avoid having to
use .get() in the test code, and add CHECK_SAME_WINDOW() macro which
gives more useful information about the windows in case of failure.
This requires adding a couple of const_cast<>s in their implementation
in order to still allow them returning non-const wxRadioButton pointers,
but this seems preferable to not being able to call them on a const
wxRadioButton in the first place.
Previously they were only used, and compiled, on the platforms without
wxHAS_NATIVE_TAB_TRAVERSAL, i.e. were not compiled at all in wxGTK, but
we now need them everywhere as they're used to implement public API.
And use it to get HiDPI support wherever we use GtkImage. This extends and
consolidates support for custom drawing of images which has already been added
somewhat redundantly in several places.
We should use platform-specific functions to convert coordinates to take
into account all transformations applied to wxDC (also with transform
matrix).
Closes#18916.
Generic wxDC::DeviceToLogical{X|Y}() and wxDC::LogicalToDevice{X|Y}()
functions don't take into account transformations applied with
wxDC::SetTransformMatrix() so conversion results are invalid if wxDC is
transformed with both e.g. wxDC::SetUserScale() and
wxDC::SetTransformMatrix().
We need to implement functions in wxDCImpl and its platform-specific
derivates to do this conversion with taking into account all applied
transformations.
See #18916.
1) Link with the wayland-egl library, but do so only if we determine that we
have Wayland support in the GDK backend with a compile test.
2) Provide a way to force disable the EGL backend.
* adding native font descriptor serialization = v2
* remove common xml prefix from serialized string
* Update src/osx/carbon/font.cpp
Co-authored-by: VZ <vz-github@zeitlins.org>
* Update src/osx/carbon/font.cpp
Co-authored-by: VZ <vz-github@zeitlins.org>
* static string via accessor
* striping off xml preamble unconditionally
if we use a different format in the future, we will have to increase our version number
* applying italic directly to the font descriptor
thus preserving attributes in the native font descriptor which we don’t store explicitly yet
* Adding support for preserving font width
Although we don’t express this in the public API yet, we try to preserve eg condensed, when changing the font width
* Adding reference, bug fix
double checked the font weight constants,
Co-authored-by: VZ <vz-github@zeitlins.org>
This fixes another problem similar to the one fixed in be1854c617 (Avoid
UI functions in non-main thread in wxGStreamerMediaBackend, 2020-09-02)
and does it in a similar way: SetupXOverlay(), which calls gdk_flush(),
was called from gst_bus_sync_callback() which is executed in the worker
thread, so use CallAfter() to call it from the main thread later.
In aa2cd42206 (Report video size changes to the media backend,
2016-02-22), a couple of calls to NotifyMovieSizeChanged() were added,
presumably for a good reason. Unfortunately, NotifySizeChanged() makes
UI calls on wxGTK, so this resulted in UI calls happening on a non-main
thread because many of GStreamer's callbacks occur on arbitrary threads.
This is bad because it caused random X11 crashes.
Fix this by calling NotifyMovieSizeChanged() with CallAfter().
Closes https://github.com/wxWidgets/wxWidgets/pull/2042
Draw wxTextCtrl focus ring natively on Mac.
Add wxWindow::EnableVisibleFocus() to explicitly control the focus ring
visibility if necessary.
See https://github.com/wxWidgets/wxWidgets/pull/2037
Although @"UIApplication" is supposed to be used by default anyhow,
passing "nil" is reported to result in an assertion failure in
'_UIApplicationGetPrincipalClass' when running under the iOS 13.1
simulator, so pass this string explicitly.
Closes https://github.com/wxWidgets/wxWidgets/pull/2035
Check compilation of all wx headers with all gcc warnings enabled.
This should make it impossible to introduce problems that only appear
when -Wpedantic or -Wany-other-not-completely-unreasonable-warning is
enabled when building user code including wx headers again.
See https://github.com/wxWidgets/wxWidgets/pull/2033