Skip to main content

ferroui_reactiveui_controls/
lib.rs

1//! ferroui-reactiveui-controls
2//!
3//! The integration of ReactiveUI (`ferroui-reactiveui`) with FerroUI, ported from the integration
4//! of ReactiveUI with the reference UI framework, together with the matching parts of
5//! ReactiveUI.Binding and ReactiveUI.Primitives:
6//!
7//! - the scheduler of the user-interface thread, [`FerroScheduler`], which the application sets as
8//!   `RxSchedulers::main_thread_scheduler`, and [`FerroScheduler::install_on_ui_thread`], which
9//!   makes the dispatcher's synchronization context the context of the user-interface thread;
10//! - the property observation of FerroUI objects ([`FerroObjectObservableForProperty`]), the
11//!   command binding of FerroUI controls ([`FerroCreatesCommandBinding`], with
12//!   [`ReactiveCommandAdapter`], a command of ReactiveUI as a command of FerroUI) and the view
13//!   thread invoker ([`FerroViewThreadInvoker`]), which [`FerroBindingModule`] (or
14//!   [`register_binding_integration`]) registers;
15//! - the activation of the views of FerroUI ([`FerroActivationForViewFetcher`]);
16//! - the properties of FerroUI objects as signals ([`FerroObjectReactiveExtensions`]);
17//! - property paths through the properties of FerroUI objects ([`ferro_property`],
18//!   [`ferro_prop!`]) and the lookup of the FerroUI object behind an untyped object of ReactiveUI
19//!   ([`FerroObjectHandles`]);
20//! - the reactive views, the view hosts, the data-template hook, suspension and `use_reactive_ui`
21//!   on the application builder.
22
23mod ferro_activation_for_view_fetcher;
24mod ferro_binding_builder_extensions;
25mod ferro_binding_module;
26mod ferro_creates_command_binding;
27mod ferro_object_handles;
28mod ferro_object_observable_for_property;
29mod ferro_object_reactive_extensions;
30mod ferro_property_path;
31mod ferro_property_subscription;
32mod ferro_scheduler;
33mod ferro_view_thread_invoker;
34mod reactive_command_adapter;
35
36pub use ferro_activation_for_view_fetcher::FerroActivationForViewFetcher;
37pub use ferro_binding_builder_extensions::{FerroAppBuilderExtensions, FerroBindingBuilderExtensions};
38pub use ferro_binding_module::{register_binding_integration, FerroBindingModule};
39pub use ferro_creates_command_binding::{control_target, control_type, FerroCreatesCommandBinding};
40pub use ferro_object_handles::FerroObjectHandles;
41pub use ferro_object_observable_for_property::FerroObjectObservableForProperty;
42pub use ferro_object_reactive_extensions::{FerroObjectReactiveExtensions, FerroPropertySignal};
43pub use ferro_property_path::{ferro_property, ferro_property_owner, observe_ferro_property};
44pub use ferro_property_subscription::FerroPropertySubscription;
45pub use ferro_scheduler::FerroScheduler;
46pub use ferro_view_thread_invoker::FerroViewThreadInvoker;
47pub use reactive_command_adapter::{boxed_parameter, parameter_as_any, ReactiveCommandAdapter, ReactiveCommandParameter};
48
49mod app_builder_extensions;
50mod bindable_view;
51mod auto_data_template_binding_hook;
52mod auto_suspend_helper;
53mod navigation_target;
54mod reactive_user_control;
55mod reactive_user_control_base;
56mod reactive_view;
57mod reactive_window;
58mod reactive_window_base;
59mod register_types;
60mod routed_view_host;
61mod rust_paths;
62mod splat_app;
63mod startup_configuration;
64mod subscription_errors;
65mod view_control;
66mod view_host_navigation;
67mod view_model_property_sync;
68mod view_model_value;
69mod view_model_view_host;
70mod view_registrar;
71
72pub use app_builder_extensions::{AppBuilderExtensions, ReactiveUIBuilderFerroExtensions};
73pub use auto_data_template_binding_hook::AutoDataTemplateBindingHook;
74pub use bindable_view::{element_control, element_property, owned_element_property, BindableView};
75pub use auto_suspend_helper::AutoSuspendHelper;
76pub use navigation_target::NavigationTarget;
77pub use reactive_user_control::ReactiveUserControl;
78pub use reactive_user_control_base::ReactiveUserControlBase;
79pub use reactive_view::{IReactiveViewClass, ITypedReactiveViewClass, ReactiveView, ReactiveViewFor, ViewModelFilter};
80pub use reactive_window::ReactiveWindow;
81pub use reactive_window_base::ReactiveWindowBase;
82pub use register_types::{register_types, ASSEMBLY, REACTIVEUI_XML_NAMESPACE};
83pub use routed_view_host::RoutedViewHost;
84pub use splat_app::SplatApp;
85pub use startup_configuration::StartupConfiguration;
86pub use subscription_errors::SubscriptionErrors;
87pub use view_control::{register_view_control, view_control, ControlViewFor, IControlViewFor, IViewControl, ViewLink};
88pub use view_host_navigation::{ViewForValue, ViewHostNavigation};
89pub use view_model_property_sync::ViewModelPropertySync;
90pub use view_model_value::{is_view_model_of, register_view_model, same_view_model, same_view_model_object, value_of_optional_view_model, value_of_view_model, view_model_of_optional, view_model_of_value, UntypedViewModel};
91pub use view_model_view_host::ViewModelViewHost;
92pub use view_registrar::{ViewAssembly, ViewAssemblyType, ViewRegistrar};
93
94/// What the macros of the crate expand to, so that a crate that uses them needs no other
95/// dependency.
96#[doc(hidden)]
97pub mod __private {
98    pub use ferroui_base::Ref;
99    pub use ferroui_system::component_model::property_name_of;
100}
101
102#[cfg(test)]
103mod tests;