MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / GetWindowRect

Method GetWindowRect

imgui_tiny_app/imgui/imgui.cpp:22362–22374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22360 }
22361
22362 static ImRect GetWindowRect(ImGuiWindow* window, int rect_type)
22363 {
22364 if (rect_type == WRT_OuterRect) { return window->Rect(); }
22365 else if (rect_type == WRT_OuterRectClipped) { return window->OuterRectClipped; }
22366 else if (rect_type == WRT_InnerRect) { return window->InnerRect; }
22367 else if (rect_type == WRT_InnerClipRect) { return window->InnerClipRect; }
22368 else if (rect_type == WRT_WorkRect) { return window->WorkRect; }
22369 else if (rect_type == WRT_Content) { ImVec2 min = window->InnerRect.Min - window->Scroll + window->WindowPadding; return ImRect(min, min + window->ContentSize); }
22370 else if (rect_type == WRT_ContentIdeal) { ImVec2 min = window->InnerRect.Min - window->Scroll + window->WindowPadding; return ImRect(min, min + window->ContentSizeIdeal); }
22371 else if (rect_type == WRT_ContentRegionRect) { return window->ContentRegionRect; }
22372 IM_ASSERT(0);
22373 return ImRect();
22374 }
22375 };
22376
22377#ifdef IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS

Callers

nothing calls this directly

Calls 1

ImRectFunction · 0.70

Tested by

no test coverage detected