Skip to content

fontlab_glyport.ui.vanilla · declarations 001

Back to fontlab_glyport.ui.vanilla

Settings module-attribute

Settings

make_vanilla_module

make_vanilla_module(qt: Any, *, error_sink: ErrorSink, graph_factory: Callable = UIGraph, wrap: Wrap | None = None, settings: Settings | None = None, on_close: OnClose | None = None) -> ModuleType

Return a fresh vanilla module bound to qt and error_sink.

wrap (e.g. ExecutionContext.wrap) is applied to every callback call so output and imports inside callbacks follow the execution context. settings stores autosaved state (Window frames under "window:<name>"); it defaults to the process-wide in-memory _DEFAULT_SETTINGS. on_close (e.g. ExecutionContext.on_close) receives a hook that closes every window this module still has open.

test_module

test_module()

Import compatibility for Vanilla's demonstration class; never fake tests.

vanilla_provider

vanilla_provider(qt: Any, error_sink: ErrorSink, *, wrap: Wrap | None = None, settings: Settings | None = None, on_close: OnClose | None = None) -> Callable[[], ModuleType]

Zero-argument provider for an ExecutionContext vanilla adapter.

Route callbacks through the context and close its windows with it: ctx.adapters["vanilla"] = vanilla_provider(qt, sink, wrap=ctx.wrap, on_close=ctx.on_close).