MCPcopy Create free account
hub / github.com/davisking/dlib / remove

Method remove

dlib/gui_widgets/base_widgets.cpp:1379–1398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1377// ----------------------------------------------------------------------------------------
1378
1379 void widget_group::
1380 remove (
1381 const drawable& widget
1382 )
1383 {
1384 auto_mutex M(m);
1385 drawable* w = const_cast<drawable*>(&widget);
1386 if (widgets.is_in_domain(w))
1387 {
1388 widgets.destroy(w);
1389
1390 // check if we also have an entry in the wg_widgets set and if
1391 // so then remove that too
1392 widget_group* wg = reinterpret_cast<widget_group*>(w);
1393 if (wg_widgets.is_member(wg))
1394 {
1395 wg_widgets.destroy(wg);
1396 }
1397 }
1398 }
1399
1400// ----------------------------------------------------------------------------------------
1401

Callers

nothing calls this directly

Calls 1

destroyMethod · 0.45

Tested by

no test coverage detected