MCPcopy Create free account
hub / github.com/RenderKit/embree / ClampWindowPos

Function ClampWindowPos

tutorials/common/imgui/imgui.cpp:6045–6052  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6043}
6044
6045static inline void ClampWindowPos(ImGuiWindow* window, const ImRect& visibility_rect)
6046{
6047 ImGuiContext& g = *GImGui;
6048 ImVec2 size_for_clamping = window->Size;
6049 if (g.IO.ConfigWindowsMoveFromTitleBarOnly && !(window->Flags & ImGuiWindowFlags_NoTitleBar))
6050 size_for_clamping.y = window->TitleBarHeight();
6051 window->Pos = ImClamp(window->Pos, visibility_rect.Min - size_for_clamping, visibility_rect.Max);
6052}
6053
6054static void ImGui::RenderWindowOuterBorders(ImGuiWindow* window)
6055{

Callers 1

BeginMethod · 0.85

Calls 1

ImClampFunction · 0.85

Tested by

no test coverage detected