#gui #widgets #graphics

fltk-egui

FLTK backend for egui

14 unstable releases (3 breaking)

new 0.4.0 Oct 26, 2021
0.3.6 Oct 11, 2021
0.3.1 Sep 29, 2021
0.2.3 Sep 25, 2021
0.1.2 Sep 2, 2021

#14 in #widgets

Download history 91/week @ 2021-08-31 15/week @ 2021-09-07 16/week @ 2021-09-14 20/week @ 2021-09-21 156/week @ 2021-09-28 45/week @ 2021-10-05 75/week @ 2021-10-12 38/week @ 2021-10-19

153 downloads per month
Used in fe-image-widget

MIT license

56KB
1K SLoC

fltk-egui

An FLTK backend for Egui using a GlWindow. The code is largely based on https://github.com/ArjunNair/egui_sdl2_gl modified for fltk-rs.

Usage

Add to your Cargo.toml:

[dependencies]
fltk-egui = "0.3"

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 demo_windows
$ cargo run --example triangle
$ cargo run --example basic
$ cargo run --example embedded

A demo app can be found here: https://github.com/fltk-rs/demos/tree/master/egui-demo

Todo

  • Properly handle resizing the GlWindow: ✅
  • Support egui_demo_lib crate directly: ✅
  • Clipboard support: ✅

Dependencies

~13MB
~272K SLoC