Skip to main content

ferroui_xaml_interactions_reactiveui/
lib.rs

1//! ferroui-xaml-interactions-reactiveui
2//!
3//! The ReactiveUI behaviors of FerroUI, ported from the `Xaml.Behaviors.Interactions.ReactiveUI`
4//! project of Xaml.Behaviors (see `NOTICE.md`):
5//!
6//! - actions that navigate a ReactiveUI router ([`ferroui_reactiveui::RoutingState`]): to a view
7//!   model ([`NavigateAction`]), to a view model with a reset of the stack
8//!   ([`NavigateAndReset`]), back ([`NavigateBackAction`]), and the reset of the stack alone
9//!   ([`ClearNavigationStackAction`]);
10//! - actions that navigate to a view model of a type, given as the parameter or resolved from the
11//!   service locator ([`NavigateToAction`], [`NavigateToAndResetAction`], with the type as a
12//!   [`RoutableViewModelType`]);
13//! - the trigger that executes its actions when a ReactiveUI interaction is handled
14//!   ([`InteractionTriggerBehavior`], with the interaction as an [`AnyInteraction`]).
15//!
16//! The namespace of the crate is `FerroUI.Xaml.Interactions.ReactiveUI`, mapped into the default
17//! XML namespace of the framework: documents name its types without a prefix once
18//! [`register_types`] ran.
19
20mod clear_navigation_stack_action;
21mod interaction_trigger_behavior;
22mod markup_types;
23mod navigate_action;
24mod navigate_and_reset;
25mod navigate_back_action;
26mod navigate_to_action;
27mod navigate_to_and_reset_action;
28mod register_types;
29mod rust_paths;
30mod view_model_parameter;
31
32pub use crate::clear_navigation_stack_action::ClearNavigationStackAction;
33pub use crate::interaction_trigger_behavior::{AnyInteraction, InteractionTriggerBehavior};
34pub use crate::navigate_action::NavigateAction;
35pub use crate::navigate_and_reset::NavigateAndReset;
36pub use crate::navigate_back_action::NavigateBackAction;
37pub use crate::navigate_to_action::{
38    NavigateToAction, NavigateToActionImpl, NavigateToActionImplExt, NavigateToActionVTable, RoutableViewModelType,
39};
40pub use crate::navigate_to_and_reset_action::{
41    NavigateToAndResetAction, NavigateToAndResetActionImpl, NavigateToAndResetActionImplExt,
42    NavigateToAndResetActionVTable,
43};
44pub use crate::register_types::{register_types, ASSEMBLY};
45
46#[cfg(test)]
47mod tests;