Skip to main content

ravenrs_app_ui/
lib.rs

1//! The screens of a business application, generated from the model in `ravenrs-app`.
2//!
3//! ```
4//! use ravenrs_app::BusinessObject;
5//! use ravenrs_app_ui::App;
6//!
7//! #[derive(BusinessObject)]
8//! #[object(navigation = "Records")]
9//! struct Account {
10//!     #[field(key)]
11//!     id: i64,
12//!     name: String,
13//! }
14//!
15//! let window = App::new("Accounts").entity::<Account>().build()?;
16//! let mut ui = ravenrs_widgets::Ui::new(window, ravenrs_style::Theme::raven_dark());
17//! ui.update();
18//! # Ok::<(), ravenrs_app::ModelError>(())
19//! ```
20
21mod app;
22mod container;
23mod dashboard;
24mod detail_view;
25mod editors;
26mod form;
27mod jobs;
28mod list_editors;
29mod list_view;
30#[cfg(feature = "live")]
31mod live;
32#[cfg(feature = "live")]
33mod live_list;
34mod model_editor;
35mod nested;
36mod pane;
37mod reminders;
38mod security;
39mod session;
40mod shell;
41mod system;
42mod values;
43// What the generated registrations name views as.
44#[cfg(feature = "live")]
45#[allow(unused_imports)]
46use ravenrs_widgets::AnyView;
47
48pub use app::App;
49pub use container::{ActionButton, ActionContainer};
50pub use dashboard::DashboardView;
51pub use detail_view::DetailView;
52pub use editors::{EditorRegistry, EditorRequest};
53pub use form::{EntityForm, FormText};
54pub use list_editors::{
55    CALENDAR_EDITOR, CHART_EDITOR, SCHEDULER_EDITOR, TREE_EDITOR, chart_view, summary_text,
56};
57pub use list_view::{CellText, ColumnShape, GridShape, ListEditorRequest, ListSource, ListView, OpenHandler};
58pub use model_editor::ModelEditor;
59pub use pane::{EntityPane, PaneWords};
60pub use ravenrs_app_i18n::{Catalog, Language, Texts};
61pub use security::SecuredApp;
62pub use session::{CollectionSource, FormCaption, Session, Words};
63pub use shell::{AppShell, FrameTemplate, MainTemplate, TemplateParts};
64pub use system::{CloneModule, SystemModule, ids};
65
66/// Registers this crate's types with a playground's interpreter (feature `live`).
67#[cfg(feature = "live")]
68pub fn live_expose(registry: &mut ravenrs_live::Registry) {
69    live_list::expose_all(registry);
70    live::expose(registry);
71}