mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-30 20:51:06 +01:00 
			
		
		
		
	Merge branch 'master' into docking
# Conflicts: # docs/CHANGELOG.txt # imgui.cpp
This commit is contained in:
		
							
								
								
									
										173
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										173
									
								
								imgui.h
									
									
									
									
									
								
							| @@ -1,4 +1,4 @@ | ||||
| // dear imgui, v1.80 WIP | ||||
| // dear imgui, v1.80 | ||||
| // (headers) | ||||
|  | ||||
| // Help: | ||||
| @@ -59,8 +59,8 @@ Index of this file: | ||||
|  | ||||
| // Version | ||||
| // (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens) | ||||
| #define IMGUI_VERSION               "1.80 WIP" | ||||
| #define IMGUI_VERSION_NUM           17911 | ||||
| #define IMGUI_VERSION               "1.80" | ||||
| #define IMGUI_VERSION_NUM           18000 | ||||
| #define IMGUI_CHECKVERSION()        ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx)) | ||||
| #define IMGUI_HAS_TABLE | ||||
| #define IMGUI_HAS_VIEWPORT          // Viewport WIP branch | ||||
| @@ -674,11 +674,11 @@ namespace ImGui | ||||
|     // - See top of imgui_tables.cpp for general commentary. | ||||
|     // - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ 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 TableHeadersRow() to submit a header row. Names will be pulled from data provided TableSetupColumn() calls) | ||||
|     // - 5. Populate contents | ||||
|     // - 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 TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data. | ||||
|     // - 5. Populate contents: | ||||
|     //    - In most situations you can use TableNextRow() + TableSetColumnIndex(N) 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 TableNextColumn() instead of TableNextRow() + TableSetColumnIndex(). | ||||
| @@ -692,34 +692,37 @@ namespace ImGui | ||||
|     //        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 columns_count, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(-FLT_MIN, 0), float inner_width = 0.0f); | ||||
|     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! | ||||
|     IMGUI_API void          TableNextRow(ImGuiTableRowFlags row_flags = 0, float min_row_height = 0.0f); // append into the first cell of a new row. | ||||
|     IMGUI_API bool          TableNextColumn();                          // append into the next column (or first column of next row if currently in last column). Return true when column is visible. | ||||
|     IMGUI_API bool          TableSetColumnIndex(int column_n);          // append into the specified column. Return true when column is visible. | ||||
|     // Tables: Headers & Columns declaration | ||||
|     // - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc. | ||||
|     //   Important: this will not display anything! The name passed to TableSetupColumn() is used by TableHeadersRow() and context-menus. | ||||
|     // - Use TableHeadersRow() to create a row and automatically submit a TableHeader() for each column. | ||||
|     //   Headers are required to perform: reordering, sorting, and opening the context menu (but context menu can also be available in columns body using ImGuiTableFlags_ContextMenuInBody). | ||||
|     // - 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). | ||||
|     // - Use TableSetupScrollFreeze() to lock columns (from the right) or rows (from the top) so they stay visible when scrolled. | ||||
|     // - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column. | ||||
|     //   Headers are required to perform: reordering, sorting, and opening the context menu. | ||||
|     //   The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody. | ||||
|     // - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in | ||||
|     //   some advanced use cases (e.g. adding custom widgets in header row). | ||||
|     // - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. | ||||
|     IMGUI_API void          TableSetupColumn(const char* label, ImGuiTableColumnFlags flags = 0, float init_width_or_weight = 0.0f, ImU32 user_id = 0); | ||||
|     IMGUI_API void          TableSetupScrollFreeze(int cols, int rows); // lock columns/rows so they stay visible when scrolled. | ||||
|     IMGUI_API void          TableHeadersRow();                          // submit all headers cells based on data provided to TableSetupColumn() + submit context menu | ||||
|     IMGUI_API void          TableHeader(const char* label);             // submit one header cell manually (rarely used) | ||||
|     // Tables: 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 | ||||
|     //   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(). | ||||
|     IMGUI_API ImGuiTableSortSpecs* TableGetSortSpecs();                        // get latest sort specs for the table (NULL if not sorting). | ||||
|     // 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(). | ||||
|     // - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index. | ||||
|     IMGUI_API int                   TableGetColumnCount();                      // return number of columns (value passed to BeginTable) | ||||
|     IMGUI_API int                   TableGetColumnIndex();                      // return current column index. | ||||
|     IMGUI_API int                   TableGetRowIndex();                         // return current row index. | ||||
|     IMGUI_API const char*           TableGetColumnName(int column_n = -1);      // return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column. | ||||
|     IMGUI_API ImGuiTableColumnFlags TableGetColumnFlags(int column_n = -1);     // return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to use current column. | ||||
|     IMGUI_API ImGuiTableSortSpecs*  TableGetSortSpecs();                        // get latest sort specs for the table (NULL if not sorting). | ||||
|     IMGUI_API void                  TableSetBgColor(ImGuiTableBgTarget target, ImU32 color, int column_n = -1);  // change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details. | ||||
|  | ||||
|     // Legacy Columns API (2020: prefer using Tables!) | ||||
| @@ -1101,50 +1104,51 @@ enum ImGuiTabItemFlags_ | ||||
| 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(). | ||||
|     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 appears in Headers). -> May move to style | ||||
|     ImGuiTableFlags_NoBordersInBodyUntilResize      = 1 << 12,  // [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appears in Headers). -> May move to style | ||||
|     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 appears in Headers). -> May move to style | ||||
|     ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12,  // [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appears 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 overriden by TableSetupColumn(). | ||||
|     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 overriden by TableSetupColumn(). | ||||
|     // Sizing Extra Options | ||||
|     ImGuiTableFlags_NoHostExtendY                   = 1 << 16,  // Disable extending table past the limit set by outer_size.y. Only meaningful when neither ScrollX nor ScrollY are set (data below the limit will be clipped and not visible) | ||||
|     ImGuiTableFlags_NoKeepColumnsVisible            = 1 << 17,  // Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable. | ||||
|     ImGuiTableFlags_PreciseWidths                   = 1 << 18,  // 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. | ||||
|     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 << 19,  // Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze(). | ||||
|     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 << 20,  // Default if BordersOuterV is on. Enable outer-most padding. Generally desirable if you have headers. | ||||
|     ImGuiTableFlags_NoPadOuterX                     = 1 << 21,  // Default if BordersOuterV is off. Disable outer-most padding. | ||||
|     ImGuiTableFlags_NoPadInnerX                     = 1 << 22,  // Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off). | ||||
|     ImGuiTableFlags_PadOuterX                  = 1 << 21,  // Default if BordersOuterV is on. Enable outer-most padding. Generally desirable if you have headers. | ||||
|     ImGuiTableFlags_NoPadOuterX                = 1 << 22,  // Default if BordersOuterV is off. Disable outer-most 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 << 23,  // Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this create a child window, ScrollY is currently generally recommended when using ScrollX. | ||||
|     ImGuiTableFlags_ScrollY                         = 1 << 24,  // Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. | ||||
|     ImGuiTableFlags_ScrollX                    = 1 << 24,  // Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this create 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 << 25,  // Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount > 1). | ||||
|     ImGuiTableFlags_SortTristate                    = 1 << 26,  // Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0). | ||||
|     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). | ||||
|  | ||||
|     // [Internal] Combinations and masks | ||||
|     ImGuiTableFlags_SizingMask_                     = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame | ||||
|     ImGuiTableFlags_SizingMask_                = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame | ||||
|  | ||||
|     // Obsolete names (will be removed soon) | ||||
| #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS | ||||
| @@ -1157,39 +1161,39 @@ enum ImGuiTableFlags_ | ||||
| enum ImGuiTableColumnFlags_ | ||||
| { | ||||
|     // Input configuration flags | ||||
|     ImGuiTableColumnFlags_None                      = 0, | ||||
|     ImGuiTableColumnFlags_DefaultHide               = 1 << 0,   // Default as a hidden/disabled column. | ||||
|     ImGuiTableColumnFlags_DefaultSort               = 1 << 1,   // Default as a sorting column. | ||||
|     ImGuiTableColumnFlags_WidthStretch              = 1 << 2,   // Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is _SizingStretchSame or _SizingStretchProp). | ||||
|     ImGuiTableColumnFlags_WidthFixed                = 1 << 3,   // 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_NoHeaderWidth             = 1 << 12,  // Disable header text width contribution to automatic column width. | ||||
|     ImGuiTableColumnFlags_PreferSortAscending       = 1 << 13,  // Make the initial sort direction Ascending when first sorting on this column (default). | ||||
|     ImGuiTableColumnFlags_PreferSortDescending      = 1 << 14,  // Make the initial sort direction Descending when first sorting on this column. | ||||
|     ImGuiTableColumnFlags_IndentEnable              = 1 << 15,  // Use current Indent value when entering cell (default for column 0). | ||||
|     ImGuiTableColumnFlags_IndentDisable             = 1 << 16,  // Ignore current Indent value when entering cell (default for columns > 0). Indentation changes _within_ the cell will still be honored. | ||||
|     ImGuiTableColumnFlags_None                  = 0, | ||||
|     ImGuiTableColumnFlags_DefaultHide           = 1 << 0,   // Default as a hidden/disabled column. | ||||
|     ImGuiTableColumnFlags_DefaultSort           = 1 << 1,   // Default as a sorting column. | ||||
|     ImGuiTableColumnFlags_WidthStretch          = 1 << 2,   // Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is _SizingStretchSame or _SizingStretchProp). | ||||
|     ImGuiTableColumnFlags_WidthFixed            = 1 << 3,   // Column will not stretch. Preferable with horizontal scrolling enabled (default if table sizing policy is _SizingFixedFit and table is resizable). | ||||
|     ImGuiTableColumnFlags_NoResize              = 1 << 4,   // Disable manual resizing. | ||||
|     ImGuiTableColumnFlags_NoReorder             = 1 << 5,   // Disable manual reordering this column, this will also prevent other columns from crossing over this column. | ||||
|     ImGuiTableColumnFlags_NoHide                = 1 << 6,   // Disable ability to hide/disable this column. | ||||
|     ImGuiTableColumnFlags_NoClip                = 1 << 7,   // Disable clipping for this column (all NoClip columns will render in a same draw command). | ||||
|     ImGuiTableColumnFlags_NoSort                = 1 << 8,   // Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table). | ||||
|     ImGuiTableColumnFlags_NoSortAscending       = 1 << 9,   // Disable ability to sort in the ascending direction. | ||||
|     ImGuiTableColumnFlags_NoSortDescending      = 1 << 10,  // Disable ability to sort in the descending direction. | ||||
|     ImGuiTableColumnFlags_NoHeaderWidth         = 1 << 11,  // Disable header text width contribution to automatic column width. | ||||
|     ImGuiTableColumnFlags_PreferSortAscending   = 1 << 12,  // Make the initial sort direction Ascending when first sorting on this column (default). | ||||
|     ImGuiTableColumnFlags_PreferSortDescending  = 1 << 13,  // Make the initial sort direction Descending when first sorting on this column. | ||||
|     ImGuiTableColumnFlags_IndentEnable          = 1 << 14,  // Use current Indent value when entering cell (default for column 0). | ||||
|     ImGuiTableColumnFlags_IndentDisable         = 1 << 15,  // Ignore current Indent value when entering cell (default for columns > 0). Indentation changes _within_ the cell will still be honored. | ||||
|  | ||||
|     // Output status flags, read-only via TableGetColumnFlags() | ||||
|     ImGuiTableColumnFlags_IsEnabled                 = 1 << 20,  // Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags. | ||||
|     ImGuiTableColumnFlags_IsVisible                 = 1 << 21,  // Status: is visible == is enabled AND not clipped by scrolling. | ||||
|     ImGuiTableColumnFlags_IsSorted                  = 1 << 22,  // Status: is currently part of the sort specs | ||||
|     ImGuiTableColumnFlags_IsHovered                 = 1 << 23,  // Status: is hovered by mouse | ||||
|     ImGuiTableColumnFlags_IsEnabled             = 1 << 20,  // Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags. | ||||
|     ImGuiTableColumnFlags_IsVisible             = 1 << 21,  // Status: is visible == is enabled AND not clipped by scrolling. | ||||
|     ImGuiTableColumnFlags_IsSorted              = 1 << 22,  // Status: is currently part of the sort specs | ||||
|     ImGuiTableColumnFlags_IsHovered             = 1 << 23,  // 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) | ||||
|     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) | ||||
|  | ||||
|     // Obsolete names (will be removed soon) | ||||
| #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS | ||||
|     //ImGuiTableColumnFlags_WidthAuto               = ImGuiTableColumnFlags_WidthFixed | ImGuiTableColumnFlags_NoResize, // Column will not stretch and keep resizing based on submitted contents. | ||||
|     //ImGuiTableColumnFlags_WidthAuto           = ImGuiTableColumnFlags_WidthFixed | ImGuiTableColumnFlags_NoResize, // Column will not stretch and keep resizing based on submitted contents. | ||||
| #endif | ||||
| }; | ||||
|  | ||||
| @@ -1836,10 +1840,11 @@ struct ImGuiIO | ||||
|     // Miscellaneous options | ||||
|     bool        MouseDrawCursor;                // = false          // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations. | ||||
|     bool        ConfigMacOSXBehaviors;          // = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl. | ||||
|     bool        ConfigInputTextCursorBlink;     // = true           // Set to false to disable blinking cursor, for users who consider it distracting. | ||||
|     bool        ConfigInputTextCursorBlink;     // = true           // Enable blinking cursor (optional as some users consider it to be distracting). | ||||
|     bool        ConfigDragClickToInputText;     // = false          // [BETA] Enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). Not desirable on devices without a keyboard. | ||||
|     bool        ConfigWindowsResizeFromEdges;   // = true           // Enable resizing of windows from their edges and from the lower-left corner. This requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback. (This used to be a per-window ImGuiWindowFlags_ResizeFromAnySide flag) | ||||
|     bool        ConfigWindowsMoveFromTitleBarOnly; // = false       // [BETA] Set to true to only allow moving windows when clicked+dragged from the title bar. Windows without a title bar are not affected. | ||||
|     float       ConfigMemoryCompactTimer;       // = 60.0f          // [BETA] Free transient windows/tables memory buffers when unused for given amount of time. Set to -1.0f to disable. | ||||
|     bool        ConfigWindowsMoveFromTitleBarOnly; // = false       // Enable allowing to move windows only when clicking on their title bar. Does not apply to windows without a title bar. | ||||
|     float       ConfigMemoryCompactTimer;       // = 60.0f          // Timer (in seconds) to free transient windows/tables memory buffers when unused. Set to -1.0f to disable. | ||||
|  | ||||
|     //------------------------------------------------------------------ | ||||
|     // Platform Functions | ||||
|   | ||||
		Reference in New Issue
	
	Block a user