fltk-egui
An FLTK backend for Egui using a GlWindow.
To use on Linux
Install FLTK deps:
&&
and then install egui deps:
&&
Usage
Add to your Cargo.toml:
[]
= "0.16" # targets egui 0.27
= "0.27"
= "0.27"
On wayland desktop enable feature:
[]
= { = "0.16", = ["wayland"] }
= "0.27"
= "0.27"
Note: on xwayland based desktop (like gnome 41+) doesn't require to enable the "wayland" features.
The basic premise is that egui is an immediate mode gui, while FLTK is retained. To be able to run Egui code, events and redrawing would need to be handled/done in the FLTK event loop. The events are those of the GlWindow, which are sent to egui's event handlers. Other FLTK widgets can function also normally since there is no interference from Egui. Please check the basic example.
Examples
To run the examples, just run:
cargo run --example basic
cargo run --example demo_windows
cargo run --example embedded
cargo run --example triangle
A demo app can be found here: https://github.com/fltk-rs/demos/tree/master/egui-demo
