ferroui_dialogs/lib.rs
1//! ferroui-dialogs
2//!
3//! The managed dialogs: the managed file chooser ([`ManagedFileChooser`]
4//! over a [`ManagedFileChooserViewModel`](internal::ManagedFileChooserViewModel)),
5//! the storage provider that shows it ([`ManagedStorageProvider`]), the
6//! application builder extension that makes it the file picker of every top
7//! level ([`ManagedFileDialogExtensions::use_managed_system_dialogs`]) and
8//! the about dialog of the framework ([`AboutFerroDialog`]).
9//!
10//! The control themes of the file chooser are part of the themes
11//! (`Controls/ManagedFileChooser.xaml` of the Fluent and the Simple theme).
12//! The document of the about dialog is compiled by the build of the crate
13//! (`build.rs`: the compiled markup populates the dialog, and the loader
14//! table of the crate answers a load of the document by its URI); its font
15//! is embedded in the crate as an asset of the assembly `FerroUI.Dialogs`.
16//!
17//! ```ignore
18//! AppBuilder::configure::<App>().use_platform_detect().use_managed_system_dialogs()
19//! ```
20
21mod about_ferro_dialog_xaml;
22// `compiled_about_ferro_dialog` (the compiled markup of the document of [`AboutFerroDialog`])
23// and `compiled_markup` (the embedded assets, the loader table of the crate and `register()`),
24// which the build script of the crate generates (docs/porting/xaml.md, 9.5.13 and 9.6).
25ferroui_markup_xaml::include_compiled_xaml!();
26pub mod internal;
27mod managed_file_chooser;
28mod managed_file_chooser_overwrite_prompt;
29// The storage provider works on the local file system, which the browser does not have (as
30// the file-system storage of the base library).
31#[cfg(not(target_arch = "wasm32"))]
32mod managed_file_dialog_extensions;
33mod managed_file_dialog_options;
34#[cfg(not(target_arch = "wasm32"))]
35mod managed_storage_provider;
36mod register_types;
37mod rust_paths;
38#[cfg(not(target_arch = "wasm32"))]
39mod task_completion_source;
40
41pub use about_ferro_dialog_xaml::AboutFerroDialog;
42pub use managed_file_chooser::ManagedFileChooser;
43pub use managed_file_chooser_overwrite_prompt::ManagedFileChooserOverwritePrompt;
44#[cfg(not(target_arch = "wasm32"))]
45pub use managed_file_dialog_extensions::ManagedFileDialogExtensions;
46pub use managed_file_dialog_options::ManagedFileDialogOptions;
47#[cfg(not(target_arch = "wasm32"))]
48pub use managed_storage_provider::ManagedStorageProvider;
49pub use register_types::{register_types, ASSEMBLY};
50
51#[cfg(test)]
52mod tests;