News for hackers. Stuff that matters.
Re:Rust 2020: GUI and Community by nitwit005 on Saturday November 09, 2019 @10:23PM (#21496204)
That problem is normally solved by creating a nicer API abstraction around it.

Windows and OS-X tend to be the more straightforward cases. There is a standard set of UI components which users expect. Things are murkier in the Unix world, with multiple libraries and display technologies.

Re:Rust 2020: GUI and Community by raphlinus on Saturday November 09, 2019 @11:16PM (#21496371)
I'm genuinely curious. Is there a good example of a cross-platform wrapper around platform widgets? That was the original design brief of AWT, which turned out quite bad. Is there a successor which actually gets it right?
Re:Rust 2020: GUI and Community by nitwit005 on Saturday November 09, 2019 @11:40PM (#21496431)
I obviously haven't tried every library, but my experience has been they all have some problems. You have to expect things like differing text wrapping and scroll behavior because it's hard to completely abstract the underlying UI frameworks.

The alternative of custom painting everything tends to come with more difficult to fix issues however. AWT's successor Swing struggled with things like respecting system user preferences and accessibility. You can find some old Java 1.5 write ups about it: https://web.mit.edu/java_v1.5.0_22/distrib/share/docs/guide/...

Re:Rust 2020: GUI and Community by j88439h84 on Wednesday November 20, 2019 @01:28PM (#21586802)
http://Beeware.org is a new project for python.
Re:Rust 2020: GUI and Community by pnako on Sunday November 10, 2019 @01:15AM (#21496704)
wxWidgets is the most popular one. It's an ambitious project that allows accessing true native widgets, not just from C++ but also from other languages like Python, etc.
Re:Rust 2020: GUI and Community by twic on Sunday November 10, 2019 @08:19AM (#21497840)
Someone had a go at a Rust binding of wxWidgets five years ago:

https://github.com/kenz-gelsoft/wxRust

As they mention, this is based on a C wrapper round wxWidgets' native C++ API, originally developed to aid in developing a Haskell binding to wxWidgets:

http://wxc.sourceforge.net/

The Rust binding is probably bitrotted for modern Rust, but since it's mostly generated, generating a low-level API using bindgen, which is actively maintained, and then a high-level API using a Python script of its own, it might be fairly easy to resurrect.

bindgen has got pretty good at converting C++ APIs, so it might be worth trying it on wxWidgets' native API, too.

I have no plans to write a GUI application in Rust myself, but i would love for there to be a good option for other people to write native GUI apps in Rust. As many other commenters have noted, cross-platform synthetic GUIs never look or behave quite right.

Re:Rust 2020: GUI and Community by dsego on Sunday November 10, 2019 @08:45AM (#21497925)
Re:Rust 2020: GUI and Community by the8472 on Sunday November 10, 2019 @09:03AM (#21497971)
Re:Rust 2020: GUI and Community by swiley on Sunday November 10, 2019 @08:02AM (#21497804)
At least the Unix world tried, both with tk and gtk.