Expand description
§Pane
A RON-driven retained UI library for wgpu applications.
Layouts are defined in .ron files and hot-reloaded at runtime. Pane handles
all rendering, input, animation, and state — your app just reads actions and
drives values.
§Three usage modes
| Mode | Use when |
|---|---|
run | Pane owns the window and event loop entirely |
overlay / PaneOverlay | You own wgpu; Pane renders into your frame |
headless / PaneHeadless | No GPU — logic, state, and events only (tests, servers) |
§Quick start (overlay)
ⓘ
let mut ui = pane::overlay("ui/main.ron", &device, &queue, surface_format, None);
// in your event loop:
ui.handle_event(&window_event, width as f32, height as f32);
// in your render pass:
for action in ui.draw(&mut encoder, &view, width as f32, height as f32) {
match action {
PaneAction::Custom(id) => println!("button pressed: {id}"),
PaneAction::Slider(id, val) => println!("{id} = {val}"),
_ => {}
}
}Structs§
- Pane
Headless - A Pane UI instance with no GPU or window — logic, state, and actions only.
- Pane
Overlay - A Pane UI instance that renders into an existing wgpu surface.
- Standalone
Handle - A handle passed to the
run_withcallback each frame, allowing you to call toast notifications and other runtime APIs from standalone mode.
Enums§
- Pane
Action - An event emitted by the UI in response to user interaction.
- Write
Value - The value to set when calling
PaneOverlay::writeorPaneHeadless::write.
Functions§
- headless
- Create a
PaneHeadlessinstance — no GPU required. - overlay
- Create a
PaneOverlaythat renders into your existing wgpu surface. - run
- Run Pane as a standalone application, owning the window and event loop.
- run_
with - Like
run, but gives you aStandaloneHandleeach frame to call write, toast, etc.