MCPcopy Create free account
hub / github.com/MyGUI/mygui / addWidget

Method addWidget

MyGUIEngine/src/MyGUI_Widget.cpp:1447–1465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1445 }
1446
1447 void Widget::addWidget(Widget* _widget)
1448 {
1449 // сортировка глубины от большого к меньшему
1450
1451 int depth = _widget->getDepth();
1452
1453 for (size_t index = 0; index < mWidgetChild.size(); ++index)
1454 {
1455 Widget* widget = mWidgetChild[index];
1456 if (widget->getDepth() < depth)
1457 {
1458 mWidgetChild.insert(mWidgetChild.begin() + index, _widget);
1459 _updateChilds();
1460 return;
1461 }
1462 }
1463
1464 mWidgetChild.push_back(_widget);
1465 }
1466
1467 void Widget::_updateChilds()
1468 {

Callers

nothing calls this directly

Calls 5

getDepthMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected