| 3813 | } |
| 3814 | |
| 3815 | void ImGui::SetColumnOffset(int column_index, float offset) |
| 3816 | { |
| 3817 | ImGuiContext& g = *GImGui; |
| 3818 | ImGuiWindow* window = g.CurrentWindow; |
| 3819 | ImGuiOldColumns* columns = window->DC.CurrentColumns; |
| 3820 | IM_ASSERT(columns != NULL); |
| 3821 | |
| 3822 | if (column_index < 0) |
| 3823 | column_index = columns->Current; |
| 3824 | IM_ASSERT(column_index < columns->Columns.Size); |
| 3825 | |
| 3826 | const bool preserve_width = !(columns->Flags & ImGuiOldColumnFlags_NoPreserveWidths) && (column_index < columns->Count - 1); |
| 3827 | const float width = preserve_width ? GetColumnWidthEx(columns, column_index, columns->IsBeingResized) : 0.0f; |
| 3828 | |
| 3829 | if (!(columns->Flags & ImGuiOldColumnFlags_NoForceWithinWindow)) |
| 3830 | offset = ImMin(offset, columns->OffMaxX - g.Style.ColumnsMinSpacing * (columns->Count - column_index)); |
| 3831 | columns->Columns[column_index].OffsetNorm = GetColumnNormFromOffset(columns, offset - columns->OffMinX); |
| 3832 | |
| 3833 | if (preserve_width) |
| 3834 | SetColumnOffset(column_index + 1, offset + ImMax(g.Style.ColumnsMinSpacing, width)); |
| 3835 | } |
| 3836 | |
| 3837 | void ImGui::SetColumnWidth(int column_index, float width) |
| 3838 | { |
nothing calls this directly
no test coverage detected