pub struct FileDialogRequest { /* private fields */ }Expand description
Builder describing one file-dialog request.
Construct via Self::pick_file / Self::pick_files /
Self::pick_folder / Self::save_file; chain options;
hand to FileDialogHandle::submit (or call one of the
EventContext::pick_* convenience methods).
Implementations§
Source§impl FileDialogRequest
impl FileDialogRequest
Sourcepub fn pick_files() -> Self
pub fn pick_files() -> Self
Build an open-multiple-files dialog request.
Sourcepub fn pick_folder() -> Self
pub fn pick_folder() -> Self
Build a pick-folder dialog request.
Sourcepub fn title(self, t: impl Into<String>) -> Self
pub fn title(self, t: impl Into<String>) -> Self
Set the dialog’s title (window caption on most platforms).
Sourcepub fn starting_dir(self, p: impl Into<PathBuf>) -> Self
pub fn starting_dir(self, p: impl Into<PathBuf>) -> Self
Set the directory the dialog opens in.
Sourcepub fn default_file_name(self, n: impl Into<String>) -> Self
pub fn default_file_name(self, n: impl Into<String>) -> Self
Set the default file name pre-filled in the save dialog. No-op for open / pick-folder kinds (kept on the request so callers can prepare a single builder regardless of kind).
Sourcepub fn add_filter(self, label: impl Into<String>, extensions: &[&str]) -> Self
pub fn add_filter(self, label: impl Into<String>, extensions: &[&str]) -> Self
Add an extension filter row (e.g. "Images", &["png", "jpg"]).
Extensions are case-insensitive on platforms that natively
support filtering; do not include leading dots.
Sourcepub fn with_parent(self, p: ParentHandle) -> Self
pub fn with_parent(self, p: ParentHandle) -> Self
Stamp the parent window handle. Called by the
EventContext::pick_* convenience methods — apps that submit
a request directly via FileDialogHandle::submit are
responsible for providing the parent handle themselves.
Trait Implementations§
Source§impl Clone for FileDialogRequest
impl Clone for FileDialogRequest
Source§fn clone(&self) -> FileDialogRequest
fn clone(&self) -> FileDialogRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for FileDialogRequest
impl RefUnwindSafe for FileDialogRequest
impl Send for FileDialogRequest
impl Sync for FileDialogRequest
impl Unpin for FileDialogRequest
impl UnsafeUnpin for FileDialogRequest
impl UnwindSafe for FileDialogRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.