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

Method TableGetCellBgRect

KBotExt/imgui/imgui_tables.cpp:1628–1640  ·  view source on GitHub ↗

Return the cell rectangle based on currently known height. - Important: we generally don't know our row height until the end of the row, so Max.y will be incorrect in many situations. The only case where this is correct is if we provided a min_row_height to TableNextRow() and don't go below it, or in TableEndRow() when we locked that height. - Important: if ImGuiTableFlags_PadOuterX is set but ImG

Source from the content-addressed store, hash-verified

1626// columns report a small offset so their CellBgRect can extend up to the outer border.
1627// FIXME: But the rendering code in TableEndRow() nullifies that with clamping required for scrolling.
1628ImRect ImGui::TableGetCellBgRect(const ImGuiTable* table, int column_n)
1629{
1630 const ImGuiTableColumn* column = &table->Columns[column_n];
1631 float x1 = column->MinX;
1632 float x2 = column->MaxX;
1633 //if (column->PrevEnabledColumn == -1)
1634 // x1 -= table->OuterPaddingX;
1635 //if (column->NextEnabledColumn == -1)
1636 // x2 += table->OuterPaddingX;
1637 x1 = ImMax(x1, table->WorkRect.Min.x);
1638 x2 = ImMin(x2, table->WorkRect.Max.x);
1639 return ImRect(x1, table->RowPosY1, x2, table->RowPosY2);
1640}
1641
1642// Return the resizing ID for the right-side of the given column.
1643ImGuiID ImGui::TableGetColumnResizeID(ImGuiTable* table, int column_n, int instance_no)

Callers

nothing calls this directly

Calls 3

ImMaxFunction · 0.85
ImMinFunction · 0.85
ImRectFunction · 0.70

Tested by

no test coverage detected