|
@@ -36,10 +36,11 @@ Index of this file:
|
|
|
// [SECTION] Forward declarations and basic types
|
|
|
// [SECTION] Dear ImGui end-user API functions
|
|
|
// [SECTION] Flags & Enumerations
|
|
|
+// [SECTION] Tables API flags and structures (ImGuiTableFlags, ImGuiTableColumnFlags, ImGuiTableRowFlags, ImGuiTableBgTarget, ImGuiTableSortSpecs, ImGuiTableColumnSortSpecs)
|
|
|
// [SECTION] Helpers: Memory allocations macros, ImVector<>
|
|
|
// [SECTION] ImGuiStyle
|
|
|
// [SECTION] ImGuiIO
|
|
|
-// [SECTION] Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiWindowClass, ImGuiPayload, ImGuiTableSortSpecs, ImGuiTableColumnSortSpecs)
|
|
|
+// [SECTION] Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiWindowClass, ImGuiPayload)
|
|
|
// [SECTION] Helpers (ImGuiOnceUponAFrame, ImGuiTextFilter, ImGuiTextBuffer, ImGuiStorage, ImGuiListClipper, Math Operators, ImColor)
|
|
|
// [SECTION] Drawing API (ImDrawCallback, ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawFlags, ImDrawListFlags, ImDrawList, ImDrawData)
|
|
|
// [SECTION] Font API (ImFontConfig, ImFontGlyph, ImFontGlyphRangesBuilder, ImFontAtlasFlags, ImFontAtlas, ImFont)
|
|
@@ -187,7 +188,7 @@ typedef int ImGuiSortDirection; // -> enum ImGuiSortDirection_ // Enum: A
|
|
|
typedef int ImGuiStyleVar; // -> enum ImGuiStyleVar_ // Enum: A variable identifier for styling
|
|
|
typedef int ImGuiTableBgTarget; // -> enum ImGuiTableBgTarget_ // Enum: A color target for TableSetBgColor()
|
|
|
|
|
|
-// Flags (declared as int for compatibility with old C++, to allow using as flags without overhead, and to not pollute the top of this file)
|
|
|
+// Flags (declared as int to allow using as flags without overhead, and to not pollute the top of this file)
|
|
|
// - Tip: Use your programming IDE navigation facilities on the names in the _central column_ below to find the actual flags/enum lists!
|
|
|
// In Visual Studio IDE: CTRL+comma ("Edit.GoToAll") can follow symbols in comments, whereas CTRL+F12 ("Edit.GoToImplementation") cannot.
|
|
|
// With Visual Assist installed: ALT+G ("VAssistX.GoToImplementation") can also follow symbols in comments.
|
|
@@ -205,7 +206,7 @@ typedef int ImGuiDragDropFlags; // -> enum ImGuiDragDropFlags_ // Flags: f
|
|
|
typedef int ImGuiFocusedFlags; // -> enum ImGuiFocusedFlags_ // Flags: for IsWindowFocused()
|
|
|
typedef int ImGuiHoveredFlags; // -> enum ImGuiHoveredFlags_ // Flags: for IsItemHovered(), IsWindowHovered() etc.
|
|
|
typedef int ImGuiInputTextFlags; // -> enum ImGuiInputTextFlags_ // Flags: for InputText(), InputTextMultiline()
|
|
|
-typedef int ImGuiKeyChord; // -> ImGuiKey | ImGuiMod_XXX // Flags: for storage only for now: an ImGuiKey optionally OR-ed with one or more ImGuiMod_XXX values.
|
|
|
+typedef int ImGuiKeyChord; // -> ImGuiKey | ImGuiMod_XXX // Flags: for IsKeyChordPressed(), Shortcut() etc. an ImGuiKey optionally OR-ed with one or more ImGuiMod_XXX values.
|
|
|
typedef int ImGuiPopupFlags; // -> enum ImGuiPopupFlags_ // Flags: for OpenPopup*(), BeginPopupContext*(), IsPopupOpen()
|
|
|
typedef int ImGuiSelectableFlags; // -> enum ImGuiSelectableFlags_ // Flags: for Selectable()
|
|
|
typedef int ImGuiSliderFlags; // -> enum ImGuiSliderFlags_ // Flags: for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
|
|
@@ -540,8 +541,8 @@ namespace ImGui
|
|
|
|
|
|
// Widgets: Images
|
|
|
// - Read about ImTextureID here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
|
|
|
- // - Note that ImageButton() adds style.FramePadding*2.0f to provided size. This is in order to facilitate fitting an image in a button.
|
|
|
- IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1), const ImVec4& border_col = ImVec4(0, 0, 0, 0));
|
|
|
+ // - Note that Image() may add +2.0f to provided size if a border is visible, ImageButton() adds style.FramePadding*2.0f to provided size.
|
|
|
+ IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1), const ImVec4& border_col = ImVec4(0, 0, 0, 0));
|
|
|
IMGUI_API bool ImageButton(const char* str_id, ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1));
|
|
|
|
|
|
// Widgets: Combo Box (Dropdown)
|
|
@@ -639,9 +640,9 @@ namespace ImGui
|
|
|
IMGUI_API bool TreeNodeEx(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3);
|
|
|
IMGUI_API bool TreeNodeExV(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args) IM_FMTLIST(3);
|
|
|
IMGUI_API bool TreeNodeExV(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args) IM_FMTLIST(3);
|
|
|
- IMGUI_API void TreePush(const char* str_id); // ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
|
|
|
+ IMGUI_API void TreePush(const char* str_id); // ~ Indent()+PushID(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
|
|
|
IMGUI_API void TreePush(const void* ptr_id); // "
|
|
|
- IMGUI_API void TreePop(); // ~ Unindent()+PopId()
|
|
|
+ IMGUI_API void TreePop(); // ~ Unindent()+PopID()
|
|
|
IMGUI_API float GetTreeNodeToLabelSpacing(); // horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode
|
|
|
IMGUI_API bool CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags = 0); // if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call TreePop().
|
|
|
IMGUI_API bool CollapsingHeader(const char* label, bool* p_visible, ImGuiTreeNodeFlags flags = 0); // when 'p_visible != NULL': if '*p_visible==true' display an additional small close button on upper right of the header which will set the bool to false when clicked, if '*p_visible==false' don't display the header.
|
|
@@ -716,9 +717,7 @@ namespace ImGui
|
|
|
// - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered().
|
|
|
// - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack.
|
|
|
// This is sometimes leading to confusing mistakes. May rework this in the future.
|
|
|
-
|
|
|
- // Popups: begin/end functions
|
|
|
- // - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards. ImGuiWindowFlags are forwarded to the window.
|
|
|
+ // - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window.
|
|
|
// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar.
|
|
|
IMGUI_API bool BeginPopup(const char* str_id, ImGuiWindowFlags flags = 0); // return true if the popup is open, and you can start outputting to it.
|
|
|
IMGUI_API bool BeginPopupModal(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0); // return true if the modal is open, and you can start outputting to it.
|
|
@@ -768,12 +767,10 @@ namespace ImGui
|
|
|
// TableNextColumn() will automatically wrap-around into the next row if needed.
|
|
|
// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column!
|
|
|
// - Summary of possible call flow:
|
|
|
- // --------------------------------------------------------------------------------------------------------
|
|
|
- // TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK
|
|
|
- // TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK
|
|
|
- // TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row!
|
|
|
- // TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear!
|
|
|
- // --------------------------------------------------------------------------------------------------------
|
|
|
+ // - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK
|
|
|
+ // - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK
|
|
|
+ // - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row!
|
|
|
+ // - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear!
|
|
|
// - 5. Call EndTable()
|
|
|
IMGUI_API bool BeginTable(const char* str_id, int column, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(0.0f, 0.0f), float inner_width = 0.0f);
|
|
|
IMGUI_API void EndTable(); // only call EndTable() if BeginTable() returns true!
|
|
@@ -994,6 +991,7 @@ namespace ImGui
|
|
|
IMGUI_API const char* SaveIniSettingsToMemory(size_t* out_ini_size = NULL); // return a zero-terminated string with the .ini data which you can save by your own mean. call when io.WantSaveIniSettings is set, then save data by your own mean and clear io.WantSaveIniSettings.
|
|
|
|
|
|
// Debug Utilities
|
|
|
+ // - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger
|
|
|
IMGUI_API void DebugTextEncoding(const char* text);
|
|
|
IMGUI_API void DebugFlashStyleColor(ImGuiCol idx);
|
|
|
IMGUI_API bool DebugCheckVersionAndDataLayout(const char* version_str, size_t sz_io, size_t sz_style, size_t sz_vec2, size_t sz_vec4, size_t sz_drawvert, size_t sz_drawidx); // This is called by IMGUI_CHECKVERSION() macro.
|
|
@@ -1139,7 +1137,7 @@ enum ImGuiTreeNodeFlags_
|
|
|
ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12, // Extend hit box to the left-most and right-most edges (bypass the indented area).
|
|
|
ImGuiTreeNodeFlags_SpanAllColumns = 1 << 13, // Frame will span all columns of its container table (text will still fit in current column)
|
|
|
ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 14, // (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
|
|
|
- //ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 14, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
|
|
|
+ //ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 15, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
|
|
|
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog,
|
|
|
|
|
|
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
|
@@ -1207,7 +1205,7 @@ enum ImGuiTabBarFlags_
|
|
|
ImGuiTabBarFlags_Reorderable = 1 << 0, // Allow manually dragging tabs to re-order them + New tabs are appended at the end of list
|
|
|
ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1, // Automatically select new tabs when they appear
|
|
|
ImGuiTabBarFlags_TabListPopupButton = 1 << 2, // Disable buttons to open the tab list popup
|
|
|
- ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3, // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
|
|
|
+ ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3, // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
|
|
|
ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4, // Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll)
|
|
|
ImGuiTabBarFlags_NoTooltip = 1 << 5, // Disable tooltips when hovering a tab
|
|
|
ImGuiTabBarFlags_FittingPolicyResizeDown = 1 << 6, // Resize tabs when they don't fit
|
|
@@ -1220,150 +1218,15 @@ enum ImGuiTabBarFlags_
|
|
|
enum ImGuiTabItemFlags_
|
|
|
{
|
|
|
ImGuiTabItemFlags_None = 0,
|
|
|
- ImGuiTabItemFlags_UnsavedDocument = 1 << 0, // Display a dot next to the title + tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.
|
|
|
+ ImGuiTabItemFlags_UnsavedDocument = 1 << 0, // Display a dot next to the title + set ImGuiTabItemFlags_NoAssumedClosure.
|
|
|
ImGuiTabItemFlags_SetSelected = 1 << 1, // Trigger flag to programmatically make the tab selected when calling BeginTabItem()
|
|
|
- ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2, // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
|
|
|
- ImGuiTabItemFlags_NoPushId = 1 << 3, // Don't call PushID(tab->ID)/PopID() on BeginTabItem()/EndTabItem()
|
|
|
+ ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2, // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
|
|
|
+ ImGuiTabItemFlags_NoPushId = 1 << 3, // Don't call PushID()/PopID() on BeginTabItem()/EndTabItem()
|
|
|
ImGuiTabItemFlags_NoTooltip = 1 << 4, // Disable tooltip for the given tab
|
|
|
ImGuiTabItemFlags_NoReorder = 1 << 5, // Disable reordering this tab or having another tab cross over this tab
|
|
|
ImGuiTabItemFlags_Leading = 1 << 6, // Enforce the tab position to the left of the tab bar (after the tab list popup button)
|
|
|
ImGuiTabItemFlags_Trailing = 1 << 7, // Enforce the tab position to the right of the tab bar (before the scrolling buttons)
|
|
|
-};
|
|
|
-
|
|
|
-// Flags for ImGui::BeginTable()
|
|
|
-// - Important! Sizing policies have complex and subtle side effects, much more so than you would expect.
|
|
|
-// Read comments/demos carefully + experiment with live demos to get acquainted with them.
|
|
|
-// - The DEFAULT sizing policies are:
|
|
|
-// - Default to ImGuiTableFlags_SizingFixedFit if ScrollX is on, or if host window has ImGuiWindowFlags_AlwaysAutoResize.
|
|
|
-// - Default to ImGuiTableFlags_SizingStretchSame if ScrollX is off.
|
|
|
-// - When ScrollX is off:
|
|
|
-// - Table defaults to ImGuiTableFlags_SizingStretchSame -> all Columns defaults to ImGuiTableColumnFlags_WidthStretch with same weight.
|
|
|
-// - Columns sizing policy allowed: Stretch (default), Fixed/Auto.
|
|
|
-// - Fixed Columns (if any) will generally obtain their requested width (unless the table cannot fit them all).
|
|
|
-// - Stretch Columns will share the remaining width according to their respective weight.
|
|
|
-// - Mixed Fixed/Stretch columns is possible but has various side-effects on resizing behaviors.
|
|
|
-// The typical use of mixing sizing policies is: any number of LEADING Fixed columns, followed by one or two TRAILING Stretch columns.
|
|
|
-// (this is because the visible order of columns have subtle but necessary effects on how they react to manual resizing).
|
|
|
-// - When ScrollX is on:
|
|
|
-// - Table defaults to ImGuiTableFlags_SizingFixedFit -> all Columns defaults to ImGuiTableColumnFlags_WidthFixed
|
|
|
-// - Columns sizing policy allowed: Fixed/Auto mostly.
|
|
|
-// - Fixed Columns can be enlarged as needed. Table will show a horizontal scrollbar if needed.
|
|
|
-// - When using auto-resizing (non-resizable) fixed columns, querying the content width to use item right-alignment e.g. SetNextItemWidth(-FLT_MIN) doesn't make sense, would create a feedback loop.
|
|
|
-// - Using Stretch columns OFTEN DOES NOT MAKE SENSE if ScrollX is on, UNLESS you have specified a value for 'inner_width' in BeginTable().
|
|
|
-// If you specify a value for 'inner_width' then effectively the scrolling space is known and Stretch or mixed Fixed/Stretch columns become meaningful again.
|
|
|
-// - Read on documentation at the top of imgui_tables.cpp for details.
|
|
|
-enum ImGuiTableFlags_
|
|
|
-{
|
|
|
- // Features
|
|
|
- ImGuiTableFlags_None = 0,
|
|
|
- ImGuiTableFlags_Resizable = 1 << 0, // Enable resizing columns.
|
|
|
- ImGuiTableFlags_Reorderable = 1 << 1, // Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers)
|
|
|
- ImGuiTableFlags_Hideable = 1 << 2, // Enable hiding/disabling columns in context menu.
|
|
|
- ImGuiTableFlags_Sortable = 1 << 3, // Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see ImGuiTableFlags_SortMulti and ImGuiTableFlags_SortTristate.
|
|
|
- ImGuiTableFlags_NoSavedSettings = 1 << 4, // Disable persisting columns order, width and sort settings in the .ini file.
|
|
|
- ImGuiTableFlags_ContextMenuInBody = 1 << 5, // Right-click on columns body/contents will display table context menu. By default it is available in TableHeadersRow().
|
|
|
- // Decorations
|
|
|
- ImGuiTableFlags_RowBg = 1 << 6, // Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually)
|
|
|
- ImGuiTableFlags_BordersInnerH = 1 << 7, // Draw horizontal borders between rows.
|
|
|
- ImGuiTableFlags_BordersOuterH = 1 << 8, // Draw horizontal borders at the top and bottom.
|
|
|
- ImGuiTableFlags_BordersInnerV = 1 << 9, // Draw vertical borders between columns.
|
|
|
- ImGuiTableFlags_BordersOuterV = 1 << 10, // Draw vertical borders on the left and right sides.
|
|
|
- ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH, // Draw horizontal borders.
|
|
|
- ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV, // Draw vertical borders.
|
|
|
- ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH, // Draw inner borders.
|
|
|
- ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH, // Draw outer borders.
|
|
|
- ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter, // Draw all borders.
|
|
|
- ImGuiTableFlags_NoBordersInBody = 1 << 11, // [ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers). -> May move to style
|
|
|
- ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12, // [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers). -> May move to style
|
|
|
- // Sizing Policy (read above for defaults)
|
|
|
- ImGuiTableFlags_SizingFixedFit = 1 << 13, // Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width.
|
|
|
- ImGuiTableFlags_SizingFixedSame = 2 << 13, // Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns. Implicitly enable ImGuiTableFlags_NoKeepColumnsVisible.
|
|
|
- ImGuiTableFlags_SizingStretchProp = 3 << 13, // Columns default to _WidthStretch with default weights proportional to each columns contents widths.
|
|
|
- ImGuiTableFlags_SizingStretchSame = 4 << 13, // Columns default to _WidthStretch with default weights all equal, unless overridden by TableSetupColumn().
|
|
|
- // Sizing Extra Options
|
|
|
- ImGuiTableFlags_NoHostExtendX = 1 << 16, // Make outer width auto-fit to columns, overriding outer_size.x value. Only available when ScrollX/ScrollY are disabled and Stretch columns are not used.
|
|
|
- ImGuiTableFlags_NoHostExtendY = 1 << 17, // Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit). Only available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible.
|
|
|
- ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18, // Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable.
|
|
|
- ImGuiTableFlags_PreciseWidths = 1 << 19, // Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34. With this flag: 33,33,33). With larger number of columns, resizing will appear to be less smooth.
|
|
|
- // Clipping
|
|
|
- ImGuiTableFlags_NoClip = 1 << 20, // Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze().
|
|
|
- // Padding
|
|
|
- ImGuiTableFlags_PadOuterX = 1 << 21, // Default if BordersOuterV is on. Enable outermost padding. Generally desirable if you have headers.
|
|
|
- ImGuiTableFlags_NoPadOuterX = 1 << 22, // Default if BordersOuterV is off. Disable outermost padding.
|
|
|
- ImGuiTableFlags_NoPadInnerX = 1 << 23, // Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off).
|
|
|
- // Scrolling
|
|
|
- ImGuiTableFlags_ScrollX = 1 << 24, // Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this creates a child window, ScrollY is currently generally recommended when using ScrollX.
|
|
|
- ImGuiTableFlags_ScrollY = 1 << 25, // Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size.
|
|
|
- // Sorting
|
|
|
- ImGuiTableFlags_SortMulti = 1 << 26, // Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount > 1).
|
|
|
- ImGuiTableFlags_SortTristate = 1 << 27, // Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0).
|
|
|
- // Miscellaneous
|
|
|
- ImGuiTableFlags_HighlightHoveredColumn = 1 << 28, // Highlight column headers when hovered (may evolve into a fuller highlight)
|
|
|
-
|
|
|
- // [Internal] Combinations and masks
|
|
|
- ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame,
|
|
|
-};
|
|
|
-
|
|
|
-// Flags for ImGui::TableSetupColumn()
|
|
|
-enum ImGuiTableColumnFlags_
|
|
|
-{
|
|
|
- // Input configuration flags
|
|
|
- ImGuiTableColumnFlags_None = 0,
|
|
|
- ImGuiTableColumnFlags_Disabled = 1 << 0, // Overriding/master disable flag: hide column, won't show in context menu (unlike calling TableSetColumnEnabled() which manipulates the user accessible state)
|
|
|
- ImGuiTableColumnFlags_DefaultHide = 1 << 1, // Default as a hidden/disabled column.
|
|
|
- ImGuiTableColumnFlags_DefaultSort = 1 << 2, // Default as a sorting column.
|
|
|
- ImGuiTableColumnFlags_WidthStretch = 1 << 3, // Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is _SizingStretchSame or _SizingStretchProp).
|
|
|
- ImGuiTableColumnFlags_WidthFixed = 1 << 4, // Column will not stretch. Preferable with horizontal scrolling enabled (default if table sizing policy is _SizingFixedFit and table is resizable).
|
|
|
- ImGuiTableColumnFlags_NoResize = 1 << 5, // Disable manual resizing.
|
|
|
- ImGuiTableColumnFlags_NoReorder = 1 << 6, // Disable manual reordering this column, this will also prevent other columns from crossing over this column.
|
|
|
- ImGuiTableColumnFlags_NoHide = 1 << 7, // Disable ability to hide/disable this column.
|
|
|
- ImGuiTableColumnFlags_NoClip = 1 << 8, // Disable clipping for this column (all NoClip columns will render in a same draw command).
|
|
|
- ImGuiTableColumnFlags_NoSort = 1 << 9, // Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table).
|
|
|
- ImGuiTableColumnFlags_NoSortAscending = 1 << 10, // Disable ability to sort in the ascending direction.
|
|
|
- ImGuiTableColumnFlags_NoSortDescending = 1 << 11, // Disable ability to sort in the descending direction.
|
|
|
- ImGuiTableColumnFlags_NoHeaderLabel = 1 << 12, // TableHeadersRow() will not submit horizontal label for this column. Convenient for some small columns. Name will still appear in context menu or in angled headers.
|
|
|
- ImGuiTableColumnFlags_NoHeaderWidth = 1 << 13, // Disable header text width contribution to automatic column width.
|
|
|
- ImGuiTableColumnFlags_PreferSortAscending = 1 << 14, // Make the initial sort direction Ascending when first sorting on this column (default).
|
|
|
- ImGuiTableColumnFlags_PreferSortDescending = 1 << 15, // Make the initial sort direction Descending when first sorting on this column.
|
|
|
- ImGuiTableColumnFlags_IndentEnable = 1 << 16, // Use current Indent value when entering cell (default for column 0).
|
|
|
- ImGuiTableColumnFlags_IndentDisable = 1 << 17, // Ignore current Indent value when entering cell (default for columns > 0). Indentation changes _within_ the cell will still be honored.
|
|
|
- ImGuiTableColumnFlags_AngledHeader = 1 << 18, // TableHeadersRow() will submit an angled header row for this column. Note this will add an extra row.
|
|
|
-
|
|
|
- // Output status flags, read-only via TableGetColumnFlags()
|
|
|
- ImGuiTableColumnFlags_IsEnabled = 1 << 24, // Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags.
|
|
|
- ImGuiTableColumnFlags_IsVisible = 1 << 25, // Status: is visible == is enabled AND not clipped by scrolling.
|
|
|
- ImGuiTableColumnFlags_IsSorted = 1 << 26, // Status: is currently part of the sort specs
|
|
|
- ImGuiTableColumnFlags_IsHovered = 1 << 27, // Status: is hovered by mouse
|
|
|
-
|
|
|
- // [Internal] Combinations and masks
|
|
|
- ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed,
|
|
|
- ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable,
|
|
|
- ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered,
|
|
|
- ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30, // [Internal] Disable user resizing this column directly (it may however we resized indirectly from its left edge)
|
|
|
-};
|
|
|
-
|
|
|
-// Flags for ImGui::TableNextRow()
|
|
|
-enum ImGuiTableRowFlags_
|
|
|
-{
|
|
|
- ImGuiTableRowFlags_None = 0,
|
|
|
- ImGuiTableRowFlags_Headers = 1 << 0, // Identify header row (set default background color + width of its contents accounted differently for auto column width)
|
|
|
-};
|
|
|
-
|
|
|
-// Enum for ImGui::TableSetBgColor()
|
|
|
-// Background colors are rendering in 3 layers:
|
|
|
-// - Layer 0: draw with RowBg0 color if set, otherwise draw with ColumnBg0 if set.
|
|
|
-// - Layer 1: draw with RowBg1 color if set, otherwise draw with ColumnBg1 if set.
|
|
|
-// - Layer 2: draw with CellBg color if set.
|
|
|
-// The purpose of the two row/columns layers is to let you decide if a background color change should override or blend with the existing color.
|
|
|
-// When using ImGuiTableFlags_RowBg on the table, each row has the RowBg0 color automatically set for odd/even rows.
|
|
|
-// If you set the color of RowBg0 target, your color will override the existing RowBg0 color.
|
|
|
-// If you set the color of RowBg1 or ColumnBg1 target, your color will blend over the RowBg0 color.
|
|
|
-enum ImGuiTableBgTarget_
|
|
|
-{
|
|
|
- ImGuiTableBgTarget_None = 0,
|
|
|
- ImGuiTableBgTarget_RowBg0 = 1, // Set row background color 0 (generally used for background, automatically set when ImGuiTableFlags_RowBg is used)
|
|
|
- ImGuiTableBgTarget_RowBg1 = 2, // Set row background color 1 (generally used for selection marking)
|
|
|
- ImGuiTableBgTarget_CellBg = 3, // Set cell background color (top-most color)
|
|
|
+ ImGuiTabItemFlags_NoAssumedClosure = 1 << 8, // Tab is selected when trying to close + closure is not immediately assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.
|
|
|
};
|
|
|
|
|
|
// Flags for ImGui::IsWindowFocused()
|
|
@@ -1700,15 +1563,15 @@ enum ImGuiCol_
|
|
|
ImGuiCol_FrameBg, // Background of checkbox, radio button, plot, slider, text input
|
|
|
ImGuiCol_FrameBgHovered,
|
|
|
ImGuiCol_FrameBgActive,
|
|
|
- ImGuiCol_TitleBg,
|
|
|
- ImGuiCol_TitleBgActive,
|
|
|
- ImGuiCol_TitleBgCollapsed,
|
|
|
+ ImGuiCol_TitleBg, // Title bar
|
|
|
+ ImGuiCol_TitleBgActive, // Title bar when focused
|
|
|
+ ImGuiCol_TitleBgCollapsed, // Title bar when collapsed
|
|
|
ImGuiCol_MenuBarBg,
|
|
|
ImGuiCol_ScrollbarBg,
|
|
|
ImGuiCol_ScrollbarGrab,
|
|
|
ImGuiCol_ScrollbarGrabHovered,
|
|
|
ImGuiCol_ScrollbarGrabActive,
|
|
|
- ImGuiCol_CheckMark,
|
|
|
+ ImGuiCol_CheckMark, // Checkbox tick and RadioButton circle
|
|
|
ImGuiCol_SliderGrab,
|
|
|
ImGuiCol_SliderGrabActive,
|
|
|
ImGuiCol_Button,
|
|
@@ -1903,7 +1766,7 @@ enum ImGuiMouseSource : int
|
|
|
ImGuiMouseSource_COUNT
|
|
|
};
|
|
|
|
|
|
-// Enumeration for ImGui::SetWindow***(), SetNextWindow***(), SetNextItem***() functions
|
|
|
+// Enumeration for ImGui::SetNextWindow***(), SetWindow***(), SetNextItem***() functions
|
|
|
// Represent a condition.
|
|
|
// Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always.
|
|
|
enum ImGuiCond_
|
|
@@ -1915,6 +1778,170 @@ enum ImGuiCond_
|
|
|
ImGuiCond_Appearing = 1 << 3, // Set the variable if the object/window is appearing after being hidden/inactive (or the first time)
|
|
|
};
|
|
|
|
|
|
+//-----------------------------------------------------------------------------
|
|
|
+// [SECTION] Tables API flags and structures (ImGuiTableFlags, ImGuiTableColumnFlags, ImGuiTableRowFlags, ImGuiTableBgTarget, ImGuiTableSortSpecs, ImGuiTableColumnSortSpecs)
|
|
|
+//-----------------------------------------------------------------------------
|
|
|
+
|
|
|
+// Flags for ImGui::BeginTable()
|
|
|
+// - Important! Sizing policies have complex and subtle side effects, much more so than you would expect.
|
|
|
+// Read comments/demos carefully + experiment with live demos to get acquainted with them.
|
|
|
+// - The DEFAULT sizing policies are:
|
|
|
+// - Default to ImGuiTableFlags_SizingFixedFit if ScrollX is on, or if host window has ImGuiWindowFlags_AlwaysAutoResize.
|
|
|
+// - Default to ImGuiTableFlags_SizingStretchSame if ScrollX is off.
|
|
|
+// - When ScrollX is off:
|
|
|
+// - Table defaults to ImGuiTableFlags_SizingStretchSame -> all Columns defaults to ImGuiTableColumnFlags_WidthStretch with same weight.
|
|
|
+// - Columns sizing policy allowed: Stretch (default), Fixed/Auto.
|
|
|
+// - Fixed Columns (if any) will generally obtain their requested width (unless the table cannot fit them all).
|
|
|
+// - Stretch Columns will share the remaining width according to their respective weight.
|
|
|
+// - Mixed Fixed/Stretch columns is possible but has various side-effects on resizing behaviors.
|
|
|
+// The typical use of mixing sizing policies is: any number of LEADING Fixed columns, followed by one or two TRAILING Stretch columns.
|
|
|
+// (this is because the visible order of columns have subtle but necessary effects on how they react to manual resizing).
|
|
|
+// - When ScrollX is on:
|
|
|
+// - Table defaults to ImGuiTableFlags_SizingFixedFit -> all Columns defaults to ImGuiTableColumnFlags_WidthFixed
|
|
|
+// - Columns sizing policy allowed: Fixed/Auto mostly.
|
|
|
+// - Fixed Columns can be enlarged as needed. Table will show a horizontal scrollbar if needed.
|
|
|
+// - When using auto-resizing (non-resizable) fixed columns, querying the content width to use item right-alignment e.g. SetNextItemWidth(-FLT_MIN) doesn't make sense, would create a feedback loop.
|
|
|
+// - Using Stretch columns OFTEN DOES NOT MAKE SENSE if ScrollX is on, UNLESS you have specified a value for 'inner_width' in BeginTable().
|
|
|
+// If you specify a value for 'inner_width' then effectively the scrolling space is known and Stretch or mixed Fixed/Stretch columns become meaningful again.
|
|
|
+// - Read on documentation at the top of imgui_tables.cpp for details.
|
|
|
+enum ImGuiTableFlags_
|
|
|
+{
|
|
|
+ // Features
|
|
|
+ ImGuiTableFlags_None = 0,
|
|
|
+ ImGuiTableFlags_Resizable = 1 << 0, // Enable resizing columns.
|
|
|
+ ImGuiTableFlags_Reorderable = 1 << 1, // Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers)
|
|
|
+ ImGuiTableFlags_Hideable = 1 << 2, // Enable hiding/disabling columns in context menu.
|
|
|
+ ImGuiTableFlags_Sortable = 1 << 3, // Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see ImGuiTableFlags_SortMulti and ImGuiTableFlags_SortTristate.
|
|
|
+ ImGuiTableFlags_NoSavedSettings = 1 << 4, // Disable persisting columns order, width and sort settings in the .ini file.
|
|
|
+ ImGuiTableFlags_ContextMenuInBody = 1 << 5, // Right-click on columns body/contents will display table context menu. By default it is available in TableHeadersRow().
|
|
|
+ // Decorations
|
|
|
+ ImGuiTableFlags_RowBg = 1 << 6, // Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually)
|
|
|
+ ImGuiTableFlags_BordersInnerH = 1 << 7, // Draw horizontal borders between rows.
|
|
|
+ ImGuiTableFlags_BordersOuterH = 1 << 8, // Draw horizontal borders at the top and bottom.
|
|
|
+ ImGuiTableFlags_BordersInnerV = 1 << 9, // Draw vertical borders between columns.
|
|
|
+ ImGuiTableFlags_BordersOuterV = 1 << 10, // Draw vertical borders on the left and right sides.
|
|
|
+ ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH, // Draw horizontal borders.
|
|
|
+ ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV, // Draw vertical borders.
|
|
|
+ ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH, // Draw inner borders.
|
|
|
+ ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH, // Draw outer borders.
|
|
|
+ ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter, // Draw all borders.
|
|
|
+ ImGuiTableFlags_NoBordersInBody = 1 << 11, // [ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers). -> May move to style
|
|
|
+ ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12, // [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers). -> May move to style
|
|
|
+ // Sizing Policy (read above for defaults)
|
|
|
+ ImGuiTableFlags_SizingFixedFit = 1 << 13, // Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width.
|
|
|
+ ImGuiTableFlags_SizingFixedSame = 2 << 13, // Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns. Implicitly enable ImGuiTableFlags_NoKeepColumnsVisible.
|
|
|
+ ImGuiTableFlags_SizingStretchProp = 3 << 13, // Columns default to _WidthStretch with default weights proportional to each columns contents widths.
|
|
|
+ ImGuiTableFlags_SizingStretchSame = 4 << 13, // Columns default to _WidthStretch with default weights all equal, unless overridden by TableSetupColumn().
|
|
|
+ // Sizing Extra Options
|
|
|
+ ImGuiTableFlags_NoHostExtendX = 1 << 16, // Make outer width auto-fit to columns, overriding outer_size.x value. Only available when ScrollX/ScrollY are disabled and Stretch columns are not used.
|
|
|
+ ImGuiTableFlags_NoHostExtendY = 1 << 17, // Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit). Only available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible.
|
|
|
+ ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18, // Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable.
|
|
|
+ ImGuiTableFlags_PreciseWidths = 1 << 19, // Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34. With this flag: 33,33,33). With larger number of columns, resizing will appear to be less smooth.
|
|
|
+ // Clipping
|
|
|
+ ImGuiTableFlags_NoClip = 1 << 20, // Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze().
|
|
|
+ // Padding
|
|
|
+ ImGuiTableFlags_PadOuterX = 1 << 21, // Default if BordersOuterV is on. Enable outermost padding. Generally desirable if you have headers.
|
|
|
+ ImGuiTableFlags_NoPadOuterX = 1 << 22, // Default if BordersOuterV is off. Disable outermost padding.
|
|
|
+ ImGuiTableFlags_NoPadInnerX = 1 << 23, // Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off).
|
|
|
+ // Scrolling
|
|
|
+ ImGuiTableFlags_ScrollX = 1 << 24, // Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this creates a child window, ScrollY is currently generally recommended when using ScrollX.
|
|
|
+ ImGuiTableFlags_ScrollY = 1 << 25, // Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size.
|
|
|
+ // Sorting
|
|
|
+ ImGuiTableFlags_SortMulti = 1 << 26, // Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount > 1).
|
|
|
+ ImGuiTableFlags_SortTristate = 1 << 27, // Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0).
|
|
|
+ // Miscellaneous
|
|
|
+ ImGuiTableFlags_HighlightHoveredColumn = 1 << 28, // Highlight column headers when hovered (may evolve into a fuller highlight)
|
|
|
+
|
|
|
+ // [Internal] Combinations and masks
|
|
|
+ ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame,
|
|
|
+};
|
|
|
+
|
|
|
+// Flags for ImGui::TableSetupColumn()
|
|
|
+enum ImGuiTableColumnFlags_
|
|
|
+{
|
|
|
+ // Input configuration flags
|
|
|
+ ImGuiTableColumnFlags_None = 0,
|
|
|
+ ImGuiTableColumnFlags_Disabled = 1 << 0, // Overriding/master disable flag: hide column, won't show in context menu (unlike calling TableSetColumnEnabled() which manipulates the user accessible state)
|
|
|
+ ImGuiTableColumnFlags_DefaultHide = 1 << 1, // Default as a hidden/disabled column.
|
|
|
+ ImGuiTableColumnFlags_DefaultSort = 1 << 2, // Default as a sorting column.
|
|
|
+ ImGuiTableColumnFlags_WidthStretch = 1 << 3, // Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is _SizingStretchSame or _SizingStretchProp).
|
|
|
+ ImGuiTableColumnFlags_WidthFixed = 1 << 4, // Column will not stretch. Preferable with horizontal scrolling enabled (default if table sizing policy is _SizingFixedFit and table is resizable).
|
|
|
+ ImGuiTableColumnFlags_NoResize = 1 << 5, // Disable manual resizing.
|
|
|
+ ImGuiTableColumnFlags_NoReorder = 1 << 6, // Disable manual reordering this column, this will also prevent other columns from crossing over this column.
|
|
|
+ ImGuiTableColumnFlags_NoHide = 1 << 7, // Disable ability to hide/disable this column.
|
|
|
+ ImGuiTableColumnFlags_NoClip = 1 << 8, // Disable clipping for this column (all NoClip columns will render in a same draw command).
|
|
|
+ ImGuiTableColumnFlags_NoSort = 1 << 9, // Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table).
|
|
|
+ ImGuiTableColumnFlags_NoSortAscending = 1 << 10, // Disable ability to sort in the ascending direction.
|
|
|
+ ImGuiTableColumnFlags_NoSortDescending = 1 << 11, // Disable ability to sort in the descending direction.
|
|
|
+ ImGuiTableColumnFlags_NoHeaderLabel = 1 << 12, // TableHeadersRow() will not submit horizontal label for this column. Convenient for some small columns. Name will still appear in context menu or in angled headers.
|
|
|
+ ImGuiTableColumnFlags_NoHeaderWidth = 1 << 13, // Disable header text width contribution to automatic column width.
|
|
|
+ ImGuiTableColumnFlags_PreferSortAscending = 1 << 14, // Make the initial sort direction Ascending when first sorting on this column (default).
|
|
|
+ ImGuiTableColumnFlags_PreferSortDescending = 1 << 15, // Make the initial sort direction Descending when first sorting on this column.
|
|
|
+ ImGuiTableColumnFlags_IndentEnable = 1 << 16, // Use current Indent value when entering cell (default for column 0).
|
|
|
+ ImGuiTableColumnFlags_IndentDisable = 1 << 17, // Ignore current Indent value when entering cell (default for columns > 0). Indentation changes _within_ the cell will still be honored.
|
|
|
+ ImGuiTableColumnFlags_AngledHeader = 1 << 18, // TableHeadersRow() will submit an angled header row for this column. Note this will add an extra row.
|
|
|
+
|
|
|
+ // Output status flags, read-only via TableGetColumnFlags()
|
|
|
+ ImGuiTableColumnFlags_IsEnabled = 1 << 24, // Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags.
|
|
|
+ ImGuiTableColumnFlags_IsVisible = 1 << 25, // Status: is visible == is enabled AND not clipped by scrolling.
|
|
|
+ ImGuiTableColumnFlags_IsSorted = 1 << 26, // Status: is currently part of the sort specs
|
|
|
+ ImGuiTableColumnFlags_IsHovered = 1 << 27, // Status: is hovered by mouse
|
|
|
+
|
|
|
+ // [Internal] Combinations and masks
|
|
|
+ ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed,
|
|
|
+ ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable,
|
|
|
+ ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered,
|
|
|
+ ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30, // [Internal] Disable user resizing this column directly (it may however we resized indirectly from its left edge)
|
|
|
+};
|
|
|
+
|
|
|
+// Flags for ImGui::TableNextRow()
|
|
|
+enum ImGuiTableRowFlags_
|
|
|
+{
|
|
|
+ ImGuiTableRowFlags_None = 0,
|
|
|
+ ImGuiTableRowFlags_Headers = 1 << 0, // Identify header row (set default background color + width of its contents accounted differently for auto column width)
|
|
|
+};
|
|
|
+
|
|
|
+// Enum for ImGui::TableSetBgColor()
|
|
|
+// Background colors are rendering in 3 layers:
|
|
|
+// - Layer 0: draw with RowBg0 color if set, otherwise draw with ColumnBg0 if set.
|
|
|
+// - Layer 1: draw with RowBg1 color if set, otherwise draw with ColumnBg1 if set.
|
|
|
+// - Layer 2: draw with CellBg color if set.
|
|
|
+// The purpose of the two row/columns layers is to let you decide if a background color change should override or blend with the existing color.
|
|
|
+// When using ImGuiTableFlags_RowBg on the table, each row has the RowBg0 color automatically set for odd/even rows.
|
|
|
+// If you set the color of RowBg0 target, your color will override the existing RowBg0 color.
|
|
|
+// If you set the color of RowBg1 or ColumnBg1 target, your color will blend over the RowBg0 color.
|
|
|
+enum ImGuiTableBgTarget_
|
|
|
+{
|
|
|
+ ImGuiTableBgTarget_None = 0,
|
|
|
+ ImGuiTableBgTarget_RowBg0 = 1, // Set row background color 0 (generally used for background, automatically set when ImGuiTableFlags_RowBg is used)
|
|
|
+ ImGuiTableBgTarget_RowBg1 = 2, // Set row background color 1 (generally used for selection marking)
|
|
|
+ ImGuiTableBgTarget_CellBg = 3, // Set cell background color (top-most color)
|
|
|
+};
|
|
|
+
|
|
|
+// Sorting specifications for a table (often handling sort specs for a single column, occasionally more)
|
|
|
+// Obtained by calling TableGetSortSpecs().
|
|
|
+// When 'SpecsDirty == true' you can sort your data. It will be true with 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!
|
|
|
+struct ImGuiTableSortSpecs
|
|
|
+{
|
|
|
+ const ImGuiTableColumnSortSpecs* Specs; // Pointer to sort spec array.
|
|
|
+ int SpecsCount; // Sort spec count. Most often 1. May be > 1 when ImGuiTableFlags_SortMulti is enabled. May be == 0 when ImGuiTableFlags_SortTristate is enabled.
|
|
|
+ bool SpecsDirty; // Set to true when specs have changed since last time! Use this to sort again, then clear the flag.
|
|
|
+
|
|
|
+ ImGuiTableSortSpecs() { memset(this, 0, sizeof(*this)); }
|
|
|
+};
|
|
|
+
|
|
|
+// Sorting specification for one column of a table (sizeof == 12 bytes)
|
|
|
+struct ImGuiTableColumnSortSpecs
|
|
|
+{
|
|
|
+ ImGuiID ColumnUserID; // User id of the column (if specified by a TableSetupColumn() call)
|
|
|
+ ImS16 ColumnIndex; // Index of the column
|
|
|
+ ImS16 SortOrder; // Index within parent ImGuiTableSortSpecs (always stored in order starting from 0, tables sorted on a single criteria will always have a 0 here)
|
|
|
+ ImGuiSortDirection SortDirection : 8; // ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending
|
|
|
+
|
|
|
+ ImGuiTableColumnSortSpecs() { memset(this, 0, sizeof(*this)); }
|
|
|
+};
|
|
|
+
|
|
|
//-----------------------------------------------------------------------------
|
|
|
// [SECTION] Helpers: Memory allocations macros, ImVector<>
|
|
|
//-----------------------------------------------------------------------------
|
|
@@ -2304,7 +2331,7 @@ struct ImGuiIO
|
|
|
};
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
-// [SECTION] Misc data structures
|
|
|
+// [SECTION] Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiPayload)
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
// Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used.
|
|
@@ -2399,30 +2426,6 @@ struct ImGuiPayload
|
|
|
bool IsDelivery() const { return Delivery; }
|
|
|
};
|
|
|
|
|
|
-// Sorting specification for one column of a table (sizeof == 12 bytes)
|
|
|
-struct ImGuiTableColumnSortSpecs
|
|
|
-{
|
|
|
- ImGuiID ColumnUserID; // User id of the column (if specified by a TableSetupColumn() call)
|
|
|
- ImS16 ColumnIndex; // Index of the column
|
|
|
- ImS16 SortOrder; // Index within parent ImGuiTableSortSpecs (always stored in order starting from 0, tables sorted on a single criteria will always have a 0 here)
|
|
|
- ImGuiSortDirection SortDirection : 8; // ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending
|
|
|
-
|
|
|
- ImGuiTableColumnSortSpecs() { memset(this, 0, sizeof(*this)); }
|
|
|
-};
|
|
|
-
|
|
|
-// Sorting specifications for a table (often handling sort specs for a single column, occasionally more)
|
|
|
-// Obtained by calling TableGetSortSpecs().
|
|
|
-// When 'SpecsDirty == true' you can sort your data. It will be true with 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!
|
|
|
-struct ImGuiTableSortSpecs
|
|
|
-{
|
|
|
- const ImGuiTableColumnSortSpecs* Specs; // Pointer to sort spec array.
|
|
|
- int SpecsCount; // Sort spec count. Most often 1. May be > 1 when ImGuiTableFlags_SortMulti is enabled. May be == 0 when ImGuiTableFlags_SortTristate is enabled.
|
|
|
- bool SpecsDirty; // Set to true when specs have changed since last time! Use this to sort again, then clear the flag.
|
|
|
-
|
|
|
- ImGuiTableSortSpecs() { memset(this, 0, sizeof(*this)); }
|
|
|
-};
|
|
|
-
|
|
|
//-----------------------------------------------------------------------------
|
|
|
// [SECTION] Helpers (ImGuiOnceUponAFrame, ImGuiTextFilter, ImGuiTextBuffer, ImGuiStorage, ImGuiListClipper, Math Operators, ImColor)
|
|
|
//-----------------------------------------------------------------------------
|
|
@@ -3442,10 +3445,10 @@ namespace ImGui
|
|
|
// OBSOLETED in 1.88 (from May 2022)
|
|
|
static inline void CaptureKeyboardFromApp(bool want_capture_keyboard = true) { SetNextFrameWantCaptureKeyboard(want_capture_keyboard); } // Renamed as name was misleading + removed default value.
|
|
|
static inline void CaptureMouseFromApp(bool want_capture_mouse = true) { SetNextFrameWantCaptureMouse(want_capture_mouse); } // Renamed as name was misleading + removed default value.
|
|
|
- // OBSOLETED in 1.86 (from November 2021)
|
|
|
- IMGUI_API void CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); // Calculate coarse clipping for large list of evenly sized items. Prefer using ImGuiListClipper.
|
|
|
|
|
|
// Some of the older obsolete names along with their replacement (commented out so they are not reported in IDE)
|
|
|
+ //-- OBSOLETED in 1.86 (from November 2021)
|
|
|
+ //IMGUI_API void CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); // Code removed, see 1.90 for last version of the code. Calculate range of visible items for large list of evenly sized items. Prefer using ImGuiListClipper.
|
|
|
//-- OBSOLETED in 1.85 (from August 2021)
|
|
|
//static inline float GetWindowContentRegionWidth() { return GetWindowContentRegionMax().x - GetWindowContentRegionMin().x; }
|
|
|
//-- OBSOLETED in 1.81 (from February 2021)
|