![](/style/images/good.png)
![](/style/images/bad.png)
wxWidgets: Cross-Platform GUI Library
source link: https://www.wxwidgets.org/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Cross-Platform GUI Library Skip to content
wxWidgets is a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base. It has popular language bindings for Python, Perl, Ruby and many other languages, and unlike other cross-platform toolkits, wxWidgets gives applications a truly native look and feel because it uses the platform's native API rather than emulating the GUI. It's also extensive, free, open-source and mature.
Featured App:
Kirix Strata
Latest News
wxWidgets 3.1.6 Released
Posted on April 04, 2022
wxWidgets 3.1.6 release is now available on GitHub. You will find there archives with the library sources and documentation as well as binaries for the selected Windows compilers such as Microsoft Visual C++, MinGW-w64 and TDM-GCC.
Please notice that while 3.1.6 is officially a “development” version because it is not fully compatible with the “stable” 3.0.x, the list of backwards incompatible changes is very short, so you shouldn’t have any problems updating to this version from 3.0.x in practice, and you’re encouraged to use this release, including in production.
This is also the last release before the upcoming 3.2.0 release that will be the start of a new API and ABI-stable wxWidgets version, so please test your existing applications with this version and let us know about any problems and, especially, regressions, so that they could still be fixed before 3.2.0.
Changes in this release
In almost a year since the previous release, there have been more than 1700 commits from 82 unique contributors (41 with multiple contributions), so it is impossible to summarize all the changes in this document without making it too long, please see the fuller changelog for more (but still not all) details, but some of the most important changes are:
- New wxBitmapBundle class allowing to provide art work for both normal and high DPI in a simple way.
- New wxUILocale class replacing the old (but still available) wxLocale, but not suffering from its multiple problems and providing more functionality.
- Support for using native spell-checking in wxTextCtrl.
- Support for undo/redo in wxTextCtrl in wxOSX.
- Better drag-and-drop implementation in wxOSX.
- Fixes for important bugs in wxDataViewCtrl under all platforms.
- Many improvements and bug fixes for Wayland support in wxGTK.
- Support for the latest OS versions (Windows 11, macOS 12) and compilers (MSVS 2022, gcc 12, clang 13).
- Project bug tracker has been moved to GitHub Issues.
Notice that in spite of all the changes, this release remains almost completely compatible with 3.1.5 at the API level, so upgrading to it if you’re already using wxWidgets 3.1 should be straightforward.
Feedback
Please let us know about your experience with this release via any of the following channels:
Or by commenting under this post.
Thanks to everybody who has contributed to this release and we hope that you will enjoy working with it!
Goodbye Trac
Posted on January 12, 2022
After almost 15 years of using Trac as our bug tracker (thank you Trac
developers for providing the tool that was so helpful for us during all these
years!), we’ve just migrated all the tickets from it to GitHub Issues.
Most of the existing issues, with the exception of the very old ones, have
kept their existing numbers, so instead of
https://trac.wxwidgets.org/ticket/NNNNN
you can simply use
https://github.com/wxWidgets/wxWidgets/issues/NNNNN
now and we will
probably put in place an automatic redirect from the former to the latter
soon. And to report new issues, please go to
https://github.com/wxWidgets/wxWidgets/issues/new/
There are many advantages of using GitHub Issues instead of our own Trac installation, e.g. GitHub web UI is easier to use and much faster. And you also don’t need to create, or use, a separate account, as was the case for wxTrac. However this is also the main disadvantage of this change: you now need to have a GitHub account in order to report issues in wxWidgets. We hope that relatively few people will be negatively affected by this, but for those who are, please post your bug reports to our mailing lists instead.
And please also use the mailing lists to let us know if you encounter any problems after this migration!
Roundup of the Recent Changes
Posted on October 30, 2021
A quick overview of the recent changes and improvements in wxWidgets: since 3.1.5, quite a few things have happened and this post provides a summary of the last 6 months.
The most important one is the addition of wxBitmapBundle class class,
which allows to provide several versions of the same bitmap, including the
default (used at 100% DPI, i.e. without DPI scaling at all) and
high-resolution one (used at 200% DPI scaling) as well as more variants for
the intermediate scaling factors, if necessary, and let wxWidgets
automatically select the best version to use and switch between them if the
DPI scaling changes, as it happens when moving the window between displays
using different DPI. Note that the new API is 100% backwards-compatible with
the existing one, i.e. all the existing code will continue to work and if you
provide just a single bitmap, it will be upscaled to the expected size, just
as before. But now you can also easily provide your own high resolution
version to avoid the bitmaps in your application looking blurry in high DPI.
This already works today with wxButton
(and all the derived classes),
wxStaticBitmap
and wxToolBar
and all the other classes using bitmaps will
support the new API in wx 3.1.6.
Moreover, as a side-effect of this work, it is now possible to use SVG images
everywhere where wxBitmap
is used with wxBitmapBundle::FromSVG(),
thanks to Nano SVG library integration.
The next big addition to the API is the wxUILocale class, which provides
a new and more flexible way to get locale-specific information than the old
wxLocale
. Notably, the new class doesn’t rely on the – quite naive, in
retrospect – assumption that the standard C setlocale()
function actually
works, which allows it to work correctly under the recent macOS, where C
locale cannot be used at all, due to bugs in Apple code. It also uses BCP
47-like identifiers for the locale instead of wxLanguage
enum, which
allows it to cover all the languages supported by the OS and not just those
known to wxWidgets, and provides a new CompareString() function which
compares strings using language-specific rules. It is recommended to use this
class rather than wxLocale
in all new code, especially for applications
targeting macOS, as using the old class results in a bad bug under macOS
10.15 or newer.
Other new features include:
- Add support for using native spell checking in
wxTextCtrl
. - Add XRC handler for
wxStyledTextCtrl
. - Implement support for undo/redo for
wxTextCtrl
in wxOSX. - Add
wxImage::Change{Saturation,Brightness,HSV,Lightness}()
. - Add
wxKeyEvent::IsAutoRepeat()
. - Add
wxSpinCtrl::GetTextValue()
.
There have a few updates for the new compiler versions and other modernizations:
- wxWidgets headers have been updated to not produce any warnings when compiling in C++20 mode with gcc 11 and clang 12.
- MSVS 2022 is now supported.
- Variadic functions such as
wxPrintf()
andwxLogXXX()
now supportstd::string_view
arguments too. - wxMSW uses (quite old) Winsock 2 by default rather than the (absolutely ancient) Winsock 1.
A few optimizations as well:
wxMBConv
was significantly sped up under Unix systems.- Creating standard system fonts is now much faster in wxOSX.
And other than that, there were all the usual minor improvements and bug fixes:
wxMediaCtrl
in wxGTK now works when using Wayland too.- Fix key event generation in
wxDataViewCtrl
. - Improve handling printer settings in wxMSW and wxGTK.
- Fix mouse events when using touch events in wxGTK.
- Fix
wxDC::Blit()
when using RTL layout in wxMSW. - Improve
wxSpinCtrlDouble
significant digits handling. - Several bug fixes in the long-neglected wxUniv port.
That’s all for this “brief” summary, please don’t hesitate to try the new features and let us know if you have any questions about them or if you find any problems, so that they could be fixed before the upcoming 3.2.0 release.
Thanks in advance!
IRC Channel Moving to Libera.Chat
Posted on May 31, 2021
As many of you might have heard, the Freenode IRC network changed management a week ago, in what can only be described as a hostile takeover. The original Freenode staff that has taken great care of us for about two decades now have all resigned from Freenode, and created Libera.Chat, which we have decided to migrate to. This decision aligns with hundreds other open source projects making the same migration now, including Ubuntu, Gentoo, Wikimedia, FreeBSD, Fedora, Arch Linux, LibreELEC, Arduino, and PostgreSQL. We understand that this may be disruptive, but believe this move will ultimately be best for everyone.
In order to ensure that our relatively small IRC community of users isn’t divided long term, we have muted our channel on Freenode, leaving a notice with updated instructions for joining our new channel on Libera.Chat, where you will find all of the same helpful and experienced wxWidgets users.
Please see our IRC Channel page for help with connecting to Libera.Chat.
Ingenuity Helicopter
Posted on April 19, 2021
wxWidgets code probably doesn’t run on Mars (yet), but wxPython/wxWidgets is nevertheless one of the projects whose developers have been credited as contributors to the NASA Ingenuity mission.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK