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

Function GetMainWindow

src/window.cpp:1182–1187  ·  view source on GitHub ↗

* Get the main window, i.e. FindWindowById(WC_MAIN_WINDOW, 0). * If the main window is not available, this function will trigger an assert. * @return Pointer to the main window. */

Source from the content-addressed store, hash-verified

1180 * @return Pointer to the main window.
1181 */
1182Window *GetMainWindow()
1183{
1184 Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
1185 assert(w != nullptr);
1186 return w;
1187}
1188
1189/**
1190 * Close a window by its class and window number (if it is open).

Callers 15

OnRealtimeTickMethod · 0.85
OnClickMethod · 0.85
ToolbarZoomInClickFunction · 0.85
ToolbarZoomOutClickFunction · 0.85
OnInvalidateDataMethod · 0.85
OnInvalidateDataMethod · 0.85
HandleViewportScrollFunction · 0.85
ScrollMainViewportFunction · 0.85
HandleKeyScrollingFunction · 0.85
ShowQueryFunction · 0.85
ConZoomToLevelFunction · 0.85
SetupScreenshotViewportFunction · 0.85

Calls 1

FindWindowByIdFunction · 0.85

Tested by

no test coverage detected