MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / TableGetColumnWidthAuto

Method TableGetColumnWidthAuto

include/imgui/imgui_tables.cpp:2322–2336  ·  view source on GitHub ↗

Note this is meant to be stored in column->WidthAuto, please generally use the WidthAuto field

Source from the content-addressed store, hash-verified

2320
2321// Note this is meant to be stored in column->WidthAuto, please generally use the WidthAuto field
2322float ImGui::TableGetColumnWidthAuto(ImGuiTable* table, ImGuiTableColumn* column)
2323{
2324 const float content_width_body = ImMax(column->ContentMaxXFrozen, column->ContentMaxXUnfrozen) - column->WorkMinX;
2325 const float content_width_headers = column->ContentMaxXHeadersIdeal - column->WorkMinX;
2326 float width_auto = content_width_body;
2327 if (!(column->Flags & ImGuiTableColumnFlags_NoHeaderWidth))
2328 width_auto = ImMax(width_auto, content_width_headers);
2329
2330 // Non-resizable fixed columns preserve their requested width
2331 if ((column->Flags & ImGuiTableColumnFlags_WidthFixed) && column->InitStretchWeightOrWidth > 0.0f)
2332 if (!(table->Flags & ImGuiTableFlags_Resizable) || (column->Flags & ImGuiTableColumnFlags_NoResize))
2333 width_auto = column->InitStretchWeightOrWidth;
2334
2335 return ImMax(width_auto, table->MinColumnWidth);
2336}
2337
2338// 'width' = inner column width, without padding
2339void ImGui::TableSetColumnWidth(int column_n, float width)

Callers

nothing calls this directly

Calls 1

ImMaxFunction · 0.85

Tested by

no test coverage detected