native_dialog/dialog/
file.rs1use std::path::PathBuf;
2
3use super::{Dialog, FileFiltersBag};
4use crate::utils::UnsafeWindowHandle;
5
6#[derive(Debug)]
7pub struct OpenSingleFile {
8 pub filename: Option<String>,
9 pub location: Option<PathBuf>,
10 pub title: String,
11 pub filters: FileFiltersBag,
12 pub owner: UnsafeWindowHandle,
13}
14
15impl Dialog for OpenSingleFile {
16 type Output = Option<PathBuf>;
17}
18
19impl OpenSingleFile {
20 super::dialog_delegate!();
21}
22
23#[derive(Debug)]
24pub struct OpenMultipleFile {
25 pub filename: Option<String>,
26 pub location: Option<PathBuf>,
27 pub title: String,
28 pub filters: FileFiltersBag,
29 pub owner: UnsafeWindowHandle,
30}
31
32impl Dialog for OpenMultipleFile {
33 type Output = Vec<PathBuf>;
34}
35
36impl OpenMultipleFile {
37 super::dialog_delegate!();
38}
39
40#[derive(Debug)]
41pub struct OpenSingleDir {
42 pub filename: Option<String>,
43 pub location: Option<PathBuf>,
44 pub title: String,
45 pub owner: UnsafeWindowHandle,
46}
47
48impl Dialog for OpenSingleDir {
49 type Output = Option<PathBuf>;
50}
51
52impl OpenSingleDir {
53 super::dialog_delegate!();
54}
55
56#[derive(Debug)]
57pub struct SaveSingleFile {
58 pub filename: Option<String>,
59 pub location: Option<PathBuf>,
60 pub title: String,
61 pub filters: FileFiltersBag,
62 pub owner: UnsafeWindowHandle,
63}
64
65impl Dialog for SaveSingleFile {
66 type Output = Option<PathBuf>;
67}
68
69impl SaveSingleFile {
70 super::dialog_delegate!();
71}