| 92 | } |
| 93 | |
| 94 | WidgetExtension* pluckElementRoot(const sol::object& child, uint64_t depth) |
| 95 | { |
| 96 | std::shared_ptr<Element> element = child.as<std::shared_ptr<Element>>(); |
| 97 | if (element->mState == Element::Destroyed || element->mState == Element::Destroy) |
| 98 | throw std::logic_error("Using a destroyed element as a layout child"); |
| 99 | // child Element was created in the same frame and its action hasn't been processed yet |
| 100 | if (element->mState == Element::New) |
| 101 | element->create(depth + 1); |
| 102 | WidgetExtension* root = element->mRoot; |
| 103 | assert(root); |
| 104 | return root; |
| 105 | } |
| 106 | |
| 107 | WidgetExtension* createWidget(const sol::table& layout, bool isRoot, uint64_t depth); |
| 108 | void updateWidget(WidgetExtension* ext, const sol::table& layout, uint64_t depth); |