MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / GetWindowRect

Method GetWindowRect

plugins/Cardinal/src/DearImGui/imgui.cpp:11647–11659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11645 }
11646
11647 static ImRect GetWindowRect(ImGuiWindow* window, int rect_type)
11648 {
11649 if (rect_type == WRT_OuterRect) { return window->Rect(); }
11650 else if (rect_type == WRT_OuterRectClipped) { return window->OuterRectClipped; }
11651 else if (rect_type == WRT_InnerRect) { return window->InnerRect; }
11652 else if (rect_type == WRT_InnerClipRect) { return window->InnerClipRect; }
11653 else if (rect_type == WRT_WorkRect) { return window->WorkRect; }
11654 else if (rect_type == WRT_Content) { ImVec2 min = window->InnerRect.Min - window->Scroll + window->WindowPadding; return ImRect(min, min + window->ContentSize); }
11655 else if (rect_type == WRT_ContentIdeal) { ImVec2 min = window->InnerRect.Min - window->Scroll + window->WindowPadding; return ImRect(min, min + window->ContentSizeIdeal); }
11656 else if (rect_type == WRT_ContentRegionRect) { return window->ContentRegionRect; }
11657 IM_ASSERT(0);
11658 return ImRect();
11659 }
11660 };
11661
11662 // Tools

Callers

nothing calls this directly

Calls 2

RectMethod · 0.80
ImRectFunction · 0.70

Tested by

no test coverage detected