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

Function ClampWindowRect

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

Source from the content-addressed store, hash-verified

5681}
5682
5683static inline void ClampWindowRect(ImGuiWindow* window, const ImRect& visibility_rect)
5684{
5685 ImGuiContext& g = *GImGui;
5686 ImVec2 size_for_clamping = window->Size;
5687 if (g.IO.ConfigWindowsMoveFromTitleBarOnly && !(window->Flags & ImGuiWindowFlags_NoTitleBar))
5688 size_for_clamping.y = window->TitleBarHeight();
5689 window->Pos = ImClamp(window->Pos, visibility_rect.Min - size_for_clamping, visibility_rect.Max);
5690}
5691
5692static void ImGui::RenderWindowOuterBorders(ImGuiWindow* window)
5693{

Callers 1

BeginMethod · 0.85

Calls 1

ImClampFunction · 0.85

Tested by

no test coverage detected