pub struct ManagedFileChooserViewModel { /* private fields */ }Expand description
The state of the managed file chooser: the folder it shows, its entries, the selection, the filters and the quick links.
Implementations§
Source§impl ManagedFileChooserViewModel
impl ManagedFileChooserViewModel
Sourcepub fn new(options: ManagedFileDialogOptions) -> Rc<Self>
pub fn new(options: ManagedFileDialogOptions) -> Rc<Self>
The constructor all the others start with.
Sourcepub fn new_open_file(
file_picker_open: &FilePickerOpenOptions,
options: ManagedFileDialogOptions,
) -> Rc<Self>
pub fn new_open_file( file_picker_open: &FilePickerOpenOptions, options: ManagedFileDialogOptions, ) -> Rc<Self>
The chooser of an open file picker.
Sourcepub fn new_save_file(
file_picker_save: &FilePickerSaveOptions,
options: ManagedFileDialogOptions,
) -> Rc<Self>
pub fn new_save_file( file_picker_save: &FilePickerSaveOptions, options: ManagedFileDialogOptions, ) -> Rc<Self>
The chooser of a save file picker.
Sourcepub fn new_open_folder(
folder_picker_open: &FolderPickerOpenOptions,
options: ManagedFileDialogOptions,
) -> Rc<Self>
pub fn new_open_folder( folder_picker_open: &FolderPickerOpenOptions, options: ManagedFileDialogOptions, ) -> Rc<Self>
The chooser of a folder picker.
Sourcepub fn cancel_requested(
&self,
handler: impl Fn() + 'static,
) -> Rc<dyn IDisposable>
pub fn cancel_requested( &self, handler: impl Fn() + 'static, ) -> Rc<dyn IDisposable>
Raised when the chooser is canceled.
Sourcepub fn complete_requested(
&self,
handler: impl Fn(&[String]) + 'static,
) -> Rc<dyn IDisposable>
pub fn complete_requested( &self, handler: impl Fn(&[String]) + 'static, ) -> Rc<dyn IDisposable>
Raised with the chosen paths when the chooser completes.
Sourcepub fn overwrite_prompt(
&self,
handler: impl Fn(&str) + 'static,
) -> Rc<dyn IDisposable>
pub fn overwrite_prompt( &self, handler: impl Fn(&str) + 'static, ) -> Rc<dyn IDisposable>
Raised with the full path of an existing file the user chose to save to, when overwriting needs a confirmation.
pub fn quick_links(&self) -> FerroList<Rc<ManagedFileChooserItemViewModel>>
pub fn items(&self) -> FerroList<Rc<ManagedFileChooserItemViewModel>>
pub fn filters(&self) -> FerroList<Rc<ManagedFileChooserFilterViewModel>>
Sourcepub fn selected_items(&self) -> SelectedItemsList
pub fn selected_items(&self) -> SelectedItemsList
The selected entries, as the untyped list the list box of the
chooser fills: each item is a ManagedFileChooserItemViewModel.
Sourcepub fn selected_item_view_models(
&self,
) -> Vec<Rc<ManagedFileChooserItemViewModel>>
pub fn selected_item_view_models( &self, ) -> Vec<Rc<ManagedFileChooserItemViewModel>>
The selected entries as view models.
pub fn location(&self) -> Option<String>
pub fn set_location(&self, value: Option<String>)
pub fn file_name(&self) -> Option<String>
pub fn set_file_name(&self, value: Option<String>)
pub fn selecting_folder(&self) -> bool
pub fn show_filters(&self) -> bool
pub fn selection_mode(&self) -> SelectionMode
pub fn title(&self) -> Option<String>
Sourcepub fn quick_links_selected_index(&self) -> i32
pub fn quick_links_selected_index(&self) -> i32
The index of the quick link of the current location, or -1.
Sourcepub fn set_quick_links_selected_index(&self, _value: i32)
pub fn set_quick_links_selected_index(&self, _value: i32)
Setting the index only notifies a change: the index follows the location.
pub fn selected_filter(&self) -> Option<Rc<ManagedFileChooserFilterViewModel>>
pub fn set_selected_filter( &self, value: Option<Rc<ManagedFileChooserFilterViewModel>>, )
pub fn enter_pressed(&self)
pub fn refresh(&self)
Navigates to a folder, or to the current directory without one.
Navigates to the directory path, or to the root of the file system
when it does not exist, and selects the file named
initial_selection_name there.
§Panics
Panics when the directory cannot be read for another reason than a
denied access (the exception Navigate lets through in the
original); see try_navigate.
navigate, reporting the failure to read the
directory. A denied access is not a failure: the directory is shown
empty, as the original catches the access exception.
pub fn go_up(&self)
pub fn cancel(&self)
Sourcepub fn can_ok(&self, _parameter: Option<BoxedValue>) -> bool
pub fn can_ok(&self, _parameter: Option<BoxedValue>) -> bool
Whether ok can complete the chooser.
pub fn ok(&self)
pub fn select_single_file(&self, item: &ManagedFileChooserItemViewModel)
Trait Implementations§
Source§impl INotifyPropertyChanged for ManagedFileChooserViewModel
impl INotifyPropertyChanged for ManagedFileChooserViewModel
Source§fn property_changed(&self) -> &Event<str>
fn property_changed(&self) -> &Event<str>
Source§fn as_notify_property_changing(&self) -> Option<&dyn INotifyPropertyChanging>
fn as_notify_property_changing(&self) -> Option<&dyn INotifyPropertyChanging>
INotifyPropertyChanging, when it also raises the event of a property
that is about to change; None by default. Read moreSource§impl MarkupTyped for ManagedFileChooserViewModel
impl MarkupTyped for ManagedFileChooserViewModel
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
Auto Trait Implementations§
impl !Freeze for ManagedFileChooserViewModel
impl !RefUnwindSafe for ManagedFileChooserViewModel
impl !Send for ManagedFileChooserViewModel
impl !Sync for ManagedFileChooserViewModel
impl !UnwindSafe for ManagedFileChooserViewModel
impl Unpin for ManagedFileChooserViewModel
impl UnsafeUnpin for ManagedFileChooserViewModel
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more