You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// When 'SpecsDirty == true' you should sort your data. It will be true when sorting specs have changed since last call, or the first time.
705
706
// Make sure to set 'SpecsDirty = false' after sorting, else you may wastefully sort your data every frame!
706
707
// Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable().
707
-
IMGUI_API intTableGetColumnCount(); // return number of columns (value passed to BeginTable)
708
-
IMGUI_API constchar* TableGetColumnName(int column_n = -1); // return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column.
709
-
IMGUI_API boolTableGetColumnIsSorted(int column_n = -1); // return true if column is included in the sort specs. Rarely used, can be useful to tell if a data change should trigger resort. Equivalent to test ImGuiTableSortSpecs's ->ColumnsMask & (1 << column_n). Pass -1 to use current column.
710
-
IMGUI_API intTableGetHoveredColumn(); // return hovered column. return -1 when table is not hovered. return columns_count if the unused space at the right of visible columns is hovered.
711
-
IMGUI_API ImGuiTableSortSpecs* TableGetSortSpecs(); // get latest sort specs for the table (NULL if not sorting).
712
-
IMGUI_API voidTableSetBgColor(ImGuiTableBgTarget bg_target, ImU32 color, int column_n = -1); // change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details.
708
+
IMGUI_API intTableGetColumnCount(); // return number of columns (value passed to BeginTable)
709
+
IMGUI_API constchar* TableGetColumnName(int column_n = -1); // return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column.
710
+
IMGUI_API ImGuiTableColumnFlags TableGetColumnFlags(int column_n = -1); // return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags.
711
+
IMGUI_API intTableGetHoveredColumn(); // return hovered column. return -1 when table is not hovered. return columns_count if the unused space at the right of visible columns is hovered.
712
+
IMGUI_API ImGuiTableSortSpecs* TableGetSortSpecs();// get latest sort specs for the table (NULL if not sorting).
713
+
IMGUI_API voidTableSetBgColor(ImGuiTableBgTarget bg_target, ImU32 color, int column_n = -1); // change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details.
713
714
714
715
// Legacy Columns API (2020: prefer using Tables!)
715
716
// - You can also use SameLine(pos_x) to mimic simplified columns.
@@ -1094,6 +1095,7 @@ enum ImGuiTableFlags_
1094
1095
// Flags for ImGui::TableSetupColumn()
1095
1096
enum ImGuiTableColumnFlags_
1096
1097
{
1098
+
// Input configuration flags
1097
1099
ImGuiTableColumnFlags_None = 0,
1098
1100
ImGuiTableColumnFlags_DefaultHide = 1 << 0, // Default as a hidden/disabled column.
1099
1101
ImGuiTableColumnFlags_DefaultSort = 1 << 1, // Default as a sorting column.
ImGuiTableColumnFlags_IndentEnable = 1 << 15, // Use current Indent value when entering cell (default for column 0).
1114
1116
ImGuiTableColumnFlags_IndentDisable = 1 << 16, // Ignore current Indent value when entering cell (default for columns > 0). Indentation changes _within_ the cell will still be honored.
1115
1117
1118
+
// Output status flags, read-only via TableGetColumnFlags()
1119
+
ImGuiTableColumnFlags_IsEnabled = 1 << 20, // Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags.
1120
+
ImGuiTableColumnFlags_IsVisible = 1 << 21, // Status: is visible == is enabled AND not clipped by scrolling.
1121
+
ImGuiTableColumnFlags_IsSorted = 1 << 22, // Status: is currently part of the sort specs
1122
+
ImGuiTableColumnFlags_IsHovered = 1 << 23, // Status: is hovered by mouse
ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30// [Internal] Disable user resizing this column directly (it may however we resized indirectly from its left edge)
IMGUI_API boolTableGetColumnIsEnabled(int column_n = -1); // Return false when column is disabled (hidden by user/api, e.g. via context menu, or _DefaultHide flag)
0 commit comments