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
Copy file name to clipboardExpand all lines: imgui.h
+11-10Lines changed: 11 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -685,6 +685,7 @@ namespace ImGui
685
685
IMGUI_API boolTableNextColumn(); // append into the next column (or first column of next row if currently in last column). Return false when column is not visible.
686
686
IMGUI_API boolTableSetColumnIndex(int column_n); // append into the specified column. Return false when column is not visible.
687
687
IMGUI_API intTableGetColumnIndex(); // return current column index.
688
+
IMGUI_API intTableGetRowIndex(); // return current row index.
688
689
// Tables: Headers & Columns declaration
689
690
// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc.
690
691
// Important: this will not display anything! The name passed to TableSetupColumn() is used by TableHeadersRow() and context-menus.
@@ -1037,14 +1038,14 @@ enum ImGuiTabItemFlags_
1037
1038
// - The default sizing policy for columns depends on whether the ScrollX flag is set on the table:
1038
1039
// When ScrollX is off:
1039
1040
// - Table defaults to ImGuiTableFlags_SizingPolicyStretchX -> all Columns defaults to ImGuiTableColumnFlags_WidthStretch.
1040
-
// - Columns sizing policy allowed: Fixed/Auto or Stretch.
1041
+
// - Columns sizing policy allowed: Stretch (default) or Fixed/Auto.
1041
1042
// - Stretch Columns will share the width available in table.
1042
1043
// - Fixed Columns will generally obtain their requested width unless the Table cannot fit them all.
1043
1044
// When ScrollX is on:
1044
1045
// - Table defaults to ImGuiTableFlags_SizingPolicyFixedX -> all Columns defaults to ImGuiTableColumnFlags_WidthFixed.
1045
-
// - Columns sizing policy allowed: Fixed/Auto mostly! Using Stretch columns OFTEN DOES NOT MAKE SENSE if ScrollX is on, UNLESS you have specified a value for 'inner_width' in BeginTable().
// - Fixed Columns can be enlarged as needed. Table will show an horizontal scrollbar if needed.
1047
-
// - Stretch Columns, if any, will calculate their width using inner_width, assuming no scrolling (it really doesn't make sense to do otherwise).
1048
+
// - Using Stretch columns OFTEN DOES NOT MAKE SENSE if ScrollX is on, UNLESS you have specified a value for 'inner_width' in BeginTable().
1048
1049
// - Mixing up columns with different sizing policy is possible BUT can be tricky and has some side-effects and restrictions.
1049
1050
// (their visible order and the scrolling state have subtle but necessary effects on how they can be manually resized).
1050
1051
// The typical use of mixing sizing policies is to have ScrollX disabled, one or two Stretch Column and many Fixed Columns.
@@ -1059,7 +1060,7 @@ enum ImGuiTableFlags_
1059
1060
ImGuiTableFlags_MultiSortable = 1 << 4, // Allow sorting on multiple columns by holding Shift (sort_specs_count may be > 1). Call TableGetSortSpecs() to obtain sort specs.
1060
1061
ImGuiTableFlags_NoSavedSettings = 1 << 5, // Disable persisting columns order, width and sort settings in the .ini file.
1061
1062
ImGuiTableFlags_ContextMenuInBody = 1 << 6, // Right-click on columns body/contents will display table context menu. By default it is available in TableHeadersRow().
1062
-
//Decoration
1063
+
//Decorations
1063
1064
ImGuiTableFlags_RowBg = 1 << 7, // Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent to calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually)
ImGuiTableFlags_BordersOuterH = 1 << 9, // Draw horizontal borders at the top and bottom.
@@ -1073,11 +1074,11 @@ enum ImGuiTableFlags_
1073
1074
ImGuiTableFlags_NoBordersInBody = 1 << 12, // Disable vertical borders in columns Body (borders will always appears in Headers).
1074
1075
ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 13, // Disable vertical borders in columns Body until hovered for resize (borders will always appears in Headers).
1075
1076
// Sizing
1076
-
ImGuiTableFlags_SizingPolicyFixedX = 1 << 14, // Default if ScrollX is on. Columns will default to use _WidthFixed or _WidthAlwaysAutoResize policy. Read description above for more details.
1077
+
ImGuiTableFlags_SizingPolicyFixedX = 1 << 14, // Default if ScrollX is on. Columns will default to use _WidthFixed or _WidthAutoResize policy. Read description above for more details.
1077
1078
ImGuiTableFlags_SizingPolicyStretchX = 1 << 15, // Default if ScrollX is off. Columns will default to use _WidthStretch policy. Read description above for more details.
ImGuiTableFlags_NoHostExtendY = 1 << 17, // (FIXME-TABLE: Reword as SizingPolicy?) Disable extending past the limit set by outer_size.y, only meaningful when neither of ScrollX|ScrollY are set (data below the limit will be clipped and not visible)
1080
-
ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18, // Disable keeping column always minimally visible when table width gets too small and ScrllX is off.
1081
+
ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18, // Disable keeping column always minimally visible when table width gets too small and ScrollX is off.
1081
1082
ImGuiTableFlags_PreciseStretchWidths = 1 << 19, // Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34. With this flag: 33,33,33). With larger number of columns, resizing will appear to be less smooth.
1082
1083
ImGuiTableFlags_NoClip = 1 << 20, // Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze().
1083
1084
// Padding
@@ -1099,9 +1100,9 @@ enum ImGuiTableColumnFlags_
1099
1100
ImGuiTableColumnFlags_None = 0,
1100
1101
ImGuiTableColumnFlags_DefaultHide = 1 << 0, // Default as a hidden column.
1101
1102
ImGuiTableColumnFlags_DefaultSort = 1 << 1, // Default as a sorting column.
1102
-
ImGuiTableColumnFlags_WidthFixed= 1 << 2, // Column will keep a fixed size, preferable with horizontal scrolling enabled (default if table sizing policy is SizingPolicyFixedX and table is resizable).
1103
-
ImGuiTableColumnFlags_WidthStretch = 1 << 3, // Column will stretch, preferable with horizontal scrolling disabled (default if table sizing policy is SizingPolicyStretchX).
1104
-
ImGuiTableColumnFlags_WidthAlwaysAutoResize = 1 << 4, // Column will keep resizing based on submitted contents (with a one frame delay) == Fixed with auto resize (default if table sizing policy is SizingPolicyFixedX and table is not resizable).
1103
+
ImGuiTableColumnFlags_WidthStretch = 1 << 2, // Column will stretch, preferable with horizontal scrolling disabled (default if table sizing policy is SizingPolicyStretchX).
1104
+
ImGuiTableColumnFlags_WidthFixed= 1 << 3, // Column will not stretch, preferable with horizontal scrolling enabled (default if table sizing policy is SizingPolicyFixedX and table is resizable).
1105
+
ImGuiTableColumnFlags_WidthAutoResize= 1 << 4, // Column will not stretch and keep resizing based on submitted contents (default if table sizing policy is SizingPolicyFixedX and table is not resizable).
ImGuiTableColumnFlags_NoDirectResize_ = 1 << 20// [Internal] Disable user resizing this column directly (it may however we resized indirectly from its left edge)
0 commit comments