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

Method FindChildWindow

src/window.cpp:1049–1056  ·  view source on GitHub ↗

* Find the Window whose parent pointer points to this window * @param wc Window class of the window to find; #WC_INVALID if class does not matter * @return a Window pointer that is the child of this window, or \c nullptr otherwise */

Source from the content-addressed store, hash-verified

1047 * @return a Window pointer that is the child of this window, or \c nullptr otherwise
1048 */
1049Window *Window::FindChildWindow(WindowClass wc) const
1050{
1051 for (Window *v : Window::Iterate()) {
1052 if ((wc == WC_INVALID || wc == v->window_class) && v->parent == this) return v;
1053 }
1054
1055 return nullptr;
1056}
1057
1058/**
1059 * Find the Window whose parent pointer points to this window

Callers 2

CloseChildWindowsMethod · 0.95
ReplaceDropDownListFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected