Struct rat_widget::file_dialog::FileDialogState
source · pub struct FileDialogState {
pub active: bool,
/* private fields */
}
Expand description
State & event-handling.
Fields§
§active: bool
Dialog is active.
Implementations§
source§impl FileDialogState
impl FileDialogState
pub fn new() -> Self
sourcepub fn set_filter(&mut self, filter: impl Fn(&Path) -> bool + 'static)
pub fn set_filter(&mut self, filter: impl Fn(&Path) -> bool + 'static)
Set a filter.
sourcepub fn use_default_roots(&mut self, roots: bool)
pub fn use_default_roots(&mut self, roots: bool)
Use the default set of roots.
sourcepub fn clear_roots(&mut self)
pub fn clear_roots(&mut self)
Clear all roots.
sourcepub fn default_roots(&mut self, start: &Path, last: &Path)
pub fn default_roots(&mut self, start: &Path, last: &Path)
Append the default roots.
sourcepub fn open_dialog(&mut self, path: impl AsRef<Path>) -> Result<(), Error>
pub fn open_dialog(&mut self, path: impl AsRef<Path>) -> Result<(), Error>
Show as open-dialog.
sourcepub fn save_dialog(
&mut self,
path: impl AsRef<Path>,
name: impl AsRef<str>,
) -> Result<(), Error>
pub fn save_dialog( &mut self, path: impl AsRef<Path>, name: impl AsRef<str>, ) -> Result<(), Error>
Show as save-dialog.
pub fn screen_cursor(&self) -> Option<(u16, u16)>
Trait Implementations§
source§impl Debug for FileDialogState
impl Debug for FileDialogState
source§impl Default for FileDialogState
impl Default for FileDialogState
source§impl HandleEvent<Event, Dialog, Result<FileOutcome, Error>> for FileDialogState
impl HandleEvent<Event, Dialog, Result<FileOutcome, Error>> for FileDialogState
Auto Trait Implementations§
impl !Freeze for FileDialogState
impl !RefUnwindSafe for FileDialogState
impl !Send for FileDialogState
impl !Sync for FileDialogState
impl Unpin for FileDialogState
impl !UnwindSafe for FileDialogState
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
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more