MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / PiuApplicationDoMenu

Function PiuApplicationDoMenu

modules/piu/All/piuApplication.c:580–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578}
579
580void PiuApplicationDoMenu(PiuApplication* self, xsIntegerValue id)
581{
582 xsMachine* the = (*self)->the;
583 PiuApplicationFindMenu(self, id);
584 if (xsTest(xsVar(2))) {
585 xsIdentifier doID = (xsIdentifier)xsToInteger(xsGet(xsVar(2), xsID_doID));
586 PiuContent* content = (*self)->focus;
587 while (content) {
588 if ((*content)->behavior) {
589 xsVar(0) = xsReference((*content)->behavior);
590 if (xsFindResult(xsVar(0), doID)) {
591 xsIntegerValue value;
592 xsVar(1) = xsReference((*content)->reference);
593 if (xsFindInteger(xsVar(2), xsID_value, &value))
594 xsVar(2) = xsInteger(value);
595 else
596 xsVar(2) = xsUndefined;
597 (void)xsCallFunction2(xsResult, xsVar(0), xsVar(1), xsVar(2));
598 PiuApplicationAdjust(self);
599 break;
600 }
601 }
602 content = (PiuContent*)(*content)->container;
603 }
604 }
605}
606
607void PiuApplicationFindMenu(PiuApplication* self, xsIntegerValue id)
608{

Callers 1

PiuWindowProcFunction · 0.85

Calls 2

PiuApplicationFindMenuFunction · 0.85
PiuApplicationAdjustFunction · 0.85

Tested by

no test coverage detected