IM_ASSERT(g.IO.KeyMap[n]>=-1&&g.IO.KeyMap[n]<ImGuiKey_LegacyNativeKey_END&&"io.KeyMap[] contains an out of bound value (need to be 0..511, or -1 for unmapped key)");
IM_ASSERT(g.IO.KeyMap[n]>=-1&&g.IO.KeyMap[n]<ImGuiKey_LegacyNativeKey_END&&"io.KeyMap[] contains an out of bound value (need to be 0..511, or -1 for unmapped key)");
// - Full-featured replacement for old Columns API.
// - Full-featured replacement for old Columns API.
// - See Demo->Tables for demo code.
// - See Demo->Tables for demo code. See top of imgui_tables.cpp for general commentary.
// - See top of imgui_tables.cpp for general commentary.
// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags.
// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags.
// The typical call flow is:
// The typical call flow is:
// - 1. Call BeginTable().
// - 1. Call BeginTable(), early out if returning false.
// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults.
// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults.
// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows.
// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows.
// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data.
// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data.
@ -745,16 +744,13 @@ namespace ImGui
IMGUI_APIvoidTableHeadersRow();// submit all headers cells based on data provided to TableSetupColumn() + submit context menu
IMGUI_APIvoidTableHeadersRow();// submit all headers cells based on data provided to TableSetupColumn() + submit context menu
IMGUI_APIvoidTableHeader(constchar*label);// submit one header cell manually (rarely used)
IMGUI_APIvoidTableHeader(constchar*label);// submit one header cell manually (rarely used)
// Tables: Sorting
// Tables: Sorting & Miscellaneous functions
// - Call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
// - When 'SpecsDirty == true' you should sort your data. It will be true when sorting specs have changed
// When 'sort_specs->SpecsDirty == true' you should sort your data. It will be true when sorting specs have
// since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting, else you may
// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
// wastefully sort your data every frame!
// 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().
IMGUI_APIImGuiTableSortSpecs*TableGetSortSpecs();// get latest sort specs for the table (NULL if not sorting).
// Tables: Miscellaneous functions
// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
IMGUI_APIImGuiTableSortSpecs*TableGetSortSpecs();// get latest sort specs for the table (NULL if not sorting). Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable().
IMGUI_APIintTableGetColumnCount();// return number of columns (value passed to BeginTable)
IMGUI_APIintTableGetColumnCount();// return number of columns (value passed to BeginTable)
IMGUI_APIintTableGetColumnIndex();// return current column index.
IMGUI_APIintTableGetColumnIndex();// return current column index.
IMGUI_APIintTableGetRowIndex();// return current row index.
IMGUI_APIintTableGetRowIndex();// return current row index.
@ -849,13 +845,15 @@ namespace ImGui
// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode.
// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode.
IMGUI_APIImGuiViewport*GetMainViewport();// return primary/default viewport. This can never be NULL.
IMGUI_APIImGuiViewport*GetMainViewport();// return primary/default viewport. This can never be NULL.
// Background/Foreground Draw Lists
IMGUI_APIImDrawList*GetBackgroundDrawList();// this draw list will be the first rendered one. Useful to quickly draw shapes/text behind dear imgui contents.
IMGUI_APIImDrawList*GetForegroundDrawList();// this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
// Miscellaneous Utilities
// Miscellaneous Utilities
IMGUI_APIboolIsRectVisible(constImVec2&size);// test if rectangle (of given size, starting from cursor position) is visible / not clipped.
IMGUI_APIboolIsRectVisible(constImVec2&size);// test if rectangle (of given size, starting from cursor position) is visible / not clipped.
IMGUI_APIboolIsRectVisible(constImVec2&rect_min,constImVec2&rect_max);// test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.
IMGUI_APIboolIsRectVisible(constImVec2&rect_min,constImVec2&rect_max);// test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.
IMGUI_APIdoubleGetTime();// get global imgui time. incremented by io.DeltaTime every frame.
IMGUI_APIdoubleGetTime();// get global imgui time. incremented by io.DeltaTime every frame.
IMGUI_APIintGetFrameCount();// get global imgui frame count. incremented by 1 every frame.
IMGUI_APIintGetFrameCount();// get global imgui frame count. incremented by 1 every frame.
IMGUI_APIImDrawList*GetBackgroundDrawList();// this draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
IMGUI_APIImDrawList*GetForegroundDrawList();// this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
IMGUI_APIImDrawListSharedData*GetDrawListSharedData();// you may use this when creating your own ImDrawList instances.
IMGUI_APIImDrawListSharedData*GetDrawListSharedData();// you may use this when creating your own ImDrawList instances.
IMGUI_APIconstchar*GetStyleColorName(ImGuiColidx);// get a string corresponding to the enum value (for display, saving, etc.).
IMGUI_APIconstchar*GetStyleColorName(ImGuiColidx);// get a string corresponding to the enum value (for display, saving, etc.).
IMGUI_APIvoidSetStateStorage(ImGuiStorage*storage);// replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it)
IMGUI_APIvoidSetStateStorage(ImGuiStorage*storage);// replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it)
staticinlineImGuiIDImHash(constvoid*data,intsize,ImU32seed=0){returnsize?ImHashData(data,(size_t)size,seed):ImHashStr((constchar*)data,0,seed);}// [moved to ImHashStr/ImHashData in 1.68]
#endif
// Helpers: Sorting
// Helpers: Sorting
#ifndef ImQsort
#ifndef ImQsort
@ -314,7 +312,7 @@ static inline bool ImIsPowerOfTwo(int v) { return v != 0 && (v &