MCPcopy Create free account
hub / github.com/VCVRack/Rack / removeChild

Method removeChild

src/widget/Widget.cpp:218–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216
217
218void Widget::removeChild(Widget* child) {
219 assert(child);
220 // Make sure `this` is the child's parent
221 assert(child->parent == this);
222 // Dispatch Remove event
223 RemoveEvent eRemove;
224 child->onRemove(eRemove);
225 // Prepare to remove widget from the event state
226 APP->event->finalizeWidget(child);
227 // Delete child from children list
228 auto it = std::find(children.begin(), children.end(), child);
229 assert(it != children.end());
230 children.erase(it);
231 // Revoke child's parent
232 child->parent = NULL;
233}
234
235
236void Widget::clearChildren() {

Callers 8

onRemoveMethod · 0.80
removeModuleMethod · 0.80
removeCableMethod · 0.80
destroyTooltipMethod · 0.80
destroyTooltipMethod · 0.80
onDragStartMethod · 0.80
destroyTooltipMethod · 0.80
setChildMenuMethod · 0.80

Calls 3

findFunction · 0.85
finalizeWidgetMethod · 0.80
onRemoveMethod · 0.45

Tested by

no test coverage detected