Expand description
dear-app: minimal Dear ImGui app runner for dear-imgui-rs
Goals
- Hide boilerplate (Winit + WGPU + platform + renderer)
- Provide a simple per-frame closure API similar to
immapp::Run - Optionally initialize add-ons (ImPlot, ImNodes) and expose them to the UI callback
Quickstart
use dear_app::{run_simple};
use dear_imgui_rs::*;
fn main() {
run_simple(|ui| {
ui.window("Hello")
.size([300.0, 120.0], Condition::FirstUseEver)
.build(|| ui.text("Hello from dear-app!"));
}).unwrap();
}Structs§
- AddOns
- Mutable view to add-ons for per-frame rendering
- AddOns
Config - Add-ons to be initialized and provided to the UI callback
- AppBuilder
- App builder for ergonomic configuration
- Docking
Api - Docking
Config - Docking configuration
- Docking
Controller - GpuApi
- GPU access API for real-time scenarios (game view, image browser, atlas editor)
- Runner
Callbacks - Runner lifecycle callbacks (all optional)
- Runner
Config - Basic runner configuration
Enums§
- Dear
AppError - Redraw
Mode - Redraw behavior for the event loop
- Theme
- Simple built-in themes for convenience
Functions§
- run
- Run an app with configuration and add-ons.
- run_
simple - Simple helper to run an app with a per-frame UI callback.
- run_
with_ callbacks - Run with lifecycle callbacks (builder使用)