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

Method TableGetHeaderAngledMaxLabelWidth

include/imgui/imgui_tables.cpp:3121–3131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3119}
3120
3121float ImGui::TableGetHeaderAngledMaxLabelWidth()
3122{
3123 ImGuiContext& g = *GImGui;
3124 ImGuiTable* table = g.CurrentTable;
3125 float width = 0.0f;
3126 for (int column_n = 0; column_n < table->ColumnsCount; column_n++)
3127 if (IM_BITARRAY_TESTBIT(table->EnabledMaskByIndex, column_n))
3128 if (table->Columns[column_n].Flags & ImGuiTableColumnFlags_AngledHeader)
3129 width = ImMax(width, CalcTextSize(TableGetColumnName(table, column_n), NULL, true).x);
3130 return width + g.Style.CellPadding.y * 2.0f; // Swap padding
3131}
3132
3133// [Public] This is a helper to output TableHeader() calls based on the column names declared in TableSetupColumn().
3134// The intent is that advanced users willing to create customized headers would not need to use this helper

Callers

nothing calls this directly

Calls 1

ImMaxFunction · 0.85

Tested by

no test coverage detected