| 3759 | } |
| 3760 | |
| 3761 | void ImGui::SetColumnOffset(int column_index, float offset) |
| 3762 | { |
| 3763 | ImGuiContext& g = *GImGui; |
| 3764 | ImGuiWindow* window = g.CurrentWindow; |
| 3765 | ImGuiOldColumns* columns = window->DC.CurrentColumns; |
| 3766 | IM_ASSERT(columns != NULL); |
| 3767 | |
| 3768 | if (column_index < 0) |
| 3769 | column_index = columns->Current; |
| 3770 | IM_ASSERT(column_index < columns->Columns.Size); |
| 3771 | |
| 3772 | const bool preserve_width = !(columns->Flags & ImGuiOldColumnFlags_NoPreserveWidths) && (column_index < columns->Count - 1); |
| 3773 | const float width = preserve_width ? GetColumnWidthEx(columns, column_index, columns->IsBeingResized) : 0.0f; |
| 3774 | |
| 3775 | if (!(columns->Flags & ImGuiOldColumnFlags_NoForceWithinWindow)) |
| 3776 | offset = ImMin(offset, columns->OffMaxX - g.Style.ColumnsMinSpacing * (columns->Count - column_index)); |
| 3777 | columns->Columns[column_index].OffsetNorm = GetColumnNormFromOffset(columns, offset - columns->OffMinX); |
| 3778 | |
| 3779 | if (preserve_width) |
| 3780 | SetColumnOffset(column_index + 1, offset + ImMax(g.Style.ColumnsMinSpacing, width)); |
| 3781 | } |
| 3782 | |
| 3783 | void ImGui::SetColumnWidth(int column_index, float width) |
| 3784 | { |
nothing calls this directly
no test coverage detected