odox_ui/lib.rs
1//! The window the three odox applications are each a thin shell over.
2//!
3//! Everything a person sees belongs here: the chrome, the document renderer, the
4//! mapping from ODF styles to what egui draws with, the font resolution and the
5//! messages. An application crate contributes its name, the format it opens, and
6//! the one view that is particular to its body — a flow, a grid, a slide.
7//!
8//! Drawing lives here rather than in `odox-core` so that the library that reads
9//! `OpenDocument` has no window in it: it is testable headlessly, it compiles for
10//! a target with no display, and nothing about the format is decided by what egui
11//! can draw.
12//
13// Author: David M. Anderson
14// Built with AI assistance (Claude, Anthropic)
15
16// `deny` rather than `forbid`, and `opened_document` is the exception it leaves
17// room for: receiving a document from macOS needs one Objective-C method that
18// cannot be written without `unsafe`, and `forbid` cannot be lifted beneath it.
19// That module is the only `unsafe` in the workspace and it is compiled on one
20// platform. `odox-core` keeps `forbid`, and so do the three applications.
21#![deny(unsafe_code)]
22#![warn(missing_docs, clippy::pedantic)]
23#![allow(clippy::must_use_candidate)]
24
25pub mod edit;
26pub mod flow;
27pub mod flow_model;
28pub mod fonts;
29pub mod format;
30pub mod i18n;
31/// Receiving a document from macOS, which does not arrive as an argument.
32#[cfg(target_os = "macos")]
33#[allow(unsafe_code)]
34pub mod opened_document;
35pub mod settings;
36pub mod shapes;
37pub mod shell;
38pub mod system_theme;
39pub mod toolbar;
40
41pub use edit::{Caret, Editing};
42pub use flow::{Flow, Pictures};
43pub use flow_model::{FlowModel, PageEditor, page_editor};
44pub use i18n::mark;
45pub use settings::Settings;
46pub use shapes::Canvas;
47pub use shell::{Product, Shell, View, run};