MCPcopy Create free account
hub / github.com/OpenMW/openmw / attach

Method attach

components/lua_ui/widget.cpp:113–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 }
112
113 void WidgetExtension::attach(WidgetExtension* ext)
114 {
115 if (ext->mParent != this)
116 {
117 if (ext->mParent)
118 {
119 auto children = ext->mParent->children();
120 std::erase(children, ext);
121 ext->mParent->setChildren(children);
122 }
123 ext->detachFromParent();
124 }
125 ext->mParent = this;
126 ext->mTemplateChild = false;
127 ext->widget()->attachToWidget(mSlot->widget());
128 }
129
130 void WidgetExtension::attachTemplate(WidgetExtension* ext)
131 {

Callers 5

ShadowDataMethod · 0.45
getViewDependentDataMethod · 0.45
attachPageAtFunction · 0.45
attachToMethod · 0.45

Calls 3

setChildrenMethod · 0.80
detachFromParentMethod · 0.80
widgetMethod · 0.80

Tested by

no test coverage detected