fontlab_glyport.plugins.base
base
The seven Glyphs SDK plugin base classes over a plugin host (R025).
They follow GlyphsSDK ObjectWrapper/GlyphsApp/plugins.py: the same
defaults in init/loadPlugin, then the optional script hooks
settings() and start(); titles from menuName/name; filters
call filter(layer, inEditView, customParameters); reporters call
foreground/background/inactiveLayerForeground/
inactiveLayerBackground with getScale() set from the paint context.
Where the SDK relies on Glyphs' native superclasses, the host does the work:
FilterWithDialog.process_ restores each layer from its host snapshot
before filtering (Glyphs copies shadowLayers), and loadNib decodes the
bundle's NIB/XIB into Qt-backed Cocoa views with this plugin as File's Owner.
Exceptions in protocol methods go to the environment's error sink, as the SDK
sends them to LogError.
make_plugins_module(env) returns the GlyphsApp.plugins module with
classes bound to env.
Classes
PluginEnv_PluginGeneralPlugin_FilterFilterWithoutDialogFilterWithDialogPalettePluginReporterPluginSelectToolFileFormatPlugin
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 |
|---|---|---|---|
ErrorSink |
attribute | (shared captured text) | |
PLUGIN_CLASSES |
attribute | ||
SDK_REEXPORTS |
attribute | ||
make_plugins_module |
function | (env: PluginEnv, extras: Mapping[str, Any] | None=None) -> ModuleType |
<code>GlyphsApp.plugins</code><code>: the seven classes bound to </code><code>env</code><code>, SDK helpers and the SDK's re-exported Cocoa/GlyphsApp names that glyport provides (</code><code>extras</code>). |
pathForResource |
function | (resourceName, extension, path=None) |
SDK helper: the bundle resource's path, or None when it does not exist. |
plugin_image |
function | (qt: Any, plugin: Any, image: Any) -> Any |
An SDK icon (<code>self.icon</code><code>): an </code><code>NSImage</code><code> as is, or a resource name resolved in the plugin's bundle (</code><code>"ExportIcon"</code><code> -> </code><code>ExportIcon.tiff</code>). |
plugin_resources |
function | (plugin: Any) -> Path | None |
The bundle Resources folder of the file defining <code>plugin</code>'s class. |
setUpMenuHelper |
function | (menu, items, defaultTarget) -> None |
SDK helper: add <code>{"name", "action", "target", "state", "index"}</code> entries. |