MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / CloseChildWindows

Method CloseChildWindows

src/window.cpp:1077–1084  ·  view source on GitHub ↗

* Close all children a window might have in a head-recursive manner * @param wc Window class of the window to remove; #WC_INVALID if class does not matter */

Source from the content-addressed store, hash-verified

1075 * @param wc Window class of the window to remove; #WC_INVALID if class does not matter
1076 */
1077void Window::CloseChildWindows(WindowClass wc) const
1078{
1079 Window *child = this->FindChildWindow(wc);
1080 while (child != nullptr) {
1081 child->Close();
1082 child = this->FindChildWindow(wc);
1083 }
1084}
1085
1086
1087/**

Callers 15

CloseMethod · 0.95
OnClickMethod · 0.80
OnInvalidateDataMethod · 0.80
UpgradeCurrentMethod · 0.80
OnClickMethod · 0.80
OnNewGRFsScannedMethod · 0.80
OnDropdownSelectMethod · 0.80
OnKeyPressMethod · 0.80
AddGRFToActiveMethod · 0.80
OnInvalidateDataMethod · 0.80
OnClickMethod · 0.80

Calls 2

FindChildWindowMethod · 0.95
CloseMethod · 0.45

Tested by

no test coverage detected