Expand description
ferroui-controls-inking
The inking controls and services of WinUI on FerroUI: InkCanvas with its
InkPresenter, the stroke services (InkStroke, InkStrokeBuilder,
InkStrokeContainer, erasing and selection), the ruler and protractor stencils,
custom drying through InkSynchronizer, InkToolbar with its buttons and pen
configuration, the portable FERROINK format and the clipboard. On Windows,
WindowsInkServices connects a stroke container to the ink services of the system (ISF
and GIF with ISF, the system ink clipboard, handwriting recognition).
The toolbar’s WinUI theme is part of this crate, not of the WinUI theme: an application that uses the toolbar with the WinUI theme includes its styles,
<StyleInclude Source="ferres://FerroUI.Controls.Inking/Themes/WinUI.xaml" />The theme documents are compiled by the build of the crate (build.rs);
register_types registers the types of the crate and the loader table of its compiled
markup. See docs/porting/winui-inking.md for the source mappings and the limits of
interoperability.
Structs§
- Core
Input Device Types - Devices admitted to the inking pipeline. Pen is the default.
- InkCanvas
- A pressure-sensitive ink surface that renders entirely through FerroUI.
- InkCanvas
Automation Peer - Pane peer using FerroUI transforms and ancestor clips, independent of ink content.
- InkClipboard
- Shares portable ink between FerroUI applications on any clipboard backend.
Use the clipboard of the owning
TopLevel; no global clipboard is assumed. Native Windows Ink clipboard interoperability is supplied separately byIInkPlatformServices, because its representation and API are different. - InkDrawing
Attributes - A value snapshot. Changing presenter defaults never mutates completed ink.
sizedescribes the nib at full pressure, in device-independent pixels. - InkInput
Configuration - InkInput
Processing Configuration - InkPersistence
Limits - Codec resource limits apply before allocation and cumulatively across records. The defaults permit a 64 MiB payload, 100,000 strokes, 65,536 samples per stroke and 1,000,000 samples in total.
- InkPoint
- An immutable device sample. Positions are in device-independent pixels, pressure is normalized to 0..=1, angles are degrees and timestamps are monotonically increasing microseconds supplied by the input adapter.
- InkPointer
Event Args - Device-independent input; coordinates are in the canvas’s local DIPs.
handledis shared through synchronous callback delivery. - InkPresenter
- UI-thread ink coordinator. Services and input callbacks are stable, synchronous FerroUI objects; geometry and persistence are portable Rust implementations.
- InkPresenter
Protractor - A movable circular guide with a measured arc readout. The transform uses
the bounding circle’s top-left corner; its local center is
(radius,radius). - InkPresenter
Ruler - A movable straightedge. Its transform uses the local top-left corner.
- InkStroke
- One editable stroke identity with immutable raw device samples. Attributes are copied on construction. Geometry is cached until attributes or the point transform change; selection does not invalidate tessellation.
- InkStroke
Builder - Stateful builder with separate Begin/Append/End and snapshot APIs. End consumes the pending input only after a stroke has been validated.
- InkStroke
Container - UI-thread-affine stroke collection with stable identities and notifying mutation. No collection borrow is held while user callbacks are invoked.
- InkStroke
Input - Stable presenter-owned input event service, with a weak back-pointer.
- InkStrokes
Collected Event Args - InkStrokes
Erased Event Args - InkSynchronizer
- Transactional handoff from presenter-owned wet ink to application-owned dry ink.
- InkToolbar
- A functional inking toolbar using FerroUI’s panel layout, control templates and input routing.
- InkToolbar
Automation Peer - InkToolbar
Ballpoint PenButton - InkToolbar
Custom Pen - Custom pen construction uses a real virtual dispatch, so subclasses can define the nib.
- InkToolbar
Custom PenButton - InkToolbar
Custom PenV Table - The virtual table of the class.
- InkToolbar
Custom Toggle Button - InkToolbar
Custom Tool Button - InkToolbar
Eraser Button - InkToolbar
Flyout Item - InkToolbar
Flyout Item Automation Peer - InkToolbar
Highlighter Button - InkToolbar
IsStencil Button Checked Changed Event Args - InkToolbar
Menu Button - InkToolbar
Menu Button Automation Peer - InkToolbar
PenButton - Base pen tool. Palettes are observable handles owned independently by each pen.
- InkToolbar
PenButtonV Table - The virtual table of the class.
- InkToolbar
PenConfiguration Control - InkToolbar
Pencil Button - InkToolbar
Ruler Button - InkToolbar
Stencil Button - InkToolbar
Stroke Width Slider - InkToolbar
Stroke Width Slider Automation Peer - InkToolbar
Toggle Button - InkToolbar
Tool Button - A mutually exclusive toolbar tool; inherits keyboard and selection automation from RadioButton.
- InkToolbar
Tool Button Automation Peer - InkUnprocessed
Input
Enums§
- InkDrawing
Attributes Kind - InkError
- Validation and persistence failures in the portable ink engine.
- InkHigh
Contrast Adjustment - InkInput
Processing Mode - InkInput
Right Drag Action - InkPersistence
Format - Persisted representation. The portable format preserves FerroUI telemetry; the other two formats use a platform service with genuine ISF support.
- InkPointer
Phase - InkPresenter
Predefined Configuration - InkPresenter
Stencil Kind - InkToolbar
Button Flyout Placement - InkToolbar
Flyout Item Kind - InkToolbar
Initial Controls - InkToolbar
Menu Kind - InkToolbar
Stencil Kind - InkToolbar
Toggle - InkToolbar
Tool - PenTip
Shape
Constants§
Statics§
- ASSEMBLY
- What this crate states about itself for markup: its assembly name and the namespace the XML namespace of the framework maps to.
Traits§
- IInk
Platform Services - Optional OS interoperability. The native Windows implementation uses the Windows ink engine for ISF, embedded ISF/GIF and the system ink clipboard. Core drawing, collection editing and portable persistence require no service.
- IInk
Presenter Stencil - Shared programmatic contract of the two canvas stencil services.
- InkToolbar
Custom PenImpl - The overridable members introduced by the class.
- InkToolbar
Custom PenImpl Ext - Access to the base implementations of the overridable members.
- InkToolbar
PenButton Impl - The overridable members introduced by the class.
- InkToolbar
PenButton Impl Ext - Access to the base implementations of the overridable members.
Functions§
- register_
types - Registers the namespaces, the types, the assembly, the markup metadata and the compiled markup
of this crate (and of the crates it is built on), and with the feature
document-assetsthe theme documents as assets. Cheap and idempotent.