MCPcopy Create free account
hub / github.com/SOUI2/soui / getView

Method getView

demo/CAdapter.h:451–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449 ~CTreeViewAdapter() {}
450
451 virtual void getView(SOUI::HTREEITEM loc, SWindow * pItem, pugi::xml_node xmlTemplate) {
452 if (pItem->GetChildrenCount() == 0)
453 {
454 pItem->InitFromXml(xmlTemplate);
455 }
456 ItemInfo & ii = m_tree.GetItemRef((HSTREEITEM)loc);
457 SWindow * pWnd = pItem->FindChildByID(R.id.btn_test);
458 SASSERT(pWnd);
459 pWnd->SetWindowText(S_CW2T(ii.data.strName));
460 SWindow *pTxtRed = pItem->FindChildByID(R.id.txt_red);
461 SASSERT(pTxtRed);
462 pTxtRed->SetWindowText(ii.data.strTstLong);
463
464 SToggle *pSwitch = pItem->FindChildByID2<SToggle>(R.id.tgl_switch);
465 SASSERT(pSwitch);
466 pSwitch->SetVisible(HasChildren(loc));
467 pSwitch->SetToggle(IsItemExpanded(loc));
468 pSwitch->GetEventSet()->subscribeEvent(EVT_CMD, Subscriber(&CTreeViewAdapter::OnSwitchClick, this));
469 }
470
471 bool OnSwitchClick(EventArgs *pEvt)
472 {

Callers

nothing calls this directly

Calls 8

SubscriberFunction · 0.85
SetToggleMethod · 0.80
GetChildrenCountMethod · 0.45
InitFromXmlMethod · 0.45
FindChildByIDMethod · 0.45
SetWindowTextMethod · 0.45
SetVisibleMethod · 0.45
subscribeEventMethod · 0.45

Tested by

no test coverage detected