fontlab_glyport.ui.nib_graph
nib_graph
XIB sources and compiled NIBs as one UIGraph (R028, R031).
Both readers emit the same node schema, so a NIB with no XIB source and the XIB it came from produce equal graphs (the tests compare them):
source_classis the AppKit class (NSTextField); a custom class is inproperties["customClass"](GSSteppingTextField,GSPaletteView).- Placeholders are
NSCustomObjectnodes withproperties["role"]:owner(File's Owner, withclassName),firstResponderorapplication; other custom objects have roleobject. - Views carry
frame[x, y, w, h]in Cocoa's bottom-left coordinates,autoresizingMask(Interface Builder's default 12, top-left pinned) andhidden. Controls add the keys their class uses:title,editable,bezeled,buttonType,state,minValue,maxValue,value,items,selectedIndex,continuous,enabled,toolTip. - Connections:
outlet(owner node -> destination, selector = property; an outlet to a control's cell points at the control),action(control -> target, selector = action),binding(control -> controller, selector = binding name, argument = key path),constraint(first item -> second item, or the first item again for a constant; selector"<attribute> <relation> <attribute>", argument"<multiplier> <constant> <priority>"). - A tab view's items are its child
NSViewpages withtabLabelandtabIdentifier; text fields with a number formatter carryformatter{"minimum", "maximum"}, and a standalone formatter is anNSNumberFormatternode with the limits it sets; progress indicators carryminValue,maxValue,valueandindeterminate. - A matrix carries
rows,columns,mode,cellSize,intercellSpacingandcells: row-major button cells, each withtitle,buttonType,state,tagandenabled. - A box carries
boxType,titlePosition,borderType,transparentandtitle(""when no title is shown); its only child is its content view, markedcontentView. - A scroll view carries
hasVerticalScroller,hasHorizontalScroller,autohidesScrollersand a customclipViewClass; its only child is its clip view's document view, markeddocumentView(the clip view and scrollers are not nodes). - An array controller is an
NSArrayControllernode; each table column is also anNSTableColumnchild node (index) so bindings can name it. - A table view carries
columns(identifier,title,width,minWidth,maxWidth,editable),headerVisible,allowsMultipleSelection,rowHeightandprototypes: for a view-based table, each prototype cell view as its own graph JSON keyed by identifier (File's Owner = themakeViewWithIdentifier_owner_owner). - Buttons also carry
borderedand, with a named image,imageandimagePosition; a switch carriesstate. - A text view carries
string(plain text),editableandselectable. - A split view carries
verticalanddividerStyle(its subviews are the panes); a grid view carriesrows,columns,rowSpacingandcolumnSpacing(its cells' content views are its children); a visual effect view is a plain container. - A segmented control carries
segments(label,width,selected,tag,image) andtrackingMode; a search field addsplaceholderandsendsSearchStringImmediatelyto the text field properties. - A combo box carries
title(its text),editable,items,completes,numberOfVisibleItemsandusesDataSource. - A path control carries
url(a URL string),editableandallowedTypes. - An image view carries
image(a resource name) andimageScaling. - A stack view carries
orientation(0 horizontal, 1 vertical),alignment(an NSLayoutAttribute),distribution,spacing,edgeInsets[top, left, bottom, right]anddetachesHiddenViews; its children (the arranged views) carryarranged. - A window (
NSWindoworNSPanel; a custom subclass incustomClass) carriestitle,styleMaskandcontentRect(screen coordinates, bottom-left); its content view is its only child, markedcontentView.
Nodes keep document order (XIB) or archive order of NSSubviews (NIB).
Elements the readers do not translate still become nodes (class
xib:<element> or the archived class); the loader decides what is blocked.
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 |
|---|---|---|---|
DEFAULT_MASK |
attribute | ||
MAX_DEPTH |
attribute | ||
MAX_NODES |
attribute | ||
MAX_XML_DEPTH |
attribute | ||
MAX_XML_ELEMENTS |
attribute | ||
graph_from_nib |
function | (path: str | Path) -> UIGraph |
Translate a compiled NIB (file or bundle directory) into a <code>UIGraph</code>. |
graph_from_xib |
function | (path: str | Path) -> UIGraph |
Translate an Interface Builder XIB document into a <code>UIGraph</code>. |
untranslated_xib |
function | (path: str | Path) -> dict[str, int] |
Elements of a XIB that <code>graph_from_xib</code> does not translate, with counts (fonts, colours, cell behaviours, ...): the unmapped-property report. |