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

Method getView

demo/CAdapter.h:117–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 9

SubscriberFunction · 0.85
GetStateMethod · 0.80
GetChildrenCountMethod · 0.45
InitFromXmlMethod · 0.45
childMethod · 0.45
subscribeEventMethod · 0.45
SetWindowTextMethod · 0.45
FormatMethod · 0.45
SetUserDataMethod · 0.45

Tested by

no test coverage detected