Skip to content

fontlabapp.studios.layer_manager._shared

_shared

Pieces every Layer Manager tab shares: backends, the Undo label, one write route, the plan tab.

What: backends() returns core.scripting.layer_manager_backends() (tests replace it); Modules lets the verbatim originals keep reading their module names. label builds "Layer Manager: <action> <subject>". commit is the one write route of the tabs: tool.shell.history over explicit live layers (None when refused; the shell status says why). PlanTab is the host-mode form of the originals' panels: the tab's controls, a sortable GlyphTable dry run (a row choice shows that glyph and layer in the TGlyph preview), a status line, "Use selection" (rebinds the tab to the current font and its Font-window selection, as the originals' button and their open did) and one explicit verb button. Apply plans again from the bound font and refuses a plan that differs from the list on screen (STALE), then writes. Used by fontlabapp.studios.layer_manager.

Classes

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
APP attribute (shared captured text)
STALE attribute
append_note function (text: str, result: dict[str, Any]) -> str <code>edit&#95;guards.append&#95;note</code>: the result text and its pending note.
apply_editor function (tool: Tool, title: str, work: list[Any], editor: Any, *, allow_bases: bool=False) -> Any <code>masters.layers.writer.apply&#95;work</code><code> through </code><code>tool.shell.history</code>; None when refused.
backends function () -> Any The reused App backends (tests replace this).
commit function (tool: Tool, title: str, layers: Sequence[Any], glyphs: Sequence[Any], mutate: Callable[[], Any], *, read_bac… ONE named Undo step through <code>tool.shell.history</code>; None when refused.
hline function (layout: Any) -> Any
ident function (item: Any) -> int | None <code>int(item.id)</code> of a native object, or None for a missing one.
label function (action: str, names: Iterable[str]) -> str <code>&quot;Layer Manager: &lt;action&gt; &lt;glyph or N glyphs&gt;&quot;</code>.
refusal_text function (tool: Tool) -> str The shell status text after a refused write; PythonQt exposes <code>text</code> as a property.
result_dict function (done: Any, **values: Any) -> dict[str, Any] The originals' result dict around a <code>Committed</code>.
subject function (names: Iterable[str]) -> str Undo-label subject: the glyph name, or <code>&quot;N glyphs&quot;</code> for several.