Implement File > Open menu item
This commit is contained in:
@@ -41,6 +41,7 @@ pub trait App {
|
||||
options: WindowOptions,
|
||||
executor: Rc<executor::Foreground>,
|
||||
) -> Result<Box<dyn Window>>;
|
||||
fn prompt_for_paths(&self, options: PathPromptOptions) -> Option<Vec<PathBuf>>;
|
||||
fn fonts(&self) -> Arc<dyn FontSystem>;
|
||||
fn quit(&self);
|
||||
}
|
||||
@@ -66,6 +67,12 @@ pub struct WindowOptions<'a> {
|
||||
pub title: Option<&'a str>,
|
||||
}
|
||||
|
||||
pub struct PathPromptOptions {
|
||||
pub files: bool,
|
||||
pub directories: bool,
|
||||
pub multiple: bool,
|
||||
}
|
||||
|
||||
pub trait FontSystem: Send + Sync {
|
||||
fn load_family(&self, name: &str) -> anyhow::Result<Vec<FontId>>;
|
||||
fn select_font(
|
||||
|
||||
Reference in New Issue
Block a user