a02d892f831f
services.rs
use std::path::{Path, PathBuf};
/// Host services (file dialogs) injected by the app; absent in tests and on the web. They return
/// paths as picked: the caller converts one to text where a command takes it ([`crate::dialogs::unicode`]).
#[derive(Default)]
pub struct Services {
pub pick_open: Option<Box<dyn Fn(&str, &[&str]) -> Option<PathBuf>>>,
/// Like `pick_open`, but the user may select several files (Import Audio). Empty when cancelled.
pub pick_open_many: Option<Box<dyn Fn(&str) -> Vec<PathBuf>>>,
/// The purpose and the file to start from.
pub pick_save: Option<Box<dyn Fn(&str, &Path) -> Option<PathBuf>>>,
/// The folder to start in.
pub pick_folder: Option<Box<dyn Fn(&Path) -> Option<PathBuf>>>,
}
No file is open. Choose one in the tree, or press Ctrl+O (⌘O on a Mac) to find one by name.
Syntax highlighting could not load. The unmodified read-only text remains available above.