@ -5414,8 +5414,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
// FIXME: window->ContentsRegionRect.Max is currently very misleading / partly faulty, but some BeginChild() patterns relies on it.
window - > ContentsRegionRect . Min . x = window - > Pos . x - window - > Scroll . x + window - > WindowPadding . x ;
window - > ContentsRegionRect . Min . y = window - > Pos . y - window - > Scroll . y + window - > WindowPadding . y + window - > TitleBarHeight ( ) + window - > MenuBarHeight ( ) ;
window - > ContentsRegionRect . Max . x = window - > Pos . x - window - > Scroll . x - window - > WindowPadding . x + ( window - > SizeContentsExplicit . x ! = 0.0f ? window - > SizeContentsExplicit . x : ( window - > Size . x - window - > ScrollbarSizes . x ) ) ;
window - > ContentsRegionRect . Max . y = window - > Pos . y - window - > Scroll . y - window - > WindowPadding . y + ( window - > SizeContentsExplicit . y ! = 0.0f ? window - > SizeContentsExplicit . y : ( window - > Size . y - window - > ScrollbarSizes . y ) ) ;
window - > ContentsRegionRect . Max . x = window - > Pos . x - window - > Scroll . x - window - > WindowPadding . x + ( window - > SizeContentsExplicit . x ! = 0.0f ? window - > SizeContentsExplicit . x : ( window - > Size . x - window - > ScrollbarSizes . x + window - > WindowBorderSize ) ) ;
window - > ContentsRegionRect . Max . y = window - > Pos . y - window - > Scroll . y - window - > WindowPadding . y + ( window - > SizeContentsExplicit . y ! = 0.0f ? window - > SizeContentsExplicit . y : ( window - > Size . y - window - > ScrollbarSizes . y + window - > WindowBorderSize ) ) ;
// Setup drawing context
// (NB: That term "drawing context / DC" lost its meaning a long time ago. Initially was meant to hold transient data only. Nowadays difference between window-> and window->DC-> is dubious.)
@ -5517,10 +5517,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
}
}
// Save clipped aabb so we can access it in constant-time in FindHoveredWindow()
window - > OuterRectClipped = window - > Rect ( ) ;
window - > OuterRectClipped . ClipWith ( window - > ClipRect ) ;
// Pressing CTRL+C while holding on a window copy its content to the clipboard
// This works but 1. doesn't handle multiple Begin/End pairs, 2. recursing into another Begin/End pair - so we need to work that out and add better logging scope.
// Maybe we can support CTRL+C on every element?
@ -5530,13 +5526,17 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
LogToClipboard ( ) ;
*/
// Save clipped aabb so we can access it in constant-time in FindHoveredWindow()
window - > OuterRectClipped = window - > Rect ( ) ;
window - > OuterRectClipped . ClipWith ( window - > ClipRect ) ;
// Inner rectangle
// We set this up after processing the resize grip so that our clip rectangle doesn't lag by a frame
// Note that if our window is collapsed we will end up with an inverted (~null) clipping rectangle which is the correct behavior.
window - > InnerMainRect . Min . x = title_bar_rect . Min . x + window - > WindowBorderSize ;
window - > InnerMainRect . Min . y = title_bar_rect . Max . y + window - > MenuBarHeight ( ) + ( ( ( flags & ImGuiWindowFlags_MenuBar ) | | ! ( flags & ImGuiWindowFlags_NoTitleBar ) ) ? style . FrameBorderSize : window - > WindowBorderSize ) ;
window - > InnerMainRect . Max . x = window - > Pos . x + window - > Size . x - window- > ScrollbarSizes . x - window - > WindowBorderSize ;
window - > InnerMainRect . Max . y = window - > Pos . y + window - > Size . y - window- > ScrollbarSizes . y - window - > WindowBorderSize ;
window - > InnerMainRect . Max . x = window - > Pos . x + window - > Size . x - ImMax( window- > ScrollbarSizes . x , window - > WindowBorderSize ) ;
window - > InnerMainRect . Max . y = window - > Pos . y + window - > Size . y - ImMax( window- > ScrollbarSizes . y , window - > WindowBorderSize ) ;
//window->DrawList->AddRect(window->InnerRect.Min, window->InnerRect.Max, IM_COL32_WHITE);
// Inner clipping rectangle