IMGUI_APIvoidNextColumn();// next column, defaults to current row or next row if the current row is finished
IMGUI_APIintGetColumnIndex();// get current column index
IMGUI_APIfloatGetColumnWidth(intcolumn_index=-1);// get column width (in pixels). pass -1 to use current column
IMGUI_APIvoidSetColumnWidth(intcolumn_index,floatwidth);// set column width (in pixels). pass -1 to use current column
IMGUI_APIfloatGetColumnOffset(intcolumn_index=-1);// get position of column line (in pixels, from the left side of the contents region). pass -1 to use current column, otherwise 0..GetColumnsCount() inclusive. column 0 is typically 0.0f
IMGUI_APIvoidSetColumnOffset(intcolumn_index,floatoffset_x);// set position of column line (in pixels, from the left side of the contents region). pass -1 to use current column
IMGUI_APIintGetColumnsCount();
// Tables
// [ALPHA API] API will evolve! (FIXME-TABLE)
// [ALPHA API] API will evolve! (see: FIXME-TABLE)
// - Full-featured replacement for old Columns API
// - In most situations you can use TableNextRow() + TableSetColumnIndex() to populate a table.
// - If you are using tables as a sort of grid, populating every columns with the same type of contents,
// you may prefer using TableNextCell() instead of TableNextRow() + TableSetColumnIndex().
// - See Demo->Tables for details.
// - See ImGuiTableFlags_ and ImGuiTableColumnsFlags_ enums for a description of available flags.
// The typical call flow is:
// - 1. Call BeginTable()
// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults
// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows
// - 4. Optionally call TableAutoHeaders() to submit a header row (names will be pulled from data submitted to TableSetupColumns)
// - 4. Populate contents
// - In most situations you can use TableNextRow() + TableSetColumnIndex() to start appending into a column.
// - If you are using tables as a sort of grid, where every columns is holding the same type of contents,
// you may prefer using TableNextCell() instead of TableNextRow() + TableSetColumnIndex().
// - Submit your content with regular ImGui function.
IMGUI_APIvoidEndTable();// only call EndTable() if BeginTable() returns true!
@ -681,26 +675,40 @@ 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(). 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.
IMGUI_APIintTableGetHoveredColumn();// return hovered column. return -1 when table is not hovered. return columns_count if the unused space at the right of visible columns is hovered.
IMGUI_APIvoidTableSetBgColor(ImGuiTableBgTargetbg_target,ImU32color,intcolumn_n=-1);// change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details.
// Tables: Headers & Columns declaration
// - Use TableSetupScrollFreeze() to lock columns (from the right) or rows (from the top) so they stay visible when scrolled.
// - Use TableSetupColumn() to specify label, resizing policy, default width, id, various other flags etc.
// Important: this will not display anything! The name passed to TableSetupColumn() is used by TableAutoHeaders() and context-menus.
// - Use TableAutoHeaders() 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!)
// - 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).
IMGUI_APIvoidTableAutoHeaders();// submit all headers cells based on data provided to TableSetupColumn() + submit context menu
IMGUI_APIvoidTableHeader(constchar*label);// submit one header cell manually (rarely used)
// Tables: Sorting
// - Call TableGetSortSpecs() to retrieve latest sort specs for the table. Return value will be NULL if no sorting.
// - When 'SpecsDirty == true' you can sort your data. It will be true with sorting specs have changed since last call, or the first time.
// Tables: Miscellaneous functions
// - Most functions taking 'int column_n' treat the default value of -1 as the same as passing the current column index
// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. Return value will be NULL if no sorting.
// When 'SpecsDirty == true' you should sort your data. It will be true when sorting specs have changed since last call, or the first time.
// Make sure to set 'SpecsDirty = false' after sorting, else you may wastefully sort your data every frame!
// - Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable()!
// Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable().
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.
IMGUI_APIintTableGetHoveredColumn();// return hovered column. return -1 when table is not hovered. return columns_count if the unused space at the right of visible columns is hovered.
IMGUI_APIImGuiTableSortSpecs*TableGetSortSpecs();// get latest sort specs for the table (NULL if not sorting).
IMGUI_APIvoidTableSetBgColor(ImGuiTableBgTargetbg_target,ImU32color,intcolumn_n=-1);// change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details.
// Columns (Legacy API, prefer using Tables)
// - You can also use SameLine(pos_x) to mimic simplified columns.
IMGUI_APIvoidNextColumn();// next column, defaults to current row or next row if the current row is finished
IMGUI_APIintGetColumnIndex();// get current column index
IMGUI_APIfloatGetColumnWidth(intcolumn_index=-1);// get column width (in pixels). pass -1 to use current column
IMGUI_APIvoidSetColumnWidth(intcolumn_index,floatwidth);// set column width (in pixels). pass -1 to use current column
IMGUI_APIfloatGetColumnOffset(intcolumn_index=-1);// get position of column line (in pixels, from the left side of the contents region). pass -1 to use current column, otherwise 0..GetColumnsCount() inclusive. column 0 is typically 0.0f
IMGUI_APIvoidSetColumnOffset(intcolumn_index,floatoffset_x);// set position of column line (in pixels, from the left side of the contents region). pass -1 to use current column
IMGUI_APIintGetColumnsCount();
// Tab Bars, Tabs
IMGUI_APIboolBeginTabBar(constchar*str_id,ImGuiTabBarFlagsflags=0);// create and append into a TabBar
@ -1062,19 +1070,9 @@ enum ImGuiTableFlags_
ImGuiTableFlags_ScrollX=1<<20,// 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<<21,// Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size.
HelpMarker("Here we activate ScrollY, which will create a child window container to allow hosting scrollable contents.\n\nWe also demonstrate using ImGuiListClipper to virtualize the submission of many items.");
HelpMarker("When ScrollX is enabled, the default sizing policy becomes ImGuiTableFlags_SizingPolicyFixedX, as automatically stretching columns doesn't make much sense with horizontal scrolling.\n\nAlso note that as of the current version, you will almost always want to enable ScrollY along with ScrollX, because the container window won't automatically extend vertically to fix contents (this may be improved in future versions).");
ImGui::TableSetupColumn("Line #",ImGuiTableColumnFlags_NoHide);// Make the first column not hideable to match our use of ImGuiTableFlags_ScrollFreezeLeftColumn
// | - TableSetColumnWidth() - apply resizing width (for mouse resize, often requested by previous frame)
// | - TableUpdateColumnsWeightFromWidth()- recompute columns weights (of stretch columns) from their respective width
// - TableSetupColumn() user submit columns details (optional)
// - TableSetupScrollFreeze() user submit scroll freeze information (optional)
// - TableUpdateLayout() [Internal] automatically called by the FIRST call to TableNextRow() or Table*Header(): lock all widths, columns positions, clipping rectangles