7 ms·
WxWidgets 3.2
- jarrell_mark 4y agoWxWidgets is like React Native but for desktops. It uses the platforms' native UI frameworks. Gtk on Linux. Audacity the audio editor uses WxWidgets.
- t0mas88 4y agoI used this 15+ years ago with C++, it was so much easier to do cross platform things that way and it had good performance. Now I think I have not worked on a native desktop app on at least 10 years. And everything I see others make is more hybrid, javascript, electron kind of things. The performance of that even though we have much faster hardware feels worse than what WxWidgets / C++ did 15 years ago...
- tgv 4y agoI wrote a (simple) accounting/billing application for my inlaws' shop some 20 years ago wih wxWidgets. I developed it on a mac, but it ran on a PC. The PC was very modest even back then (some 486, at best), but the application ran like lightning.
- wslh 4y agoThe same for a MS-DOS Clipper [1] application written 30 years ago. Sorry, with all due respect to the wxWidgets contributors, aesthetically wxWidgets (like many other UI libs) is not for 2022. [1] https://en.wikipedia.org/wiki/Clipper_(programming_language) https://en.wikipedia.org/wiki/Clipper_(programming_language)
- 72deluxe 4y agoBut it just wraps the native controls...? You're effectively saying that native controls are not for 2022...
- waynesonfire 4y agoI'm guessing OP meant it doesn't look like material ui.
- raphlinus 4y agoA serious question: what are native controls on Windows? Is the Windows XP era where each control is its own HWND (and usually drawn with GDI+)? Is it Windows 7 era where the drawing is Direct2D? Windows 8 where the elements of the app come together with DirectComposition? Or maybe Windows 10 style which is an evolution of UWP (now rebranded WinUI), with drawing in Win2D?
- mwcampbell 4y agoFor lightweight utilities, I think the user32 controls (HWND per control, drawn with GDI) are still a reasonable choice. That's the one GUI toolkit that's guaranteed to already be in the working set on all versions of Windows, thus minimizing the impact on startup time and memory footprint. Do those controls just look hideous to modern users? I obviously can't judge that for myself. Or is there a problem with the way they render text on high-DPI displays?
- raphlinus 4y ago
- bsenftner 4y agoI was an active user until 2 years ago, when I quit my last enterprise software job. They had a cross platform (including embedded systems) enterprise video security system, a suite of applications all written in wxWidgets. They screamed, they were so fast. They had to be, for our enterprise clients. But those same clients had typical "give me candy" managers, and they complained about the ancient native interface. That company chose to ditch wxWidgets, put everything behind a server I wrote, and then hire some over priced web agency to make them a web interface they charged 4 times the expense of the development entire enterprise software suite.
- 72deluxe 4y agoLunacy. Change looks like progress to some people. And doubly so if it looks like all web UIs these days - loads of padding, giant buttons, and really slow to load and render.
- lpcvoid 4y agoThis is why it's so important to have managers which aren't stupid and have technical insight. Luxurious proposition, unfortunately.
- heavyset_go 4y agoWxWidgets still works well today, I've used it on desktop products with great success.
- api 4y agoI think it just needs API modernization. That’s it. Then it would totally rock. It could be a thin “free” (template only) wrapper.
- heavyset_go 4y agoDefinitely agree with this.
- ziotom78 4y agoI have vivid memories of WxWidgets. I used it ~20 years ago to develop a program to browse a collection of artistic works (mainly sculptures and paintings) that was distributed on a CD (no internet at the time, this is the way knowledge was spread!). It was a bit clunky to use but extremely solid, and the end result was nice: it stored information in XML and displayed it in a window, letting the user to do simple searches and export images as JPG. I was able to seamlessly put in the same CD executables for Windows and for Linux, which was quite a big deal at the time. A few years later (~2009), I used Qt to develop a big codebase that needed to be used on Windows, Linux, and Mac. It was admittedly nicer than WxWidgets, but my impression was that it was harder to understand what Qt did under the hood… It was as if Qt was trying to be more clever than the C++ compiler, while with WxWidgets it had always be more or less evident what the library was doing.
- 72deluxe 4y agoA truly excellent toolkit. The code is very readable and the developers are quick to communicate/respond on the forum or stackoverflow. I wish more people used it instead of writing "apps" that are just a giant web browser with javascript and a hack to get menus working correctly, with fake UI widgets that don't respond like native window controls (no proper tab navigation, no moveable or resizeable dialogs, keyboard accelerators don't work).
- ale42 4y agoSo true... some people seem to appreciate the their "aesthetics", but many 2022 UIs are just much worse than what we used to have with... Windows 3.1, or System 7 on Mac. They had uniform keyboard shortcuts (at least Windows, no idea for Mac which I used only very rarely), uniform window controls, applications that didn't need a 150 MB runtime... the worse, is that this is still possible today, just many people don't even bother to try doing it.
- 72deluxe 4y agoI think there's an entire generation that think that UIs should be bloated and slow and have taken web apps to be the norm. It's very sad.
- HelloNurse 4y agoTime for a new cycle of replacement, we are already seeing storage of data on the computer rather than on someone's server as a feature.
- konkordat 4y agoIt's LGPL license. I wouldn't touch it with a stick when thinking about a real app.
- wrigby 4y agoI’m truly curious, is this because it rules out distributing a statically linked binary? I may be misremembering, but I thought LGPL is completely fine for commercial apps if you’re just looking against the LGPL’d code.
- markdown 4y agoBit of a tangent, but it's nice to see a project with a googlable name. If this were started today it would be called Avocado or Potato or something like that.
- ilaksh 4y agoYou can still download the chess timer I made with wxWidgets like fifteen years ago. Apparently from this site https://www.softpedia.com/get/Others/Miscellaneous/Chess-Timer-Livesay.shtml https://www.softpedia.com/get/Others/Miscellaneous/Chess-Tim... which I don't remember submitting it to. The next result in Google is sketchy because it's a "crack" and that doesn't apply to shareware.
- akerr 4y agoI used WxWidgets almost 20 years ago with Python to quickly make a project that included printing support. I went from reading the docs to a working prototype in one night! Hopefully this release will help the planned improvements to Audacity too.
- tut-urut-utut 4y agoWxWidgets is nice, used it in the past at one ocasion. It's just that I don't have any desire to touch anything C/C++. If it had a Java wrapper so I can use it with Clojure, it would be another topic.
- amelius 4y agoThe python binding is very popular.
- cafard 4y agoI used it some years ago. The PythonCard library made it very easy to use.
- mwcampbell 4y agoFor something like wxWidgets that runs on the JVM, check out Eclipse's SWT.
- tut-urut-utut 4y agoSWT has its set of issues. Last time I had to do desktop UI, I went with Swing. Other option is going a JavaFX way, which even has a nice Clojure bindings. Unfortunately, they are both non-native options.
- gen2brain 4y agowxWidgets are a perfect choice if you want cross-platform native controls. Just a reminder, Qt doesn't use native controls, it just emulates the native look and feel. Besides wxWidgets I know only IUP that uses system native controls (though Cocoa is a work in progress), and IUP deals with just UI, wx is like a Qt, a lot more.
- mwcampbell 4y agoEclipse's SWT for Java also uses native controls, and IIRC it does so more consistently across platforms than wx. In 2015 I wanted to develop a desktop app in Python, but use SWT, so I did a hacky mongrel setup where I used the pyjnius Python package to load the Avian lightweight JVM into my CPython process so I could use SWT. Avian is dead now, so if I ever have to port that app to ARM64 for Apple Silicon Macs (right now it runs fine under emulation), I'll be in trouble. But at least for now, the app has a reasonably lightweight cross-platform UI.
- fayten 4y agoI'm working on a native wrapper for SWT with GraalVM. The resulting library with base SWT is about 18M, which is fairly large, but definitely workable. I have successfully used the wrapper from C and Zig as a proof of concept. The main goal was to originally expose SWT for Nim, but I got pretty side tracked. I'll probably make a show HN later this year when I have it in a usable state. I haven't gotten callbacks working quite yet, which makes it pretty useless. I'm a bit worried about performance, but I'll throw a cassowary constraint manager on top of a ton of widgets and see how it does. Memory usage with an empty window is ~35mb at 1920x1080. It successfully works on Windows, Linux, and MacOS x86 and aarch64.
- benibela 4y agoOnce I started building a GUI wrapper that could either use SWT or AWT as backend (or perhaps Swing rather than AWT, i do not remember). I do not remember why. Perhaps I thought it will be more portable or performant. But I quickly abandoned that (would not want to get stuck on a legacy tech like java and awt) and ported all my projects to Pascal for maximal performance.
- diego_moita 4y agowxWidgets has a sublime idea: an api that is just a wrapper over native controls. For cross platform frameworks it is fast and light. The very opposite of bloatware. But it also has a terrible flaw: its heavy-templated C++ api, hard to port to other languages. I don't want to get stuck on C++. I want to use Go and Rust. And all the wxWidgets ports to those languages suck, big time. Show me a solid wxWidgets for Rust and I'll fall in love again. Yes, I'd also colaborate on that project, too.
- IYasha 4y agoWhy so negative, yo? If you don't want to get stuck on C++, stick to C! )
- idoubtit 4y ago> If you don't want to get stuck on C++, stick to C! ) You can't use C directly with the official WxWidget library. For instance, here is the first line of WxWidget's manual: "Welcome to wxWidgets, a stable and powerful open source framework for developing native cross-platform GUI applications in C++!"
- justin66 4y agoThis isn't really a fault in WxWidgets. It's not like there are any good Go or Rust UI toolkits.
- phkahler 4y ago>> This isn't really a fault in WxWidgets. It's not like there are any good Go or Rust UI toolkits. GTK-rs is decent for rust on Linux. Not sure how it does on other platforms.
- justin66 4y agoAs a user GTK typically feels a little funky on Windows, although I don't know how much of that is a fault with the toolkit and how much of it is a function of Windows definitely not being those developers' primary target. I'm delighted to hear Rust programmers have got something worth using.
- gaze 4y agoMany people don’t know about XRC, which allows you to describe a window in an XML document much like HTML. It can be edited and live reloaded. Wonderful feature.
- debug-desperado 4y agoSeems cool for tweaking layout and styles on the fly, thanks for pointing this out. I think many devs underestimate how important the JS world's Hot Module Replacement has become for frontend dev velocity. Live reload just makes visual work so much better. Of course we all know the scourge that is Electron apps. Maybe now that native web view is becoming more available across desktop OS's we will see apps move to leaner frameworks. Tauri (which hit 1.0 yesterday) allows native system access, notifications, app tray, auto updates, polyglot backend via sidecars, and HTML/CSS/JS/TS frontend. Not native controls that many of us love, but much better than where we're at now.
- wahern 4y agoI use Yue (libyue.com) with its Lua bindings. I compile Lua source files into a static binary, but I can flip a switch (in the environment) to load sources from a specific directory. This isn't hot reload--currently I still need to restart the application--but it wouldn't be too difficult to hot reload the sources. How and when views reflect the new code would be more complex, but AFAICT (from https://www.geeksforgeeks.org/hot-reload-in-electronjs/ https://www.geeksforgeeks.org/hot-reload-in-electronjs/) it's not exactly magic in Electron, either--browser views are reloaded in their entirety, and the main application is restarted entirely if its sources are changed, so you can lose state. You could probably do something more sophisticated in Lua, by dynamically updating the metatables of live objects (similar to prototypes in JS). That'd be a very leaky abstraction (presumably by Electron hot reload doesn't try it). You'd need to architect your code to be robust to missing or changed object state across versions of the code, or at least to annotate which objects are capable of being hot reloaded. But Smalltalk and, to a lesser extent, Objective-C developers have experience hot patching code this way, so it can be done.
- butz 4y agoWhich version of GTK does WxWidgets use? Overview mentions "2.6 or higher", but Wayland support hints at GTK3, or am I wrong?
- ziotom78 4y agoIn the "Platform details" page [1] they say that GTK 3 is the default since WxWidgets 3.1.4, but if you want you can link against GTK 2 by calling `configure` with the flag `--with-gtk=2`. [1] https://docs.wxwidgets.org/3.2/page_port.html#page_port_wxgtk https://docs.wxwidgets.org/3.2/page_port.html#page_port_wxgt...
- SloopJon 4y agoFor those thinking that this is just another version, note that 3.2 is a stable version, with 3.0 having been first released almost nine years ago. In the interim, I'm sure many people have used 3.1, but now you get all of the fun enhancements without an asterisk.
- KronisLV 4y agoThey do have a nice page of screenshots that demonstrate some of the projects out there that use wxWidgets: https://wxwidgets.org/about/screenshots/ https://wxwidgets.org/about/screenshots/ That said, I find myself wishing that they'd have a page of screenshots and code snippets for each components, like web development frameworks typically have, for example: https://www.primefaces.org/primevue/calendar https://www.primefaces.org/primevue/calendar Of course, you cannot run those components live, but might at least have screenshots of each component on each supported platform.
- jpmattia 4y ago> I find myself wishing that they'd have a page of screenshots and code snippets for each components The samples folder in the distribution pretty well fills this need. See eg https://docs.wxwidgets.org/3.2/page_samples.html https://docs.wxwidgets.org/3.2/page_samples.html
- KronisLV 4y agoThat is nice to see and honestly probably what you'd be after in most cases, given the fact that you'd be developing locally anyways.