mod apply;
mod bang;
mod branch;
mod delay;
mod expr;
mod identity;
mod inlet;
mod log;
mod number;
mod outlet;
fn code_edit_desired_width(
ui: &egui::Ui,
theme: &egui_extras::syntax_highlighting::CodeTheme,
code: &str,
language: &str,
margin: egui::Margin,
) -> f32 {
let mut job =
egui_extras::syntax_highlighting::highlight(ui.ctx(), ui.style(), theme, code, language);
job.wrap.max_width = f32::INFINITY;
let galley = ui.ctx().fonts_mut(|fonts| fonts.layout_job(job));
galley.rect.width().ceil() + margin.sum().x + 1.0
}