* Find a window by its class and window number * @param cls Window class * @param number Number of the window within the window class * @return Pointer to the found window, or \c nullptr if not available */
| 1151 | * @return Pointer to the found window, or \c nullptr if not available |
| 1152 | */ |
| 1153 | Window *FindWindowById(WindowClass cls, WindowNumber number) |
| 1154 | { |
| 1155 | for (Window *w : Window::Iterate()) { |
| 1156 | if (w->window_class == cls && w->window_number == number) return w; |
| 1157 | } |
| 1158 | |
| 1159 | return nullptr; |
| 1160 | } |
| 1161 | |
| 1162 | /** |
| 1163 | * Find any window by its class. Useful when searching for a window that uses |
no outgoing calls
no test coverage detected