| 4315 | } |
| 4316 | |
| 4317 | void ImGui::SetColumnOffset(int column_index, float offset) |
| 4318 | { |
| 4319 | ImGuiContext& g = *GImGui; |
| 4320 | ImGuiWindow* window = g.CurrentWindow; |
| 4321 | ImGuiOldColumns* columns = window->DC.CurrentColumns; |
| 4322 | IM_ASSERT(columns != NULL); |
| 4323 | |
| 4324 | if (column_index < 0) |
| 4325 | column_index = columns->Current; |
| 4326 | IM_ASSERT(column_index < columns->Columns.Size); |
| 4327 | |
| 4328 | const bool preserve_width = !(columns->Flags & ImGuiOldColumnFlags_NoPreserveWidths) && (column_index < columns->Count - 1); |
| 4329 | const float width = preserve_width ? GetColumnWidthEx(columns, column_index, columns->IsBeingResized) : 0.0f; |
| 4330 | |
| 4331 | if (!(columns->Flags & ImGuiOldColumnFlags_NoForceWithinWindow)) |
| 4332 | offset = ImMin(offset, columns->OffMaxX - g.Style.ColumnsMinSpacing * (columns->Count - column_index)); |
| 4333 | columns->Columns[column_index].OffsetNorm = GetColumnNormFromOffset(columns, offset - columns->OffMinX); |
| 4334 | |
| 4335 | if (preserve_width) |
| 4336 | SetColumnOffset(column_index + 1, offset + ImMax(g.Style.ColumnsMinSpacing, width)); |
| 4337 | } |
| 4338 | |
| 4339 | void ImGui::SetColumnWidth(int column_index, float width) |
| 4340 | { |
nothing calls this directly
no test coverage detected