Namespace DocWright.Layout
Classes
- DocumentStatistics
The counts Word shows in Review > Word Count and the status bar, by Word's rules (WQ-0107): words, characters with and without spaces, East Asian characters, paragraphs, and from a layout lines and pages.
- DropCapMeasurer
Phase 171 (WQ-0151): Word's numbers for a drop cap, measured from the faces the engine draws with, for SetDropCap(WordDocument, DocumentPosition, Paragraph, DropCapSettings, DropCapGeometry).
- FontPreflight
Surveys the distinct font families a resolved document references and runs them through a FontEngine's resolver, producing a FontPreflightReport. A caller can run this before paying for a full conversion to decide whether to install a font, accept the substitution, or abort. This mirrors the external preflight utility that commercial converters ship as a separate tool, here as a first-class API.
- LayoutEngine
Lays out a resolved document into renderer-agnostic page primitives.
- LayoutPositions
Where a layout put the document's positions: the page a position of the body was laid out on, from the text sources the glyph runs carry (EmitSourceReferences and EmitSourceReferences). What an index gives its entries as page numbers (PageNumberAt).
- LayoutSession
A layout that is kept, so laying a document out again after an edit costs the edit rather than the document.
- LayoutSessionOptions
What a LayoutSession lays out with: the options ResolveOptions and LayoutEngine take for a one-shot layout.
- LayoutUpdate
The result of Relayout(WordDocument, IReadOnlyCollection<long>?, IConversionDiagnostics?).
- ParagraphFormatting
The formatting in effect in one paragraph of a span.
- ResolveOptions
Options for one resolution pass.
- ResolvedBlock
The base class of resolved block content.
- ResolvedCharacterProperties
The fully-resolved formatting of a run: every value concrete, no style references, theme fonts and colors resolved, toggle XOR applied. Instances are immutable and shared across runs with identical formatting (the resolver memoizes them).
- ResolvedColumns
The resolved column layout of a section.
- ResolvedDocument
The immutable, fully-resolved projection of a document produced by StyleResolver: no style references, all lengths in twips, tracked changes collapsed. This — never the mutable DOM — is what layout consumes.
- ResolvedDocumentDumper
Renders a ResolvedDocument as a deterministic, culture-independent text dump (LF line endings). Used by the approval-based snapshot tests — the values here are what Word's Reveal Formatting pane shows after resolution — and for debugging fidelity issues.
- ResolvedDocumentSettings
Document-level resolved settings that layout consumes.
- ResolvedHeaderFooter
Resolved header or footer content.
- ResolvedImage
A resolved image: display size and anchoring in twips plus a data opener that streams the bytes from the source package on demand.
- ResolvedMath
A resolved equation (Phase 165): the model, the formatting of the paragraph text it stands in, each math run's own resolved formatting, and the document's equation settings.
- ResolvedNote
A resolved footnote or endnote body.
- ResolvedNumbering
The numbering resolved for one paragraph: the effective level definition with overrides applied. The counters themselves - the actual numbers - are not here: the layout engine runs them, because a counter's value depends on the paragraphs before it.
- ResolvedPageBorders
A section's page borders, resolved (ECMA-376 Part 1 §17.6.10
w:pgBorders): the four edges, what their spaces are measured from, the pages they show on and whether they are drawn over the content. The geometry is layout's (WQ-0102).
- ResolvedParagraph
A resolved paragraph: concrete properties, optional numbering, and resolved inlines with revisions collapsed and field code stripped (cached results kept).
- ResolvedParagraphProperties
The fully-resolved formatting of a paragraph: concrete twips everywhere, tab clears applied, logical alignments mapped to physical.
- ResolvedSection
A resolved section: concrete page geometry and the headers/footers that apply after section-to-section inheritance (§17.10.5).
- ResolvedShape
A resolved shape or shape group: the same anchor geometry a ResolvedImage carries, plus the flattened parts to paint in order.
- ResolvedShapePart
One paintable piece of a resolved shape tree. Groups, nested groups, child-space mapping, flips and rotation have all been flattened away by the resolver, so Segments are plain shape-local twips that layout only has to translate by the anchor origin.
- ResolvedTable
A resolved table with conditional table-style formatting already applied to every row, cell and their content.
- ResolvedTableCell
A resolved table cell with conditional formatting layered in.
- ResolvedTableProperties
Resolved table-level properties.
- ResolvedTableRow
A resolved table row.
- ResolvedTextBox
The content of a positioned text box: its text and page numbers, and the distances from the box's edges to the text.
- ScreenView
A screen view of a document: its text as one continuous flow instead of its pages (View, View).
- SpanFormatting
The formatting in effect over a span (ResolveSpanFormatting(WordDocument, DocumentSpan, ResolveOptions?)): for each paragraph it touches, the resolved paragraph properties and the resolved character properties of the content it covers, as a full Resolve(WordDocument, ResolveOptions?) would give them. A toolbar reads "bold everywhere" or "mixed" from it without re-implementing inheritance.
- StyleFormatting
What a style gives, resolved: see ResolveStyleFormatting(WordDocument, string, ResolveOptions?).
- StyleResolver
Projects the mutable DOM into an immutable ResolvedDocument — the one bridge between editing and layout, and it is one-way. Resolution order follows ECMA-376 §17.7.2: document defaults, table style layers (with §17.7.6 conditional formatting per w:tblLook), paragraph style chain, numbering level properties, character style chain, then direct formatting; toggle properties get §17.7.3 XOR semantics. Theme fonts and colors resolve to concrete values; tracked changes are collapsed per RevisionView.
- ThemeColorTransforms
The color transforms WordprocessingML and DrawingML apply to theme colors. Word does NOT scale sRGB channels directly: w:themeTint and w:themeShade modulate luminance in HSL space with the result truncated per channel — verified against Word-written values (accent1 4472C4 with themeTint 99 yields 8EAADB, with themeShade BF yields 2F5496; see WORDQUIRKS.md).
Structs
- ColumnSpecResolved
One explicit resolved column.
- ResolvedBorder
A fully-resolved border edge: concrete style token, width, spacing and color. IsVisible is false when no border applies.
- ResolvedInline
One resolved inline: a kind, the text (for text runs), the shared resolved run properties, and kind-specific payload.
- ResolvedShading
Fully-resolved shading: concrete pattern token and colors.
- ResolvedTabStop
A resolved tab stop: explicit stops only, sorted by position, clears already applied.
Enums
- ResolvedInlineKind
What a resolved inline is.
- ScreenViewKind
Which of Word's screen views a document is laid out for.