Skip to main content

ferroui_controls_inking/
lib.rs

1//! ferroui-controls-inking
2//!
3//! The inking controls and services of WinUI on FerroUI: [`InkCanvas`] with its
4//! [`InkPresenter`], the stroke services ([`InkStroke`], [`InkStrokeBuilder`],
5//! [`InkStrokeContainer`], erasing and selection), the ruler and protractor stencils,
6//! custom drying through [`InkSynchronizer`], [`InkToolbar`] with its buttons and pen
7//! configuration, the portable FERROINK format and the clipboard. On Windows,
8//! `WindowsInkServices` connects a stroke container to the ink services of the system (ISF
9//! and GIF with ISF, the system ink clipboard, handwriting recognition).
10//!
11//! The toolbar's WinUI theme is part of this crate, not of the WinUI theme: an application
12//! that uses the toolbar with the WinUI theme includes its styles,
13//!
14//! ```xml
15//! <StyleInclude Source="ferres://FerroUI.Controls.Inking/Themes/WinUI.xaml" />
16//! ```
17//!
18//! The theme documents are compiled by the build of the crate (`build.rs`);
19//! [`register_types`] registers the types of the crate and the loader table of its compiled
20//! markup. See `docs/porting/winui-inking.md` for the source mappings and the limits of
21//! interoperability.
22
23// The compiled markup names the types of the crate by the name of the crate, as the markup of any
24// other crate does.
25extern crate self as ferroui_controls_inking;
26
27// `compiled_xaml` (the compiled markup of the theme documents) and `compiled_markup` (the loader
28// table of the crate and `register()`), which the build script generates.
29ferroui_markup_xaml::include_compiled_xaml!();
30
31#[cfg(any(test, feature = "document-assets"))]
32mod assets;
33mod ink_events;
34mod markup;
35mod register_types;
36mod rust_paths;
37mod windows_ink_interop;
38#[cfg(windows)]
39mod windows_ink_services;
40mod ink_platform_services;
41mod ink_clipboard;
42mod ink_point;
43mod ink_drawing_attributes;
44mod ink_stroke;
45mod ink_stroke_builder;
46mod ink_stroke_container;
47mod persistence;
48mod ink_input;
49mod ink_presenter;
50mod ink_presenter_stencil;
51mod ink_stencil_input;
52mod ink_synchronizer;
53mod ink_canvas;
54mod ink_canvas_automation_peer;
55mod color_names;
56mod ink_toolbar_types;
57mod ink_toolbar_buttons;
58mod ink_toolbar_configuration;
59mod ink_toolbar;
60mod ink_toolbar_automation_peer;
61
62pub use ink_point::{InkError, InkPoint};
63pub use ink_platform_services::*;
64pub use ink_clipboard::InkClipboard;
65pub use ink_drawing_attributes::*;
66pub use ink_stroke::InkStroke;
67pub use ink_stroke_builder::InkStrokeBuilder;
68pub use ink_stroke_container::InkStrokeContainer;
69pub use persistence::{InkPersistenceLimits, INK_MIME_TYPE};
70pub use ink_input::*;
71pub use ink_presenter::*;
72pub use ink_presenter_stencil::*;
73pub use ink_synchronizer::InkSynchronizer;
74pub use ink_canvas::InkCanvas;
75pub use ink_canvas_automation_peer::InkCanvasAutomationPeer;
76pub use ink_toolbar_types::*;
77pub use ink_toolbar_buttons::*;
78pub use ink_toolbar_configuration::*;
79pub use ink_toolbar::*;
80pub use ink_toolbar_automation_peer::*;
81pub use register_types::{register_types, ASSEMBLY};
82#[cfg(windows)]
83pub use windows_ink_services::{WindowsInkRecognitionResult, WindowsInkServices};
84
85#[cfg(test)]
86mod test_support;
87
88#[cfg(test)]
89mod theme_tests;
90
91#[cfg(test)]
92mod inking_tests;
93
94#[cfg(test)]
95mod ink_canvas_tests;
96
97#[cfg(test)]
98mod ink_parity_tests;
99
100#[cfg(test)]
101mod ink_stencil_tests;