本文整理汇总了C++中mygui::WidgetPtr::getEnumerator方法的典型用法代码示例。如果您正苦于以下问题:C++ WidgetPtr::getEnumerator方法的具体用法?C++ WidgetPtr::getEnumerator怎么用?C++ WidgetPtr::getEnumerator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mygui::WidgetPtr
的用法示例。
在下文中一共展示了WidgetPtr::getEnumerator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadLayoutRecursive
//.........这里部分代码省略.........
{
LOG("Dashboard ("+filename+"/"+name+"): direction empty: translate needs a direction");
return;
}
}
else if (anim == "series")
{
ctrl.animationType = ANIM_SERIES;
ctrl.img = (MyGUI::ImageBox *)w; //w->getSubWidgetMain()->castType<MyGUI::ImageBox>();
if (!ctrl.img)
{
LOG("Dashboard ("+filename+"/"+name+"): error loading series control");
return;
}
}
else if (anim == "textcolor" || anim == "textcolour")
{
ctrl.animationType = ANIM_TEXTCOLOR;
// try to cast, will throw
try
{
ctrl.txt = (MyGUI::TextBox *)w;
}
catch (...)
{
LOG("Dashboard ("+filename+"/"+name+"): textcolor controls must use the TextBox Control");
return;
}
}
else if (anim == "textformat")
{
// try to cast, will throw
try
{
ctrl.txt = (MyGUI::TextBox *)w; // w->getSubWidgetMain()->castType<MyGUI::TextBox>();
}
catch (...)
{
LOG("Dashboard ("+filename+"/"+name+"): Lamp controls must use the ImageBox Control");
return;
}
ctrl.animationType = ANIM_TEXTFORMAT;
}
else if (anim == "textstring")
{
// try to cast, will throw
try
{
ctrl.txt = (MyGUI::TextBox *)w; // w->getSubWidgetMain()->castType<MyGUI::TextBox>();
}
catch (...)
{
LOG("Dashboard ("+filename+"/"+name+"): Lamp controls must use the ImageBox Control");
return;
}
ctrl.animationType = ANIM_TEXTSTRING;
}
else if (anim == "lamp")
{
// try to cast, will throw
/*
{
try
{
w->getSubWidgetMain()->castType<MyGUI::ImageBox>();
}
catch (...)
{
LOG("Dashboard ("+filename+"/"+name+"): Lamp controls must use the ImageBox Control");
continue;
}
}
*/
ctrl.animationType = ANIM_LAMP;
ctrl.img = (MyGUI::ImageBox *)w; //w->getSubWidgetMain()->castType<MyGUI::ImageBox>();
if (!ctrl.img)
{
LOG("Dashboard ("+filename+"/"+name+"): error loading Lamp control");
return;
}
}
controls[free_controls] = ctrl;
free_controls++;
if (free_controls >= MAX_CONTROLS)
{
LOG("maximum amount of controls reached, discarding the rest: " + TOSTRING(MAX_CONTROLS));
return;
}
}
// walk the children now
MyGUI::EnumeratorWidgetPtr e = w->getEnumerator();
while (e.next())
{
loadLayoutRecursive(e.current());
}
}