davidedelpapa / rust-ui-fltk Goto Github PK
View Code? Open in Web Editor NEWRust UI Rundown: FLTK
Rust UI Rundown: FLTK
Greetings,
First of all I'd like to thank you for the work you have put out in your article on the state of GUI libraries in Rust. I was browsing it earlier to take a look at the current state of GUI libraries and play around with some of them. While testing FLTK, I noticed that the minimal snippet of code you provide no longer compiles properly. It seems there are two reasons :
fltk::prelude::*
: error[E0599]: no function or associated item named `new` found for struct `DoubleWindow` in the current scope
--> src/main.rs:5:28
|
5 | let mut wind = Window::new(100, 100, 400, 300, "Hello, FLTK!");
| ^^^ function or associated item not found in `DoubleWindow`
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
1 | use fltk::prelude::WidgetBase;
|
set_callback
method now takes a FnMut(&mut Self)
instead of a simple FnMut()
:error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
--> src/main.rs:13:9
|
13 | but.set_callback(move || frame.set_label("Hello, World!"));
| ^^^^^^^^^^^^ ------- takes 0 arguments
| |
| expected closure that takes 1 argument
|
help: consider changing the closure to take and ignore the expected argument
|
13 | but.set_callback(move |_| frame.set_label("Hello, World!"));
| ^^^
the fixes are trivial of course, I just wanted to let you know that, using the latest release of fltk (1.0.1) this code changed.
Have a nice day !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.