| 7796 | } |
| 7797 | |
| 7798 | static 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(). |
no test coverage detected