Skip to main content

Crate odox_ui

Crate odox_ui 

Source
Expand description

The window the three odox applications are each a thin shell over.

Everything a person sees belongs here: the chrome, the document renderer, the mapping from ODF styles to what egui draws with, the font resolution and the messages. An application crate contributes its name, the format it opens, and the one view that is particular to its body — a flow, a grid, a slide.

Drawing lives here rather than in odox-core so that the library that reads OpenDocument has no window in it: it is testable headlessly, it compiles for a target with no display, and nothing about the format is decided by what egui can draw.

Re-exports§

pub use edit::Caret;
pub use edit::Editing;
pub use find::Found;
pub use find::Highlights;
pub use find::Replaced;
pub use flow::Flow;
pub use flow::Pictures;
pub use flow_model::Block;
pub use flow_model::FlowModel;
pub use flow_model::PageEditor;
pub use flow_model::page_editor;
pub use i18n::mark;
pub use settings::Settings;
pub use shapes::Canvas;
pub use shell::Notice;
pub use shell::Product;
pub use shell::Shell;
pub use shell::View;
pub use shell::replace_file;
pub use shell::run;

Modules§

edit
What the shell keeps about a document being edited: whether editing is on, what has changed since the file was read, and how to take it back.
find
Searching a document’s text: where the matches are, which one is current, and what a flow needs to draw them.
find_bar
The bar a search is typed into, under the menu: the query, how many matches there are, and the way from one to the next. It holds what a person typed and nothing of the document; the shell asks the view what was found.
flow
Drawing an ODF body: the block renderer all three applications share.
flow_model
The paragraphs under a flow’s root, as the page editor sees them.
fonts
Handing egui the faces a document’s font families resolve to on this machine; which face that is, is odox-fonts’ answer.
format
Turning resolved ODF properties into what egui draws text with.
i18n
The messages the window draws, in the language the desktop asks for.
links
Following a hyperlink in a document.
settings
The one preference the suite keeps, and the file it keeps it in.
shapes
Drawing ODF’s shapes: what a slide is made of, and what a text document or a spreadsheet can carry in a frame.
shell
The window around a document: opening one, saving it, saying what went wrong, and the menu and keys that are the same in all three applications.
system_theme
What the desktop says about light and dark, where the window toolkit will not.
toolbar
The row of buttons over a page being edited. DESIGN.md §11.