Skip to main content

ferroui_xaml_interactions/
lib.rs

1//! ferroui-xaml-interactions
2//!
3//! The classic triggers and actions of the behaviors of FerroUI, ported from the
4//! `Xaml.Behaviors.Interactions` project of Xaml.Behaviors (see `NOTICE.md`):
5//!
6//! - triggers on events ([`EventTriggerBehavior`]), on bound data ([`DataTriggerBehavior`],
7//!   [`MultiDataTriggerBehavior`]), on timers ([`TimerTrigger`]), on tasks
8//!   ([`TaskCompletedTrigger`]) and on observables ([`ObservableStreamBehavior`]);
9//! - actions that change a property ([`ChangePropertyAction`], reversible), call a method
10//!   ([`CallMethodAction`]) or invoke a command ([`InvokeCommandAction`]), and the action
11//!   containers that delay, debounce, throttle or group their actions;
12//! - the clipboard actions and the storage pickers (actions and behaviors of buttons and menu
13//!   items) of the services of the top level;
14//! - behind the features `file-system` and `network`, the actions and the triggers of the local
15//!   file system and of the network.
16//!
17//! The namespaces of the crate are `FerroUI.Xaml.Interactions.Core` (with the clipboard and the
18//! storage pickers), `FerroUI.Xaml.Interactions.FileSystem` and
19//! `FerroUI.Xaml.Interactions.Network`, mapped into the default XML namespace of the framework:
20//! documents name its types without a prefix once [`register_types`] ran.
21
22mod action_task;
23#[cfg(any(feature = "file-system", feature = "network"))]
24mod background;
25mod clipboard;
26mod core;
27#[cfg(feature = "file-system")]
28pub mod file_system;
29mod markup_types;
30#[cfg(feature = "network")]
31pub mod network;
32mod platform_handles;
33mod register_types;
34mod rust_paths;
35mod storage_provider;
36
37pub use crate::action_task::{delay, ActionTask, Delay, TaskHandle};
38pub use crate::clipboard::{
39    ClearClipboardAction, GetClipboardDataAction, GetClipboardFormatsAction, GetClipboardTextAction,
40    SetClipboardDataObjectAction, SetClipboardTextAction,
41};
42pub use crate::core::{
43    AsyncActionGroup, AsyncActionMode, CallMethodAction, ChangePropertyAction, DataTrigger, DataTriggerBehavior,
44    DebounceAction, DelayAction, EventTrigger, EventTriggerBehavior, InvokeCommandAction, MultiDataTrigger,
45    MultiDataTriggerBehavior, ObservableStreamBehavior, ReversibleActionExecution, TaskCompletedTrigger,
46    ThrottleAction, TimerTrigger,
47};
48pub use crate::platform_handles::{
49    AsyncDataTransferRef, ClipboardRef, StorageFileRef, StorageFolderRef, StorageItemRef, StorageProviderRef,
50};
51pub use crate::register_types::{register_types, ASSEMBLY};
52pub use crate::storage_provider::{
53    ButtonOpenFilePickerBehavior, ButtonOpenFolderPickerBehavior, ButtonSaveFilePickerBehavior, FilePickerEventArgs,
54    FolderPickerEventArgs, MenuItemOpenFilePickerBehavior, MenuItemOpenFolderPickerBehavior,
55    MenuItemSaveFilePickerBehavior, OpenFilePickerAction, OpenFilePickerActionImpl, OpenFilePickerActionImplExt,
56    OpenFilePickerActionVTable, OpenFilePickerBehaviorBase, OpenFilePickerBehaviorBaseImpl,
57    OpenFilePickerBehaviorBaseImplExt, OpenFilePickerBehaviorBaseVTable, OpenFolderPickerAction,
58    OpenFolderPickerActionImpl, OpenFolderPickerActionImplExt, OpenFolderPickerActionVTable,
59    OpenFolderPickerBehaviorBase, OpenFolderPickerBehaviorBaseImpl, OpenFolderPickerBehaviorBaseImplExt,
60    OpenFolderPickerBehaviorBaseVTable, PickerActionBase, PickerBehaviorBase, SaveFilePickerAction,
61    SaveFilePickerActionImpl, SaveFilePickerActionImplExt, SaveFilePickerActionVTable, SaveFilePickerBehaviorBase,
62    SaveFilePickerBehaviorBaseImpl, SaveFilePickerBehaviorBaseImplExt, SaveFilePickerBehaviorBaseVTable,
63    SaveFilePickerEventArgs, StorageFileToReadStreamConverter, StorageFileToWriteStreamConverter,
64    StorageItemToPathConverter,
65};
66
67#[cfg(test)]
68mod tests;