ImGuiTableFlags_Reorderable=1<<1,// Allow reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers)
ImGuiTableFlags_Hideable=1<<2,// Allow hiding columns in context menu.
ImGuiTableFlags_Hideable=1<<2,// Allow hiding/disabling 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_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.
@ -1095,14 +1095,14 @@ enum ImGuiTableFlags_
enumImGuiTableColumnFlags_
{
ImGuiTableColumnFlags_None=0,
ImGuiTableColumnFlags_DefaultHide=1<<0,// Default as a hidden column.
ImGuiTableColumnFlags_DefaultHide=1<<0,// Default as a hidden/disabled column.
ImGuiTableColumnFlags_DefaultSort=1<<1,// Default as a sorting column.
ImGuiTableColumnFlags_WidthStretch=1<<2,// Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is _ColumnsWidthStretch).
ImGuiTableColumnFlags_WidthFixed=1<<3,// Column will not stretch. Preferable with horizontal scrolling enabled (default if table sizing policy is _ColumnsWidthFixed and table is resizable).
ImGuiTableColumnFlags_WidthAutoResize=1<<4,// Column will not stretch and keep resizing based on submitted contents (default if table sizing policy is _ColumnsWidthFixed and table is not resizable).
boolIsEnabled;// Is the column not marked Hidden by the user? (even if off view, e.g. clipped by scrolling).
boolIsEnabledNextFrame;
boolIsClipped;// Is not actually in view (e.g. not overlapping the host window clipping rectangle).
boolIsVisibleX;// Is actually in view (e.g. overlapping the host window clipping rectangle, not scrolled).
boolIsVisibleY;
boolIsRequestOutput;// Return value for TableSetColumnIndex() / TableNextColumn(): whether we request user to output contents or not.
boolIsSkipItems;// Do we want item submissions to this column to be completely ignored (no layout will happen).
ImS8NavLayerCurrent;// ImGuiNavLayer in 1 byte
ImS8SortDirection;// ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending
@ -1971,8 +1973,9 @@ struct ImGuiTable
ImSpan<ImGuiTableColumnIdx>DisplayOrderToIndex;// Point within RawData[]. Store display order of columns (when not reordered, the values are 0...Count-1)
ImSpan<ImGuiTableCellData>RowCellData;// Point within RawData[]. Store cells background requests for current row.
ImU64EnabledUnclippedMaskByIndex;// Enabled and not Clipped, aka "actually visible" "not hidden by some scrolling"
ImU64EnabledMaskByIndex;// Column Index -> IsEnabled map (== not hidden by user/api) in a format adequate for iterating column without touching cold data
ImU64VisibleMaskByIndex;// Column Index -> IsVisibleX|IsVisibleY map (== not hidden by user/api && not hidden by scrolling/cliprect)
ImU64RequestOutputMaskByIndex;// Column Index -> IsVisible || AutoFit (== expect user to submit items)
ImGuiTableFlagsSettingsLoadedFlags;// Which data were loaded from the .ini file (e.g. when order is not altered we won't save order)
IMGUI_APIboolTableGetColumnIsEnabled(intcolumn_n=-1);// Return false when column is disabled (hidden) by user (e.g. via context menu, or _DefaultHide flag)
IMGUI_APIboolTableGetColumnIsEnabled(intcolumn_n=-1);// Return false when column is disabled (hidden by user/api, e.g. via context menu, or _DefaultHide flag)
// (Read carefully because this is subtle but it does make sense!)
// About 'outer_size', its meaning needs to differ slightly depending of if we are using ScrollX/ScrollY flags:
// X:
// - outer_size.x < 0.0f -> right align from window/work-rect maximum x edge.
// - outer_size.x = 0.0f -> auto enlarge, use all available space.
// - outer_size.x > 0.0f -> fixed width
// Y with ScrollX/ScrollY: using a child window for scrolling:
// - outer_size.y < 0.0f -> bottom align
// - outer_size.y = 0.0f -> bottom align, consistent with BeginChild(). not recommended unless table is last item in parent window.
// - outer_size.y > 0.0f -> fixed child height. recommended when using Scrolling on any axis.
// Y without scrolling, we output table directly in parent window:
// - outer_size.y < 0.0f -> bottom align (will auto extend, unless NoHostExtendV is set)
// - outer_size.y = 0.0f -> zero minimum height (will auto extend, unless NoHostExtendV is set)
// - outer_size.y > 0.0f -> minimum height (will auto extend, unless NoHostExtendV is set)
// About 'inner_width':
// With ScrollX:
// - inner_width < 0.0f -> *illegal* fit in known width (right align from outer_size.x) <-- weird
// - inner_width = 0.0f -> fit in outer_width: Fixed size columns will take space they need (if avail, otherwise shrink down), Stretch columns becomes Fixed columns.
// - inner_width > 0.0f -> override scrolling width, generally to be larger than outer_size.x. Fixed column take space they need (if avail, otherwise shrink down), Stretch columns share remaining space!
// Without ScrollX:
// - inner_width -> *ignored*
// Details:
// - If you want to use Stretch columns with ScrollX, you generally need to specify 'inner_width' otherwise the concept
// of "available space" doesn't make sense.
// - Even if not really useful, we allow 'inner_width < outer_size.x' for consistency and to facilitate understanding
// - Case A: column is not hidden by user, and at least partially in sight (most common case).
// - Case B: column is clipped / out of sight (because of scrolling or parent ClipRect): TableNextColumn() return false as a hint but we still allow layout output.
// - Case C: column is hidden explicitly by the user (e.g. via the context menu, or _DefaultHide column flag, etc.).
//
// [A] [B] [C]
// TableNextColumn(): true false false -> [userland] when TableNextColumn() / TableSetColumnIndex() return false, user can skip submitting items but only if the column doesn't contribute to row height.
// SkipItems: false false true -> [internal] when SkipItems is true, most widgets will early out if submitted, resulting is no layout output.
// ClipRect: normal zero-width zero-width -> [internal] when ClipRect is zero, ItemAdd() will return false and most widgets will early out mid-way.
// ImDrawList output: normal dummy dummy -> [internal] when using the dummy channel, ImDrawList submissions (if any) will be wasted (because cliprect is zero-width anyway).
//
// - We need distinguish those cases because non-hidden columns that are clipped outside of scrolling bounds should still contribute their height to the row.
// However, in the majority of cases, the contribution to row height is the same for all columns, or the tallest cells are known by the programmer.
// (Read carefully because this is subtle but it does make sense!)
// About 'outer_size', its meaning needs to differ slightly depending of if we are using ScrollX/ScrollY flags:
// X:
// - outer_size.x < 0.0f -> right align from window/work-rect maximum x edge.
// - outer_size.x = 0.0f -> auto enlarge, use all available space.
// - outer_size.x > 0.0f -> fixed width
// Y with ScrollX/ScrollY: using a child window for scrolling:
// - outer_size.y < 0.0f -> bottom align
// - outer_size.y = 0.0f -> bottom align, consistent with BeginChild(). not recommended unless table is last item in parent window.
// - outer_size.y > 0.0f -> fixed child height. recommended when using Scrolling on any axis.
// Y without scrolling, we output table directly in parent window:
// - outer_size.y < 0.0f -> bottom align (will auto extend, unless NoHostExtendV is set)
// - outer_size.y = 0.0f -> zero minimum height (will auto extend, unless NoHostExtendV is set)
// - outer_size.y > 0.0f -> minimum height (will auto extend, unless NoHostExtendV is set)
// About 'inner_width':
// With ScrollX:
// - inner_width < 0.0f -> *illegal* fit in known width (right align from outer_size.x) <-- weird
// - inner_width = 0.0f -> fit in outer_width: Fixed size columns will take space they need (if avail, otherwise shrink down), Stretch columns becomes Fixed columns.
// - inner_width > 0.0f -> override scrolling width, generally to be larger than outer_size.x. Fixed column take space they need (if avail, otherwise shrink down), Stretch columns share remaining space!
// Without ScrollX:
// - inner_width -> *ignored*
// Details:
// - If you want to use Stretch columns with ScrollX, you generally need to specify 'inner_width' otherwise the concept
// of "available space" doesn't make sense.
// - Even if not really useful, we allow 'inner_width < outer_size.x' for consistency and to facilitate understanding
table->EnabledUnclippedMaskByIndex&=~((ImU64)1<<column_n);// Columns with the _WidthAutoResize sizing policy will never be updated then.
// Mark column as Clipped (not in sight)
// Note that scrolling tables (where inner_window != outer_window) handle Y clipped earlier in BeginTable() so IsVisibleY really only applies to non-scrolling tables.
// FIXME-TABLE: Because InnerClipRect.Max.y is conservatively ==outer_window->ClipRect.Max.y, we never can mark columns _Above_ the scroll line as not IsVisibleY.
// Taking advantage of LastOuterHeight would yield good results there...
// FIXME-TABLE: IsVisible == false is disabled because it effectively means not submitting will reduces contents width which is fed to outer_window->DC.CursorMaxPos.x,
// and this may be used (e.g. typically by outer_window using AlwaysAutoResize or outer_window's horizontal scrollbar, but could be something else).
// Possible solution to preserve last known content width for clipped column. Test 'table_reported_size' fails when enabling Y clipping and window is resized small.