mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-27 23:37:03 -05:00
Tables: rework column reordering code. (#9312)
- Move more logic into TableQueueSetColumnDisplayOrder() so that it may be called from different locations. - Use to checking if both columns are on same size of the frozen barrier slightly changed to avoid reordering hidden column (with caveat of ill-defined design for what's "right").
This commit is contained in:
@@ -3045,7 +3045,7 @@ struct IMGUI_API ImGuiTable
|
||||
ImGuiTableColumnIdx LastResizedColumn; // Index of column being resized from previous frame.
|
||||
ImGuiTableColumnIdx HeldHeaderColumn; // Index of column header being held.
|
||||
ImGuiTableColumnIdx ReorderColumn; // Index of column being reordered. (not cleared)
|
||||
ImGuiTableColumnIdx ReorderColumnDir; // -1 or +1
|
||||
ImGuiTableColumnIdx ReorderColumnDstOrder; // Requested display order of column being reordered.
|
||||
ImGuiTableColumnIdx LeftMostEnabledColumn; // Index of left-most non-hidden column.
|
||||
ImGuiTableColumnIdx RightMostEnabledColumn; // Index of right-most non-hidden column.
|
||||
ImGuiTableColumnIdx LeftMostStretchedColumn; // Index of left-most stretched column.
|
||||
@@ -3560,6 +3560,7 @@ namespace ImGui
|
||||
IMGUI_API void TableSetColumnWidthAutoSingle(ImGuiTable* table, int column_n);
|
||||
IMGUI_API void TableSetColumnWidthAutoAll(ImGuiTable* table);
|
||||
IMGUI_API void TableSetColumnDisplayOrder(ImGuiTable* table, int column_n, int dst_order);
|
||||
IMGUI_API void TableQueueSetColumnDisplayOrder(ImGuiTable* table, int column_n, int dst_order);
|
||||
IMGUI_API void TableRemove(ImGuiTable* table);
|
||||
IMGUI_API void TableGcCompactTransientBuffers(ImGuiTable* table);
|
||||
IMGUI_API void TableGcCompactTransientBuffers(ImGuiTableTempData* table);
|
||||
|
||||
Reference in New Issue
Block a user