Tables: Tidy up comments. Replaced some Columns by Tables in demo. Removed ImGuiTableFlags_Scroll (combining ScrollX/ScrollY) because each axis inccur different requirements/constraints.
window->DC.CursorPosPrevLine.y=window->DC.CursorPos.y-line_height;// Setting those fields so that SetScrollHereY() can properly function after the end of our clipper usage.
window->DC.CursorPosPrevLine.y=window->DC.CursorPos.y-line_height;// Setting those fields so that SetScrollHereY() can properly function after the end of our clipper usage.
window->DC.PrevLineSize.y=(line_height-g.Style.ItemSpacing.y);// If we end up needing more accurate data (to e.g. use SameLine) we may as well make the clipper have a fourth step to let user process and display the last item in their list.
window->DC.PrevLineSize.y=(line_height-g.Style.ItemSpacing.y);// If we end up needing more accurate data (to e.g. use SameLine) we may as well make the clipper have a fourth step to let user process and display the last item in their list.
// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc.
// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc.
// Important: this will not display anything! The name passed to TableSetupColumn() is used by TableHeadersRow() and context-menus.
// Important: this will not display anything! The name passed to TableSetupColumn() is used by TableHeadersRow() and context-menus.
// - Use TableHeadersRow() to create a row and automatically submit a TableHeader() for each column.
// - Use TableHeadersRow() to create a row and automatically submit a TableHeader() for each column.
// Headers are required to perform some interactions: reordering, sorting, context menu (FIXME-TABLE: context menu should work without!)
// Headers are required to perform: reordering, sorting, and opening the context menu (but context menu can also be available in columns body using ImGuiTableFlags_ContextMenuInBody).
// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in some advanced cases (e.g. adding custom widgets in header row).
// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in some advanced cases (e.g. adding custom widgets in header row).
// - Use TableSetupScrollFreeze() to lock columns (from the right) or rows (from the top) so they stay visible when scrolled.
// - Use TableSetupScrollFreeze() to lock columns (from the right) or rows (from the top) so they stay visible when scrolled.
ImGuiTableFlags_Reorderable=1<<1,// Allow reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers)
ImGuiTableFlags_Hideable=1<<2,// Allow hiding columns (with right-click on header) (FIXME-TABLE: allow without headers).
ImGuiTableFlags_Hideable=1<<2,// Allow hiding columns in context menu.
ImGuiTableFlags_Sortable=1<<3,// Allow sorting on one column (sort_specs_count will always be == 1). Call TableGetSortSpecs() to obtain sort specs.
ImGuiTableFlags_Sortable=1<<3,// Allow sorting on one column (sort_specs_count will always be == 1). Call TableGetSortSpecs() to obtain sort specs.
ImGuiTableFlags_MultiSortable=1<<4,// Allow sorting on multiple columns by holding Shift (sort_specs_count may be > 1). Call TableGetSortSpecs() to obtain sort specs.
ImGuiTableFlags_MultiSortable=1<<4,// Allow sorting on multiple columns by holding Shift (sort_specs_count may be > 1). Call TableGetSortSpecs() to obtain sort specs.
ImGuiTableFlags_NoSavedSettings=1<<5,// Disable persisting columns order, width and sort settings in the .ini file.
ImGuiTableFlags_NoSavedSettings=1<<5,// Disable persisting columns order, width and sort settings in the .ini file.
@ -1075,16 +1075,15 @@ enum ImGuiTableFlags_
ImGuiTableFlags_SizingPolicyStretchX=1<<15,// Default if ScrollX is off. Columns will default to use _WidthStretch policy. Read description above for more details.
ImGuiTableFlags_SizingPolicyStretchX=1<<15,// Default if ScrollX is off. Columns will default to use _WidthStretch policy. Read description above for more details.
ImGuiTableFlags_NoHeadersWidth=1<<16,// Disable header width contribution to automatic width calculation.
ImGuiTableFlags_NoHeadersWidth=1<<16,// Disable header width contribution to automatic width calculation.
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)
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)
ImGuiTableFlags_NoKeepColumnsVisible=1<<18,// (FIXME-TABLE) Disable code that keeps column always minimally visible when table width gets too small and horizontal scrolling is off.
ImGuiTableFlags_NoKeepColumnsVisible=1<<18,// Disable keeping column always minimally visible when table width gets too small and horizontal scrolling is off.
ImGuiTableFlags_NoClip=1<<19,// Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze().
ImGuiTableFlags_NoClip=1<<19,// Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze().
// Padding
// Padding
ImGuiTableFlags_PadOuterX=1<<20,// Default if BordersOuterV is on. Enable outer-most padding.
ImGuiTableFlags_PadOuterX=1<<20,// Default if BordersOuterV is on. Enable outer-most padding.
ImGuiTableFlags_NoPadOuterX=1<<21,// Default if BordersOuterV is off. Disable outer-most padding.
ImGuiTableFlags_NoPadOuterX=1<<21,// Default if BordersOuterV is off. Disable outer-most padding.
ImGuiTableFlags_NoPadInnerX=1<<22,// Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off).
ImGuiTableFlags_NoPadInnerX=1<<22,// Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off).
// Scrolling
// Scrolling
ImGuiTableFlags_ScrollX=1<<23,// Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Because this create a child window, ScrollY is currently generally recommended when using ScrollX.
ImGuiTableFlags_ScrollX=1<<23,// Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this create a child window, ScrollY is currently generally recommended when using ScrollX.
ImGuiTableFlags_ScrollY=1<<24,// Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size.
ImGuiTableFlags_ScrollY=1<<24,// Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size.
//ImGui::CheckboxFlags("ImGuiTableFlags_ScrollX", (unsigned int*)&flags, ImGuiTableFlags_ScrollX); // FIXME-TABLE: Explain or fix the effect of enable Scroll on outer_size
//ImGui::CheckboxFlags("ImGuiTableFlags_ScrollX", (unsigned int*)&flags, ImGuiTableFlags_ScrollX); // FIXME-TABLE: Explain or fix the effect of enable Scroll on outer_size
HelpMarker("This section allows you to interact and see the effect of StretchX vs FixedX sizing policies depending on whether Scroll is enabled and the contents of your columns.");
HelpMarker("This section allows you to interact and see the effect of StretchX vs FixedX sizing policies depending on whether Scroll is enabled and the contents of your columns.");