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

Method findControl

forms/control.cpp:825–839  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

823sp<Control> Control::operator[](int Index) const { return Controls.at(Index); }
824
825sp<Control> Control::findControl(UString ID) const
826{
827 for (auto c = Controls.begin(); c != Controls.end(); c++)
828 {
829 auto ctrl = *c;
830 if (ctrl->Name == ID)
831 {
832 return ctrl;
833 }
834 auto childControl = ctrl->findControl(ID);
835 if (childControl)
836 return childControl;
837 }
838 return nullptr;
839}
840
841bool Control::replaceChildByName(sp<Control> ctrl)
842{

Callers 15

findControlTypedMethod · 0.95
eventOccurredMethod · 0.80
eventOccurredMethod · 0.80
BaseSelectScreenMethod · 0.80
eventOccurredMethod · 0.80
eventOccurredMethod · 0.80
eventOccurredMethod · 0.80
eventOccurredMethod · 0.80
eventOccurredMethod · 0.80
eventOccurredMethod · 0.80
eventOccurredMethod · 0.80
eventOccurredMethod · 0.80

Calls 2

endMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected