#imgui #gui-applications #ui #graphics #gui-framework

easy-imgui-window

Default windowing for the easy-imgui crate using winit and easy-imgui-renderer

14 releases (6 breaking)

0.7.0 Aug 7, 2024
0.6.1 Jul 10, 2024
0.5.0 Jun 8, 2024
0.4.1 May 13, 2024
0.1.1 Jan 27, 2024

#777 in GUI

Download history 166/week @ 2024-05-13 149/week @ 2024-05-20 9/week @ 2024-05-27 158/week @ 2024-06-03 67/week @ 2024-06-10 1/week @ 2024-06-17 110/week @ 2024-07-01 185/week @ 2024-07-08 19/week @ 2024-07-15 13/week @ 2024-07-22 22/week @ 2024-07-29 131/week @ 2024-08-05 27/week @ 2024-08-12 16/week @ 2024-08-19 11/week @ 2024-08-26

187 downloads per month
Used in easy-imgui-filechooser

MIT license

9MB
120K SLoC

C++ 101K SLoC // 0.2% comments Rust 7.5K SLoC // 0.0% comments Visual Studio Project 6.5K SLoC Objective-C++ 3.5K SLoC // 0.2% comments C 731 SLoC // 0.3% comments Visual Studio Solution 341 SLoC Batch 273 SLoC GLSL 84 SLoC Kotlin 59 SLoC // 0.1% comments Shell 3 SLoC // 0.7% comments GDB Script 1 SLoC // 0.9% comments

easy-imgui-rs

build

Build full GUI applications with Rust and Dear ImGui. It currently uses version v1.90.9.

There are several crates in this repository:

See some examples at the examples directory. The simplest one is just a few lines of code:

use easy_imgui_window::{MainWindow, MainWindowWithRenderer,
    winit::event_loop::EventLoopBuilder,
    easy_imgui as imgui,
};

fn main() {
    let event_loop = EventLoopBuilder::new().build().unwrap();
    let main_window = MainWindow::new(&event_loop, "Example").unwrap();
    let mut window = MainWindowWithRenderer::new(main_window);

    let mut app = App;

    event_loop.run(move |event, w| {
        let res = window.do_event(&mut app, &event, w);
        if res.is_break() {
            w.exit();
        }
    }).unwrap();
}

struct App;

impl imgui::UiBuilder for App {
    fn do_ui(&mut self, ui: &imgui::Ui<Self>) {
        ui.show_demo_window(None);
    }
}

Dependencies

~7–24MB
~394K SLoC