ImGuiIDColumnUserID;// User id of the column (if specified by a TableSetupColumn() call)
ImGuiIDColumnUserID;// User id of the column (if specified by a TableSetupColumn() call)
ImU8 ColumnIndex;// Index of the column
ImS16ColumnIndex;// Index of the column
ImU8 SortOrder;// Index within parent ImGuiTableSortSpecs (always stored in order starting from 0, tables sorted on a single criteria will always have a 0 here)
ImS16SortOrder;// Index within parent ImGuiTableSortSpecs (always stored in order starting from 0, tables sorted on a single criteria will always have a 0 here)
ImGuiSortDirectionSortDirection:8;// ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending (you can use this or SortSign, whichever is more convenient for your sort function)
ImGuiSortDirectionSortDirection:8;// ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending (you can use this or SortSign, whichever is more convenient for your sort function)
#define IMGUI_TABLE_MAX_COLUMNS 64 // sizeof(ImU64) * 8. This is solely because we frequently encode columns set in a ImU64.
#define IMGUI_TABLE_MAX_COLUMNS 64 // sizeof(ImU64) * 8. This is solely because we frequently encode columns set in a ImU64.
#define IMGUI_TABLE_MAX_DRAW_CHANNELS (4 + 64 * 2) // See TableSetupDrawChannels()
#define IMGUI_TABLE_MAX_DRAW_CHANNELS (4 + 64 * 2) // See TableSetupDrawChannels()
// Our current column maximum is 64 but we may raise that in the future.
typedefImS8ImGuiTableColumnIdx;
typedefImU8ImGuiTableDrawChannelIdx;
// [Internal] sizeof() ~ 104
// [Internal] sizeof() ~ 104
// We use the terminology "Visible" to refer to a columns that are not Hidden by user or settings. However it may still be out of view and clipped (and IsClipped would be set).
// We use the terminology "Visible" to refer to a columns that are not Hidden by user or settings. However it may still be out of view and clipped (and IsClipped would be set).
// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped".
// This is in contrast with some user-facing api such as IsItemVisible() / IsRectVisible() which use "Visible" to mean "not clipped".
@ -1917,22 +1921,22 @@ struct ImGuiTableColumn
floatContentMaxXHeadersUsed;// Contents maximum position for headers rows (regardless of freezing). TableHeader() automatically softclip itself + report ideal desired size, to avoid creating extraneous draw calls
floatContentMaxXHeadersUsed;// Contents maximum position for headers rows (regardless of freezing). TableHeader() automatically softclip itself + report ideal desired size, to avoid creating extraneous draw calls
floatContentMaxXHeadersIdeal;
floatContentMaxXHeadersIdeal;
ImS16NameOffset;// Offset into parent ColumnsNames[]
ImS16NameOffset;// Offset into parent ColumnsNames[]
ImGuiTableColumnIdxDisplayOrder;// Index within Table's IndexToDisplayOrder[] (column may be reordered by users)
ImGuiTableColumnIdxIndexWithinEnabledSet;// Index within enabled/visible set (<= IndexToDisplayOrder)
ImGuiTableColumnIdxPrevEnabledColumn;// Index of prev enabled/visible column within Columns[], -1 if first enabled/visible column
ImGuiTableColumnIdxNextEnabledColumn;// Index of next enabled/visible column within Columns[], -1 if last enabled/visible column
ImGuiTableColumnIdxSortOrder;// Index of this column within sort specs, -1 if not sorting on this column, 0 for single-sort, may be >0 on multi-sort
ImGuiTableDrawChannelIdxDrawChannelCurrent;// Index within DrawSplitter.Channels[]
ImGuiTableDrawChannelIdxDrawChannelFrozen;
ImGuiTableDrawChannelIdxDrawChannelUnfrozen;
boolIsEnabled;// Is the column not marked Hidden by the user? (even if off view, e.g. clipped by scrolling).
boolIsEnabled;// Is the column not marked Hidden by the user? (even if off view, e.g. clipped by scrolling).
boolIsEnabledNextFrame;
boolIsEnabledNextFrame;
boolIsClipped;// Is not actually in view (e.g. not overlapping the host window clipping rectangle).
boolIsClipped;// Is not actually in view (e.g. not overlapping the host window clipping rectangle).
boolIsSkipItems;// Do we want item submissions to this column to be ignored early on.
boolIsSkipItems;// Do we want item submissions to this column to be ignored early on.
ImS8NavLayerCurrent;// ImGuiNavLayer in 1 byte
ImS8NavLayerCurrent;// ImGuiNavLayer in 1 byte
ImS8DisplayOrder;// Index within Table's IndexToDisplayOrder[] (column may be reordered by users)
ImS8IndexWithinEnabledSet;// Index within enabled/visible set (<= IndexToDisplayOrder)
ImS8PrevEnabledColumn;// Index of prev enabled/visible column within Columns[], -1 if first enabled/visible column
ImS8NextEnabledColumn;// Index of next enabled/visible column within Columns[], -1 if last enabled/visible column
ImS8SortOrder;// Index of this column within sort specs, -1 if not sorting on this column, 0 for single-sort, may be >0 on multi-sort
ImS8SortDirection;// ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending
ImS8SortDirection;// ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending
ImU8AutoFitQueue;// Queue of 8 values for the next 8 frames to request auto-fit
ImU8AutoFitQueue;// Queue of 8 values for the next 8 frames to request auto-fit
ImU8CannotSkipItemsQueue;// Queue of 8 values for the next 8 frames to disable Clipped/SkipItem
ImU8CannotSkipItemsQueue;// Queue of 8 values for the next 8 frames to disable Clipped/SkipItem
ImU8DrawChannelCurrent;// Index within DrawSplitter.Channels[]
ImU8DrawChannelFrozen;
ImU8DrawChannelUnfrozen;
ImGuiTableColumn()
ImGuiTableColumn()
{
{
@ -1952,8 +1956,8 @@ struct ImGuiTableColumn
// sizeof() ~ 6
// sizeof() ~ 6
structImGuiTableCellData
structImGuiTableCellData
{
{
ImU32BgColor;// Actual color
ImU32BgColor;// Actual color
ImS8 Column;// Column number
ImGuiTableColumnIdx Column;// Column number
};
};
structImGuiTable
structImGuiTable
@ -1962,7 +1966,7 @@ struct ImGuiTable
ImGuiTableFlagsFlags;
ImGuiTableFlagsFlags;
void*RawData;// Single allocation to hold Columns[], DisplayOrderToIndex[] and RowCellData[]
void*RawData;// Single allocation to hold Columns[], DisplayOrderToIndex[] and RowCellData[]
ImSpan<ImGuiTableColumn>Columns;// Point within RawData[]
ImSpan<ImGuiTableColumn>Columns;// Point within RawData[]
ImSpan<ImS8>DisplayOrderToIndex;// Point within RawData[]. Store display order of columns (when not reordered, the values are 0...Count-1)
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.
ImSpan<ImGuiTableCellData>RowCellData;// Point within RawData[]. Store cells background requests for current row.
ImU64EnabledMaskByIndex;// Column Index -> IsEnabled map (== not hidden by user/api) in a format adequate for iterating column without touching cold data
ImU64EnabledMaskByIndex;// Column Index -> IsEnabled map (== not hidden by user/api) in a format adequate for iterating column without touching cold data
ImDrawListSplitterDrawSplitter;// We carry our own ImDrawList splitter to allow recursion (FIXME: could be stored outside, worst case we need 1 splitter per recursing table)
ImDrawListSplitterDrawSplitter;// We carry our own ImDrawList splitter to allow recursion (FIXME: could be stored outside, worst case we need 1 splitter per recursing table)
ImVector<ImGuiTableSortSpecsColumn>SortSpecsData;// FIXME-OPT: Fixed-size array / small-vector pattern, optimize for single sort spec
ImVector<ImGuiTableSortSpecsColumn>SortSpecsData;// FIXME-OPT: Fixed-size array / small-vector pattern, optimize for single sort spec
ImGuiTableSortSpecsSortSpecs;// Public facing sorts specs, this is what we return in TableGetSortSpecs()
ImGuiTableSortSpecsSortSpecs;// Public facing sorts specs, this is what we return in TableGetSortSpecs()
ImS8 SortSpecsCount;
ImGuiTableColumnIdxSortSpecsCount;
ImS8 ColumnsEnabledCount;// Number of enabled columns (<= ColumnsCount)
ImGuiTableColumnIdxColumnsEnabledCount;// Number of enabled columns (<= ColumnsCount)
ImS8 ColumnsEnabledFixedCount;// Number of enabled columns (<= ColumnsCount)
ImGuiTableColumnIdxColumnsEnabledFixedCount;// Number of enabled columns (<= ColumnsCount)
ImS8 DeclColumnsCount;// Count calls to TableSetupColumn()
ImGuiTableColumnIdxDeclColumnsCount;// Count calls to TableSetupColumn()
ImS8 HoveredColumnBody;// Index of column whose visible region is being hovered. Important: == ColumnsCount when hovering empty region after the right-most column!
ImGuiTableColumnIdxHoveredColumnBody;// Index of column whose visible region is being hovered. Important: == ColumnsCount when hovering empty region after the right-most column!
ImS8 HoveredColumnBorder;// Index of column whose right-border is being hovered (for resizing).
ImGuiTableColumnIdxHoveredColumnBorder;// Index of column whose right-border is being hovered (for resizing).
ImS8 AutoFitSingleStretchColumn;// Index of single stretch column requesting auto-fit.
ImGuiTableColumnIdxAutoFitSingleStretchColumn;// Index of single stretch column requesting auto-fit.
ImS8 ResizedColumn;// Index of column being resized. Reset when InstanceCurrent==0.
ImGuiTableColumnIdxResizedColumn;// Index of column being resized. Reset when InstanceCurrent==0.
ImS8 LastResizedColumn;// Index of column being resized from previous frame.
ImGuiTableColumnIdxLastResizedColumn;// Index of column being resized from previous frame.
ImS8 HeldHeaderColumn;// Index of column header being held.
ImGuiTableColumnIdxHeldHeaderColumn;// Index of column header being held.
ImS8 ReorderColumn;// Index of column being reordered. (not cleared)
ImGuiTableColumnIdxReorderColumn;// Index of column being reordered. (not cleared)
ImS8 ReorderColumnDir;// -1 or +1
ImGuiTableColumnIdxReorderColumnDir;// -1 or +1
ImS8 RightMostEnabledColumn;// Index of right-most non-hidden column.
ImGuiTableColumnIdxRightMostEnabledColumn;// Index of right-most non-hidden column.
ImS8 LeftMostStretchedColumnDisplayOrder;// Display order of left-most stretched column.
ImGuiTableColumnIdxLeftMostStretchedColumnDisplayOrder;// Display order of left-most stretched column.
ImS8 ContextPopupColumn;// Column right-clicked on, of -1 if opening context menu from a neutral/empty spot
ImGuiTableColumnIdxContextPopupColumn;// Column right-clicked on, of -1 if opening context menu from a neutral/empty spot
ImU8 Bg1DrawChannelCurrent;// For Selectable() and other widgets drawing accross columns after the freezing line. Index within DrawSplitter.Channels[]
ImGuiTableDrawChannelIdxBg1DrawChannelCurrent;// For Selectable() and other widgets drawing accross columns after the freezing line. Index within DrawSplitter.Channels[]
ImU8 Bg1DrawChannelUnfrozen;
ImGuiTableDrawChannelIdxBg1DrawChannelUnfrozen;
boolIsLayoutLocked;// Set by TableUpdateLayout() which is called when beginning the first row.
boolIsLayoutLocked;// Set by TableUpdateLayout() which is called when beginning the first row.
boolIsInsideRow;// Set when inside TableBeginRow()/TableEndRow().
boolIsInsideRow;// Set when inside TableBeginRow()/TableEndRow().
boolIsInitializing;
boolIsInitializing;
@ -2064,14 +2068,14 @@ struct ImGuiTable
// sizeof() ~ 12
// sizeof() ~ 12
structImGuiTableColumnSettings
structImGuiTableColumnSettings
{
{
floatWidthOrWeight;
floatWidthOrWeight;
ImGuiIDUserID;
ImGuiIDUserID;
ImS8Index;
ImGuiTableColumnIdx Index;
ImS8DisplayOrder;
ImGuiTableColumnIdx DisplayOrder;
ImS8SortOrder;
ImGuiTableColumnIdx SortOrder;
ImU8SortDirection:2;
ImU8SortDirection:2;
ImU8IsEnabled:1;// "Visible" in ini file
ImU8IsEnabled:1;// "Visible" in ini file
ImU8IsStretch:1;
ImU8IsStretch:1;
ImGuiTableColumnSettings()
ImGuiTableColumnSettings()
{
{
@ -2091,8 +2095,8 @@ struct ImGuiTableSettings
ImGuiIDID;// Set to 0 to invalidate/delete the setting
ImGuiIDID;// Set to 0 to invalidate/delete the setting
ImGuiTableFlagsSaveFlags;// Indicate data we want to save using the Resizable/Reorderable/Sortable/Hideable flags (could be using its own flags..)
ImGuiTableFlagsSaveFlags;// Indicate data we want to save using the Resizable/Reorderable/Sortable/Hideable flags (could be using its own flags..)
floatRefScale;// Reference scale to be able to rescale columns on font/dpi changes.
floatRefScale;// Reference scale to be able to rescale columns on font/dpi changes.
ImS8 ColumnsCount;
ImGuiTableColumnIdxColumnsCount;
ImS8 ColumnsCountMax;// Maximum number of columns this settings instance can store, we can recycle a settings instance with lower number of columns but not higher
ImGuiTableColumnIdxColumnsCountMax;// Maximum number of columns this settings instance can store, we can recycle a settings instance with lower number of columns but not higher
boolWantApply;// Set when loaded from .ini data (to enable merging/loading .ini data into an already running context)
boolWantApply;// Set when loaded from .ini data (to enable merging/loading .ini data into an already running context)