Beispiel #1
0
ILayout *CreatePagesLayout(ParsedMui *parsedMui, TxtNode *structDef)
{
    CrashIf(!structDef->IsStructWithName("PagesLayout"));
    PagesLayoutDef *def = DeserializePagesLayoutDef(structDef);
    CrashIf(!def->page1 || !def->page2);
    PageControl *page1 = static_cast<PageControl*>(FindControlNamed(*parsedMui, def->page1));
    PageControl *page2 = static_cast<PageControl*>(FindControlNamed(*parsedMui, def->page2));
    CrashIf(!page1 || !page2);
    PagesLayout *layout = new PagesLayout(page1, page2, def->spaceDx);
    if (def->name)
        layout->SetName(def->name);
    FreePagesLayoutDef(def);
    return layout;
}
Beispiel #2
0
ILayout *FindElementNamed(ParsedMui& muiInfo, const char *name)
{
    Control *c = FindControlNamed(muiInfo, name);
    if (c)
        return c;
    return FindLayoutNamed(muiInfo, name);
}