MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / setParent

Method setParent

forms/control.cpp:878–891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

876}
877
878void Control::setParent(sp<Control> Parent)
879{
880 if (Parent)
881 {
882 auto previousParent = this->owningControl.lock();
883 if (previousParent)
884 {
885 LogError("Reparenting control");
886 }
887 Parent->Controls.push_back(shared_from_this());
888 Parent->setDirty();
889 }
890 owningControl = Parent;
891}
892
893void Control::setParent(sp<Control> Parent, int position)
894{

Callers 13

createChildMethod · 0.80
clearMethod · 0.80
addItemMethod · 0.80
replaceItemMethod · 0.80
removeItemMethod · 0.80
clearMethod · 0.80
addItemMethod · 0.80
replaceItemMethod · 0.80
removeItemMethod · 0.80

Calls 3

setDirtyMethod · 0.80
insertMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected