MCPcopy Create free account
hub / github.com/VictorGordan/opengl-tutorials / ClampWindowRect

Function ClampWindowRect

ImGUI GLFW Tutorial/imgui/imgui.cpp:5497–5504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5495}
5496
5497static inline void ClampWindowRect(ImGuiWindow* window, const ImRect& visibility_rect)
5498{
5499 ImGuiContext& g = *GImGui;
5500 ImVec2 size_for_clamping = window->Size;
5501 if (g.IO.ConfigWindowsMoveFromTitleBarOnly && !(window->Flags & ImGuiWindowFlags_NoTitleBar))
5502 size_for_clamping.y = window->TitleBarHeight();
5503 window->Pos = ImClamp(window->Pos, visibility_rect.Min - size_for_clamping, visibility_rect.Max);
5504}
5505
5506static void ImGui::RenderWindowOuterBorders(ImGuiWindow* window)
5507{

Callers 1

BeginMethod · 0.70

Calls 1

ImClampFunction · 0.70

Tested by

no test coverage detected