Expand description
Controls bound to a command show its busy state: a run waiting for
the host’s result (Reply::Later, ADR 0010) greys the control and,
after motion.spinner.delay, a spinner takes its icon’s place for at
least motion.spinner.min. The control keeps its width and its name
(AccessKit’s busy flag is set while the run waits); a failed run
says why on hover. Menu items do the same (menus), and the status
bar’s indicators show a delayed spinner while busy (strips).
use egui_pop_api::AppHandle;
use egui_pop_api::busy::CommandButton;
use egui_pop_model::ids::CommandId;
fn toolbar(ui: &mut egui::Ui, app: &AppHandle) {
ui.add(CommandButton::new(app, CommandId::from_static("doc.export")));
}Structs§
- Command
Button - A button running a command, with its title, its icon slot and its busy state.
Functions§
- busy_
shown - Whether the busy indicator of a command shows in a control (
idnames the control): after the delay while a run waits, then for the minimum. - paint_
slot - Paints a control’s icon slot: a spinner while busy, else its icon.