Skip to content

fontlab_glyport.foundation

foundation

Foundation/AppKit values that Glyphs scripts import, without PyObjC.

Qt-free: geometry functions, collection classes, constants, and NSUserDefaults over glyport's Glyphs.defaults store (Glyphs keeps its defaults in the same NSUserDefaults domain, so Glyphs.defaults[k] and NSUserDefaults.standardUserDefaults().boolForKey_(k) agree). Qt-backed names (NSPasteboard, NSTimer, NSScreen) are built by qt_names(qt, on_close). Referenced by glyphsapp/fontlab_session.py (_cocoa_names).

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
COLLECTIONS attribute
CONSTANTS attribute
DEFERRED attribute
GEOMETRY attribute
NSContainsRect function (outer, inner) -> bool Cocoa: a non-empty <code>inner</code><code> that does not extend beyond </code><code>outer</code>.
NSHeight function (rect) -> float
NSInsetRect function (rect, dx, dy)
NSMaxX function (rect) -> float
NSMaxY function (rect) -> float
NSMidX function (rect) -> float
NSMidY function (rect) -> float
NSMinX function (rect) -> float
NSMinY function (rect) -> float
NSOffsetRect function (rect, dx, dy)
NSPointInRect function (point, rect) -> bool Cocoa's half-open test, as <code>NSMouseInRect(point, rect, flipped=YES)</code>: the max edges are outside.
NSUnionRect function (a, b) The smallest rect containing both (an empty rect is ignored).
NSWidth function (rect) -> float
STRUCT_NAMES attribute
class_from_string function (classes: dict[str, type]) -> Callable[[str], type | None] <code>NSClassFromString</code>: a class glyport provides, else None (as Cocoa returns nil for a class that is not loaded).
deferred_class function (module: str, name: str) -> type A class a script imports at module level but glyport does not provide: the import resolves, and the first member use raises UnsupportedCapability naming <code>module.name.member</code>.
qt_names function (qt: Any, on_close: Callable[[Callable[[], object]], object]) -> dict <code>NSPasteboard</code><code> (the application clipboard, plain text only) and </code><code>NSTimer</code> (QTimer; every timer is stopped and disconnected on close).
user_defaults_class function (store: MutableMapping[str, Any]) -> type <code>NSUserDefaults</code><code> whose standard instance reads and writes </code><code>store</code>.