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

Method InitFromXml

SOUI/src/control/SCmnCtrl.cpp:340–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340BOOL SButton::InitFromXml(pugi::xml_node xmlNode)
341{
342 BOOL bRet=SWindow::InitFromXml(xmlNode);
343 SStringT strText = GetWindowText(TRUE);
344
345 if (!strText.IsEmpty()&&(strText[strText.GetLength()-1]==_T(')')))
346 {
347 int pos=strText.ReverseFind(_T('('));
348 if ((pos != -1)&&(strText[++pos]==_T('&')))
349 {
350 SStringT strAccelT=_T("alt+");
351 strAccelT += strText[++pos];
352 m_accel = CAccelerator::TranslateAccelKey(strAccelT);
353 if (m_accel)
354 {
355 CAccelerator acc(m_accel);
356 GetContainer()->GetAcceleratorMgr()->RegisterAccelerator(acc, this);
357 }
358 }
359 }
360 return bRet;
361}
362
363void SButton::OnDestroy()
364{

Callers 8

CreateListBoxMethod · 0.45
STabSliderClass · 0.45
CreateChildrenMethod · 0.45
OnCreateDropDownMethod · 0.45
InsertMethod · 0.45
CreateChildrenMethod · 0.45
CreateChildrenMethod · 0.45
CreateListBoxMethod · 0.45

Calls 5

GetWindowTextFunction · 0.85
RegisterAcceleratorMethod · 0.80
IsEmptyMethod · 0.45
GetLengthMethod · 0.45
ReverseFindMethod · 0.45

Tested by

no test coverage detected