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

Method baseCreateWidget

MyGUIEngine/src/MyGUI_PointerManager.cpp:163–183  ·  view source on GitHub ↗

создает виджет

Source from the content-addressed store, hash-verified

161
162 // создает виджет
163 Widget* PointerManager::baseCreateWidget(
164 WidgetStyle _style,
165 std::string_view _type,
166 std::string_view _skin,
167 const IntCoord& _coord,
168 Align _align,
169 std::string_view _layer,
170 std::string_view _name)
171 {
172 Widget* widget =
173 WidgetManager::getInstance()
174 .createWidget(_style, _type, _skin, _coord, /*_align, */ nullptr, nullptr, /*this, */ _name);
175 mWidgetChild.push_back(widget);
176
177 widget->setAlign(_align);
178
179 // присоединяем виджет с уровню
180 if (!_layer.empty())
181 LayerManager::getInstance().attachToLayerNode(_layer, widget);
182 return widget;
183 }
184
185 // удаляет всех детей
186 void PointerManager::_destroyAllChildWidget()

Callers

nothing calls this directly

Calls 5

attachToLayerNodeMethod · 0.80
createWidgetMethod · 0.45
push_backMethod · 0.45
setAlignMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected