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

Method createWidget

MyGUIEngine/src/MyGUI_WidgetManager.cpp:102–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100 }
101
102 Widget* WidgetManager::createWidget(
103 WidgetStyle _style,
104 std::string_view _type,
105 std::string_view _skin,
106 const IntCoord& _coord,
107 Widget* _parent,
108 ICroppedRectangle* _cropeedParent,
109 std::string_view _name)
110 {
111 IObject* object = FactoryManager::getInstance().createObject(mCategoryName, _type);
112 if (object != nullptr)
113 {
114 Widget* widget = object->castType<Widget>();
115 widget->_initialise(_style, _coord, _skin, _parent, _cropeedParent, _name);
116
117 return widget;
118 }
119
120 MYGUI_EXCEPT("factory '" << _type << "' not found");
121 }
122
123 void WidgetManager::destroyWidget(Widget* _widget)
124 {

Callers 4

baseCreateWidgetMethod · 0.45
baseCreateWidgetMethod · 0.45
baseCreateWidgetMethod · 0.45

Calls 2

createObjectMethod · 0.45
_initialiseMethod · 0.45

Tested by

no test coverage detected