MCPcopy Create free account
hub / github.com/bwapi/bwapi / addControl

Method addControl

bwapi/BWAPI/Source/BW/Dialog.cpp:482–504  ·  view source on GitHub ↗

--------------------- ADD -----------------------

Source from the content-addressed store, hash-verified

480 }
481 // --------------------- ADD -----------------------
482 bool dialog::addControl(dialog *ctrl)
483 {
484 if ( !this || !ctrl || ctrl->isDialog())
485 return false;
486
487 dialog *parent = this;
488 if ( !parent->isDialog() )
489 parent = parent->parent();
490
491 ctrl->u.ctrl.pDlg = parent;
492 if ( !parent->child() )
493 {
494 parent->u.dlg.pFirstChild = ctrl;
495 }
496 else
497 {
498 dialog *child = parent->child();
499 while ( child->pNext )
500 child = child->pNext;
501 child->pNext = ctrl;
502 }
503 return true;
504 }
505 // ------------------ INITIALIZE -------------------
506 bool dialog::initialize()
507 {

Callers

nothing calls this directly

Calls 3

isDialogMethod · 0.80
parentMethod · 0.80
childMethod · 0.80

Tested by

no test coverage detected