| 115 | } |
| 116 | |
| 117 | virtual void getView(int position, SWindow * pItem, pugi::xml_node xmlTemplate) |
| 118 | { |
| 119 | if (pItem->GetChildrenCount() == 0) |
| 120 | { |
| 121 | int nViewType = getItemViewType(position, pItem->GetState()); |
| 122 | pItem->InitFromXml(xmlTemplate.child(KNodeName_Item[nViewType])); |
| 123 | } |
| 124 | pItem->GetEventSet()->subscribeEvent(EventSwndStateChanged::EventID, Subscriber(&CTestAdapterFlex::OnItemStateChanged, this)); |
| 125 | |
| 126 | SButton *pBtn = pItem->FindChildByName2<SButton>(L"btn_test"); |
| 127 | pBtn->SetWindowText(SStringT().Format(_T("button %d"), position)); |
| 128 | pBtn->SetUserData(position); |
| 129 | pBtn->GetEventSet()->subscribeEvent(EVT_CMD, Subscriber(&CTestAdapterFlex::OnButtonClick, this)); |
| 130 | } |
| 131 | |
| 132 | bool OnItemStateChanged(EventArgs *e) |
| 133 | { |
nothing calls this directly
no test coverage detected