IMGUI_APIvoidEndTable();// only call EndTable() if BeginTable() returns true!
@ -678,14 +680,14 @@ namespace ImGui
IMGUI_APIboolTableNextCell();// append into the next column (next column, or next row if currently in last column). Return true if column is visible.
IMGUI_APIboolTableSetColumnIndex(intcolumn_n);// append into the specified column. Return true if column is visible.
IMGUI_APIintTableGetColumnIndex();// return current column index.
IMGUI_APIconstchar*TableGetColumnName(intcolumn_n=-1);// return NULL if column didn't have a name declared by TableSetupColumn(). Use pass -1 to use current column.
IMGUI_APIboolTableGetColumnIsVisible(intcolumn_n=-1);// return true if column is visible. Same value is also returned by TableNextCell() and TableSetColumnIndex(). Use pass -1 to use current column.
IMGUI_APIboolTableGetColumnIsSorted(intcolumn_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). Use pass -1 to use current column.
IMGUI_APIconstchar*TableGetColumnName(intcolumn_n=-1);// return NULL if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column.
IMGUI_APIboolTableGetColumnIsVisible(intcolumn_n=-1);// return true if column is visible. Same value is also returned by TableNextCell() and TableSetColumnIndex(). Pass -1 to use current column.
IMGUI_APIboolTableGetColumnIsSorted(intcolumn_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.
// Tables: Headers & Columns declaration
// - Use TableSetupColumn() to specify resizing policy, default width, name, id, specific flags etc.
// - Use TableSetupColumn() to specify label, resizing policy, default width, id, various other flags etc.
// - The name passed to TableSetupColumn() is used by TableAutoHeaders() and by the context-menu
// - Use TableAutoHeaders() to submit the whole header row, otherwise you may treat the header row as a regular row, manually call TableHeader() and other widgets.
// - Headers are required to perform some interactions: reordering, sorting, context menu // FIXME-TABLES: remove context from this list!
// - Headers are required to perform some interactions: reordering, sorting, context menu // FIXME-TABLE: remove context from this list!
IMGUI_APIvoidTableAutoHeaders();// submit all headers cells based on data provided to TableSetupColumn() + submit context menu
IMGUI_APIvoidTableHeader(constchar*label);// submit one header cell manually.
@ -1005,6 +1007,10 @@ enum ImGuiTabItemFlags_
};
// Flags for ImGui::BeginTable()
// - Columns can either varying resizing policy: "Fixed", "Stretch" or "AlwaysAutoResize". Toggling ScrollX needs to alter default sizing policy.
// - Sizing policy have many subtle side effects which may be hard to fully comprehend at first.. They'll eventually make sense.
// - with SizingPolicyFixedX (default is ScrollX is on): Columns can be enlarged as needed. Enable scrollbar if ScrollX is enabled, otherwise extend parent window's contents rect. Only Fixed columns allowed. Weighted columns will calculate their width assuming no scrolling.
// - with SizingPolicyStretchX (default is ScrollX is off): Fit all columns within available table width (so it doesn't make sense to use ScrollX with Stretch columns!). Fixed and Weighted columns allowed.
enumImGuiTableFlags_
{
// Features
@ -1023,26 +1029,26 @@ enum ImGuiTableFlags_
ImGuiTableFlags_BordersFullHeight=1<<10,// Borders covers all lines even when Headers are being used, allow resizing all rows.
ImGuiTableFlags_NoClipX=1<<12,// Disable pushing clipping rectangle for every individual columns (reduce draw command count, items with be able to overflow)
ImGuiTableFlags_SizingPolicyStretchX=1<<13,// (Default if ScrollX is off) Columns will default to use ImGuiTableColumnFlags_WidthStretch. Fit all columns within available width. Fixed and Weighted columns allowed.
ImGuiTableFlags_SizingPolicyFixedX=1<<14,// (Default if ScrollX is on) Columns will default to use ImGuiTableColumnFlags_WidthFixed or WidthAuto. Enlarge as needed: enable scrollbar if ScrollX is enabled, otherwise extend parent window's contents rect. Only Fixed columns allowed. Weighted columns will calculate their width assuming no scrolling.
ImGuiTableFlags_NoHeadersWidth=1<<15,// Disable header width contribute to automatic width calculation for every columns.
ImGuiTableFlags_NoClipX=1<<12,// Disable pushing clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow)
ImGuiTableFlags_SizingPolicyFixedX=1<<13,// Default if ScrollX is on. Columns will default to use WidthFixed or WidthAlwaysAutoResize policy. Read description above for more details.
ImGuiTableFlags_SizingPolicyStretchX=1<<14,// Default if ScrollX is off. Columns will default to use WidthStretch policy. Read description above for more details.
ImGuiTableFlags_NoHeadersWidth=1<<15,// Disable header width contribution to automatic width calculation.
ImGuiTableFlags_NoHostExtendY=1<<16,// (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)
// Scrolling
ImGuiTableFlags_ScrollX=1<<17,// 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_ScrollY=1<<18,// Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size.
ImGuiTableColumnFlags_NoDirectResize_=1<<20// [Internal] Disable user resizing this column directly (it may however we resized indirectly from its left edge)