MCPcopy Create free account
hub / github.com/cinder/Cinder / CalcScopeRect

Function CalcScopeRect

src/imgui/imgui_widgets.cpp:7798–7817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7796}
7797
7798static ImRect CalcScopeRect(ImGuiMultiSelectTempData* ms, ImGuiWindow* window)
7799{
7800 ImGuiContext& g = *GImGui;
7801 if (ms->Flags & ImGuiMultiSelectFlags_ScopeRect)
7802 {
7803 // Warning: this depends on CursorMaxPos so it means to be called by EndMultiSelect() only
7804 return ImRect(ms->ScopeRectMin, ImMax(window->DC.CursorMaxPos, ms->ScopeRectMin));
7805 }
7806 else
7807 {
7808 // When a table, pull HostClipRect, which allows us to predict ClipRect before first row/layout is performed. (#7970)
7809 ImRect scope_rect = window->InnerClipRect;
7810 if (g.CurrentTable != NULL)
7811 scope_rect = g.CurrentTable->HostClipRect;
7812
7813 // Add inner table decoration (#7821) // FIXME: Why not baking in InnerClipRect?
7814 scope_rect.Min = ImMin(scope_rect.Min + ImVec2(window->DecoInnerSizeX1, window->DecoInnerSizeY1), scope_rect.Max);
7815 return scope_rect;
7816 }
7817}
7818
7819// Return ImGuiMultiSelectIO structure.
7820// Lifetime: don't hold on ImGuiMultiSelectIO* pointers over multiple frames or past any subsequent call to BeginMultiSelect() or EndMultiSelect().

Callers 2

BeginMultiSelectMethod · 0.85
EndMultiSelectMethod · 0.85

Calls 4

ImMaxFunction · 0.85
ImMinFunction · 0.85
ImVec2Function · 0.85
ImRectFunction · 0.50

Tested by

no test coverage detected