Skip to main content

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 find;
27pub mod find_bar;
28pub mod flow;
29pub mod flow_model;
30pub mod fonts;
31pub mod format;
32pub mod i18n;
33pub mod links;
34/// Receiving a document from macOS, which does not arrive as an argument.
35#[cfg(target_os = "macos")]
36#[allow(unsafe_code)]
37pub mod opened_document;
38pub mod settings;
39pub mod shapes;
40pub mod shell;
41pub mod system_theme;
42pub mod toolbar;
43
44pub use edit::{Caret, Editing};
45pub use find::{Found, Highlights};
46pub use flow::{Flow, Pictures};
47pub use flow_model::{Block, FlowModel, PageEditor, page_editor};
48pub use i18n::mark;
49pub use settings::Settings;
50pub use shapes::Canvas;
51pub use shell::{Product, Shell, View, run};