| 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 | { |
no test coverage detected