| 3119 | } |
| 3120 | |
| 3121 | float 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 |