MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / TableGetColumnWidthAuto

Method TableGetColumnWidthAuto

KBotExt/imgui/imgui_tables.cpp:2127–2141  ·  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

2125
2126// Note this is meant to be stored in column->WidthAuto, please generally use the WidthAuto field
2127float ImGui::TableGetColumnWidthAuto(ImGuiTable* table, ImGuiTableColumn* column)
2128{
2129 const float content_width_body = ImMax(column->ContentMaxXFrozen, column->ContentMaxXUnfrozen) - column->WorkMinX;
2130 const float content_width_headers = column->ContentMaxXHeadersIdeal - column->WorkMinX;
2131 float width_auto = content_width_body;
2132 if (!(column->Flags & ImGuiTableColumnFlags_NoHeaderWidth))
2133 width_auto = ImMax(width_auto, content_width_headers);
2134
2135 // Non-resizable fixed columns preserve their requested width
2136 if ((column->Flags & ImGuiTableColumnFlags_WidthFixed) && column->InitStretchWeightOrWidth > 0.0f)
2137 if (!(table->Flags & ImGuiTableFlags_Resizable) || (column->Flags & ImGuiTableColumnFlags_NoResize))
2138 width_auto = column->InitStretchWeightOrWidth;
2139
2140 return ImMax(width_auto, table->MinColumnWidth);
2141}
2142
2143// 'width' = inner column width, without padding
2144void ImGui::TableSetColumnWidth(int column_n, float width)

Callers

nothing calls this directly

Calls 1

ImMaxFunction · 0.85

Tested by

no test coverage detected