| 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 | { |
nothing calls this directly
no test coverage detected