Skip to content

UXRscInstance

A UXRscInstance is what UXRsc.load returns. From 0.7.

#import "UXRsc.xc"
UXRscInstance* ni = UXRsc.load(bytes, len, FORM_TRANSPORT, (UXDesignable*)self, window.contentView);
UXButton* play = (UXButton* ?)ni.viewForLogical(PLAY);

Outlets are the usual way to reach a loaded control. The instance is for code that needs more: a test asserting what loaded, or a tool listing a form’s views.

field
rootthe form’s root view, the size of its root box
viewTreethe view tree the form lives in when it was loaded with no container; null otherwise
treethe layout that loaded
formIdthe form
klass, orientthe theme the layout was drawn for: UX_FORM_* and UX_ORIENT_*
boundconnections made
skippedconnections in scope that did not bind, usually because the layout leaves out one end
outOfScopeconnections scoped to other themes

klass can differ from the device’s form factor: a tablet loading a form that has only a desktop layout reports the desktop.

viewFor · viewForLogical · topObjectCount · topObjectAt · topObject

UXView* viewFor(UXRscObject* o)

The view built for an object of the loaded layout, or null.

UXView* viewForLogical(i32 logicalId)

The view for a control by logical id, or null when this layout leaves it out. The same id names the control in every layout.

i32 topObjectCount(void)

How many top-level objects the load made.

Object* topObjectAt(i32 i)

A top-level object by position.

Object* topObject(i32 id)

A top-level object by the id the document gives it, or null.