MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/Cauldron / GetColumnOffset

Method GetColumnOffset

libs/imgui/imgui.cpp:10882–10905  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10880}
10881
10882float ImGui::GetColumnOffset(int column_index)
10883{
10884 ImGuiWindow* window = GetCurrentWindowRead();
10885 ImGuiColumnsSet* columns = window->DC.ColumnsSet;
10886 IM_ASSERT(columns != NULL);
10887
10888 if (column_index < 0)
10889 column_index = columns->Current;
10890 IM_ASSERT(column_index < columns->Columns.Size);
10891
10892 /*
10893 if (g.ActiveId)
10894 {
10895 ImGuiContext& g = *GImGui;
10896 const ImGuiID column_id = columns->ColumnsSetId + ImGuiID(column_index);
10897 if (g.ActiveId == column_id)
10898 return GetDraggedColumnOffset(columns, column_index);
10899 }
10900 */
10901
10902 const float t = columns->Columns[column_index].OffsetNorm;
10903 const float x_offset = ImLerp(columns->MinX, columns->MaxX, t);
10904 return x_offset;
10905}
10906
10907static float GetColumnWidthEx(ImGuiColumnsSet* columns, int column_index, bool before_resize = false)
10908{

Callers

nothing calls this directly

Calls 2

GetCurrentWindowReadFunction · 0.85
ImLerpFunction · 0.85

Tested by

no test coverage detected