- Added imgui_tables.cpp file! Manually constructed project files will need the new file added!
- Backends: moved all backends files (imgui_impl_XXXX.cpp, imgui_impl_XXXX.h) from examples/ to backends/. (#3513)
- Removed redirecting functions/enums names that were marked obsolete in 1.60 (April 2017):
- Renamed ImDrawList::AddBezierCurve() to ImDrawList::AddBezierCubic(). Kept inline redirection function (will obsolete).
- Renamed ImDrawList::PathBezierCurveTo() to ImDrawList::PathBezierCubicCurveTo(). Kept inline redirection function (will obsolete).
- Removed redirecting functions/enums names that were marked obsolete in 1.60 (April 2018):
- io.RenderDrawListsFn pointer -> use ImGui::GetDrawData() value and call the render function of your backend
- ImGui::IsAnyWindowFocused() -> use ImGui::IsWindowFocused(ImGuiFocusedFlags_AnyWindow)
- ImGui::IsAnyWindowHovered() -> use ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow)
@ -117,6 +119,11 @@ Breaking Changes:
- Removed redirecting functions/enums names that were marked obsolete in 1.61 (May 2018):
- InputFloat (... int decimal_precision ...) -> use InputFloat (... const char* format ...) with format = "%.Xf" where X was value for decimal_precision.
- same for InputFloat2()/InputFloat3()/InputFloat4() variants taking a `int decimal_precision` parameter.
- Removed redirecting functions/enums names that were marked obsolete in 1.63 (August 2018):
- ImGui::IsItemDeactivatedAfterChange() -> use ImGui::IsItemDeactivatedAfterEdit().
- ImGuiCol_ModalWindowDarkening -> use ImGuiCol_ModalWindowDimBg
- ImGuiInputTextCallback -> use ImGuiTextEditCallback
- ImGuiInputTextCallbackData -> use ImGuiTextEditCallbackData
- If you were still using the old names, while you are cleaning up, considering enabling
IMGUI_DISABLE_OBSOLETE_FUNCTIONS in imconfig.h even temporarily to have a pass at finding
and removing up old API calls, if any remaining.
@ -148,6 +155,7 @@ Other Changes:
- Drag and Drop: Fix drag and drop to tie same-size drop targets by choosen the later one. Fixes dragging
into a full-window-sized dockspace inside a zero-padded window. (#3519, #2717) [@Black-Cat]
- Checkbox: Added CheckboxFlags() helper with int* type.
- Clipper: Fixed incorrect end-list positioning when using ImGuiListClipper with 1 item (bug in 1.79). (#3663) [@nyorain]
- InputText: Fixed updating cursor/selection position when a callback altered the buffer in a way
where the byte count is unchanged but the decoded character count changes. (#3587) [@gqw]
- InputText: Fixed swiching from single to multi-line while preserving same ID.
@ -156,6 +164,8 @@ Other Changes:
feedback and control of keyboard/gamepad navigation highlight and mouse hover disable flag. (#787, #2048)
- Metrics: Fixed mishandling of ImDrawCmd::VtxOffset in wireframe mesh renderer.
- Metrics: Rebranded as "Dear ImGui Metrics/Debugger" to clarify its purpose.
// Step 2: calculate the actual range of elements to display, and position the cursor before the first element
if(StepNo==2)
{
@ -5062,6 +5077,7 @@ bool ImGui::IsItemEdited()
}
// Allow last item to be overlapped by a subsequent item. Both may be activated during the same frame before the later one takes priority.
// FIXME: Although this is exposed, its interaction and ideal idiom with using ImGuiButtonFlags_AllowItemOverlap flag are extremely confusing, need rework.
enum{TRT_OuterRect,TRT_WorkRect,TRT_HostClipRect,TRT_InnerClipRect,TRT_BackgroundClipRect,TRT_ColumnsRect,TRT_ColumnsClipRect,TRT_ColumnsContentHeadersUsed,TRT_ColumnsContentHeadersIdeal,TRT_ColumnsContentFrozen,TRT_ColumnsContentUnfrozen,TRT_Count};// Tables Rect Type
enum{TRT_OuterRect,TRT_InnerRect,TRT_WorkRect,TRT_HostClipRect,TRT_InnerClipRect,TRT_BackgroundClipRect,TRT_ColumnsRect,TRT_ColumnsClipRect,TRT_ColumnsContentHeadersUsed,TRT_ColumnsContentHeadersIdeal,TRT_ColumnsContentFrozen,TRT_ColumnsContentUnfrozen,TRT_Count};// Tables Rect Type
// (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)
#pragma GCC diagnostic ignored "-Wclass-memaccess" // [__GNUC__ >= 8] warning: 'memset/memcpy' clearing/writing an object of type 'xxxx' with no trivial copy-assignment; use assignment or value-initialization instead
#pragma GCC diagnostic ignored "-Wclass-memaccess" // [__GNUC__ >= 8] warning: 'memset/memcpy' clearing/writing an object of type 'xxxx' with no trivial copy-assignment; use assignment or value-initialization instead
@ -195,10 +196,10 @@ typedef int ImGuiWindowFlags; // -> enum ImGuiWindowFlags_ // Flags: f
typedefvoid*ImTextureID;// User data for rendering backend to identify a texture. This is whatever to you want it to be! read the FAQ about ImTextureID for details.
#endif
typedefunsignedintImGuiID;// A unique ID used by widgets, typically hashed from a stack of string.
IM_VEC4_CLASS_EXTRA// Define additional constructors and implicit cast operators in imconfig.h to convert back and forth between your math types and ImVec4.
IMGUI_APIImDrawData*GetDrawData();// valid after Render() and until the next call to NewFrame(). this is what you have to render.
// Demo, Debug, Information
IMGUI_APIvoidShowDemoWindow(bool*p_open=NULL);// create Demo window (previously called ShowTestWindow). demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
IMGUI_APIvoidShowAboutWindow(bool*p_open=NULL);// create About window. display Dear ImGui version, credits and build/system information.
IMGUI_APIvoidShowDemoWindow(bool*p_open=NULL);// create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
IMGUI_APIvoidShowMetricsWindow(bool*p_open=NULL);// create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc.
IMGUI_APIvoidShowAboutWindow(bool*p_open=NULL);// create About window. display Dear ImGui version, credits and build/system information.
IMGUI_APIvoidShowStyleEditor(ImGuiStyle*ref=NULL);// add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style)
IMGUI_APIboolShowStyleSelector(constchar*label);// add style selector block (not a window), essentially a combo listing the default styles.
IMGUI_APIvoidShowFontSelector(constchar*label);// add font selector block (not a window), essentially a combo listing the loaded fonts.
IMGUI_APIvoidShowUserGuide();// add basic help/info block (not a window): how to manipulate ImGui as a end-user (mouse/keyboard controls).
IMGUI_APIconstchar*GetVersion();// get the compiled version string e.g. "1.23" (essentially the compiled value for IMGUI_VERSION)
IMGUI_APIconstchar*GetVersion();// get the compiled version string e.g. "1.80 WIP" (essentially the value for IMGUI_VERSION from the compiled version of imgui.cpp)
// - Begin() = push window to the stack and start appending to it. End() = pop window from the stack.
@ -350,20 +351,21 @@ namespace ImGui
IMGUI_APIvoidSetWindowFocus(constchar*name);// set named window to be focused / top-most. use NULL to remove focus.
// Content region
// - Those functions are bound to be redesigned soon (they are confusing, incomplete and return values in local window coordinates which increases confusion)
IMGUI_APIImVec2GetContentRegionMax();// current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates
// - Retrieve available space from a given point. GetContentRegionAvail() is frequently useful.
// - Those functions are bound to be redesigned (they are confusing, incomplete and the Min/Max return values are in local window coordinates which increases confusion)
IMGUI_APIImVec2GetContentRegionMax();// current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates
IMGUI_APIImVec2GetWindowContentRegionMin();// content boundaries min (roughly (0,0)-Scroll), in window coordinates
IMGUI_APIImVec2GetWindowContentRegionMax();// content boundaries max (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates
IMGUI_APIfloatGetWindowContentRegionWidth();//
// Windows Scrolling
IMGUI_APIfloatGetScrollX();// get scrolling amount [0..GetScrollMaxX()]
IMGUI_APIfloatGetScrollY();// get scrolling amount [0..GetScrollMaxY()]
IMGUI_APIfloat GetScrollMaxX();// get maximum scrolling amount ~~ ContentSize.x - WindowSize.x
IMGUI_APIfloat GetScrollMaxY();// get maximum scrolling amount ~~ ContentSize.y - WindowSize.y
IMGUI_APIvoid SetScrollX(floatscroll_x);// set scrolling amount [0..GetScrollMaxX()]
IMGUI_APIvoid SetScrollY(floatscroll_y);// set scrolling amount [0..GetScrollMaxY()]
IMGUI_APIfloatGetScrollX();// get scrolling amount [0..GetScrollMaxX()]
IMGUI_APIfloatGetScrollY();// get scrolling amount [0..GetScrollMaxY()]
IMGUI_APIvoid SetScrollX(floatscroll_x);// set scrolling amount [0 .. GetScrollMaxX()]
IMGUI_APIvoid SetScrollY(floatscroll_y);// set scrolling amount [0 .. GetScrollMaxY()]
IMGUI_APIfloat GetScrollMaxX();// get maximum scrolling amount ~~ ContentSize.x - WindowSize.x - DecorationsSize.x
IMGUI_APIfloat GetScrollMaxY();// get maximum scrolling amount ~~ ContentSize.y - WindowSize.y - DecorationsSize.y
IMGUI_APIvoidSetScrollHereX(floatcenter_x_ratio=0.5f);// adjust scrolling amount to make current cursor position visible. center_x_ratio=0.0: left, 0.5: center, 1.0: right. When using to make a "default/current item" visible, consider using SetItemDefaultFocus() instead.
IMGUI_APIvoidSetScrollHereY(floatcenter_y_ratio=0.5f);// adjust scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: center, 1.0: bottom. When using to make a "default/current item" visible, consider using SetItemDefaultFocus() instead.
IMGUI_APIvoidSetScrollFromPosX(floatlocal_x,floatcenter_x_ratio=0.5f);// adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to compute a valid position.
@ -372,23 +374,16 @@ namespace ImGui
// Parameters stacks (shared)
IMGUI_APIvoidPushFont(ImFont*font);// use NULL as a shortcut to push default font
IMGUI_APIvoidPushStyleVar(ImGuiStyleVaridx,floatval);// modify a style float variable. always use this if you modify the style after NewFrame().
IMGUI_APIvoidPushStyleVar(ImGuiStyleVaridx,constImVec2&val);// modify a style ImVec2 variable. always use this if you modify the style after NewFrame().
IMGUI_APIvoidPopStyleVar(intcount=1);
IMGUI_APIvoidPushAllowKeyboardFocus(boolallow_keyboard_focus);// allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
IMGUI_APIvoidPopAllowKeyboardFocus();
IMGUI_APIvoidPushButtonRepeat(boolrepeat);// in 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting). Note that you can call IsItemActive() after any Button() to tell if the button is held in the current frame.
IMGUI_APIvoidPopButtonRepeat();
IMGUI_APIconstImVec4&GetStyleColorVec4(ImGuiColidx);// retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), otherwise use GetColorU32() to get style color with style alpha baked in.
IMGUI_APIImFont*GetFont();// get current font
IMGUI_APIfloatGetFontSize();// get current font size (= height in pixels) of current font with current scale applied
IMGUI_APIImVec2GetFontTexUvWhitePixel();// get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API
IMGUI_APIImU32GetColorU32(ImGuiColidx,floatalpha_mul=1.0f);// retrieve given style color with style alpha applied and optional extra alpha multiplier
IMGUI_APIImU32GetColorU32(constImVec4&col);// retrieve given color with style alpha applied
IMGUI_APIImU32GetColorU32(ImU32col);// retrieve given color with style alpha applied
// Parameters stacks (current window)
IMGUI_APIvoidPushItemWidth(floatitem_width);// push width of items for common large "item+label" widgets. >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -FLT_MIN always align width to the right side). 0.0f = default to ~2/3 of windows width,
@ -398,6 +393,15 @@ namespace ImGui
IMGUI_APIvoidPushTextWrapPos(floatwrap_local_pos_x=0.0f);// push word-wrapping position for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space
IMGUI_APIvoidPopTextWrapPos();
// Style read access
IMGUI_APIImFont*GetFont();// get current font
IMGUI_APIfloatGetFontSize();// get current font size (= height in pixels) of current font with current scale applied
IMGUI_APIImVec2GetFontTexUvWhitePixel();// get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API
IMGUI_APIImU32GetColorU32(ImGuiColidx,floatalpha_mul=1.0f);// retrieve given style color with style alpha applied and optional extra alpha multiplier, packed as a 32-bit value suitable for ImDrawList
IMGUI_APIImU32GetColorU32(constImVec4&col);// retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
IMGUI_APIImU32GetColorU32(ImU32col);// retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
IMGUI_APIconstImVec4&GetStyleColorVec4(ImGuiColidx);// retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), otherwise use GetColorU32() to get style color with style alpha baked in.
// Cursor / Layout
// - By "cursor" we mean the current output position.
// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
IMGUI_APIvoidBullet();// draw a small circle + keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses
// Widgets: Combo Box
@ -620,7 +624,7 @@ namespace ImGui
IMGUI_APIboolMenuItem(constchar*label,constchar*shortcut,bool*p_selected,boolenabled=true);// return true when activated + toggle (*p_selected) if p_selected != NULL
// Tooltips
// - Tooltip are windows following the mouse which do not take focus away.
// - Tooltip are windows following the mouse. They do not take focus away.
IMGUI_APIvoidBeginTooltip();// begin/append a tooltip window. to create full-featured tooltip (with any kind of items).
IMGUI_APIvoidEndTooltip();
IMGUI_APIvoidSetTooltip(constchar*fmt,...)IM_FMTARGS(1);// set a text-only tooltip, typically use with ImGui::IsItemHovered(). override any previous call to SetTooltip().
@ -691,7 +695,7 @@ namespace ImGui
// TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear!
IMGUI_APIvoidEndTable();// only call EndTable() if BeginTable() returns true!
IMGUI_APIvoidTableNextRow(ImGuiTableRowFlagsrow_flags=0,floatmin_row_height=0.0f);// append into the first cell of a new row.
IMGUI_APIboolTableNextColumn();// append into the next column (or first column of next row if currently in last column). Return true when column is visible.
@ -766,7 +770,6 @@ namespace ImGui
IMGUI_APIvoidLogText(constchar*fmt,...)IM_FMTARGS(1);// pass text data straight to log (without being displayed)
// Drag and Drop
// - [BETA API] API may evolve!
// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip as replacement)
IMGUI_APIboolBeginDragDropSource(ImGuiDragDropFlagsflags=0);// call when the current item is active. If this return true, you can call SetDragDropPayload() + EndDragDropSource()
IMGUI_APIboolSetDragDropPayload(constchar*type,constvoid*data,size_tsz,ImGuiCondcond=0);// type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui.
@ -777,6 +780,7 @@ namespace ImGui
IMGUI_APIconstImGuiPayload*GetDragDropPayload();// peek directly into the current payload from anywhere. may return NULL. use ImGuiPayload::IsDataType() to test for the payload type.
// Clipping
// - Mouse hovering is affected by ImGui::PushClipRect() calls, unlike direct calls to ImDrawList::PushClipRect() which are render only.
// - Using Stretch columns OFTEN DOES NOT MAKE SENSE if ScrollX is on, UNLESS you have specified a value for 'inner_width' in BeginTable().
// - Mixing up columns with different sizing policy is possible BUT can be tricky and has some side-effects and restrictions.
// (their visible order and the scrolling state have subtle but necessary effects on how they can be manually resized).
// The typical use of mixing sizing policies is to have ScrollX disabled, one or two Stretch Column and many Fixed Columns.
// The typical use of mixing sizing policies is to have ScrollX disabled, first Fixed columns and then one or two TRAILING Stretch columns.
enumImGuiTableFlags_
{
// Features
@ -1118,21 +1122,21 @@ enum ImGuiTableFlags_
ImGuiTableFlags_ColumnsWidthStretch=1<<13,// Default if ScrollX is off. Columns will default to use _WidthStretch. Read description above for more details.
ImGuiTableFlags_ColumnsWidthFixed=1<<14,// Default if ScrollX is on. Columns will default to use _WidthFixed or _WidthAutoResize policy (if Resizable is off). Read description above for more details.
ImGuiTableFlags_SameWidths=1<<15,// Make all columns the same widths which is useful with Fixed columns policy (but granted by default with Stretch policy + no resize). Implicitly enable ImGuiTableFlags_NoKeepColumnsVisible and disable ImGuiTableFlags_Resizable.
ImGuiTableFlags_NoHeadersWidth =1<<16,// Disable headers' contribution to automatic width calculation.
ImGuiTableFlags_NoHostExtendY =1<<17,// Disable extending past the limit set by outer_size.y, only meaningful when neither of ScrollX|ScrollY are set (data below the limit will be clipped and not visible)
ImGuiTableFlags_NoKeepColumnsVisible =1<<18,// Disable keeping column always minimally visible when ScrollX is off and table gets too small.
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.
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().
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.
// 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().
// Padding
ImGuiTableFlags_PadOuterX=1<<21,// Default if BordersOuterV is on. Enable outer-most padding.
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).
ImGuiTableFlags_PadOuterX=1<<20,// Default if BordersOuterV is on. Enable outer-most padding.
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).
// 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 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.
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.
// 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).
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).
};
// Flags for ImGui::TableSetupColumn()
@ -1336,7 +1340,7 @@ enum ImGuiKeyModFlags_
// Gamepad/Keyboard navigation
// Keyboard: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.KeysDown[] + io.KeyMap[] arrays.
// Gamepad: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable. Backend: set ImGuiBackendFlags_HasGamepad and fill the io.NavInputs[] fields before calling NewFrame(). Note that io.NavInputs[] is cleared by EndFrame().
// Read instructions in imgui.cpp for more details. Download PNG/PSD at http://goo.gl/9LgVZW.
// Read instructions in imgui.cpp for more details. Download PNG/PSD at http://dearimgui.org/controls_sheets.
enumImGuiNavInput_
{
// Gamepad Mapping
@ -1467,11 +1471,6 @@ enum ImGuiCol_
ImGuiCol_NavWindowingDimBg,// Darken/colorize entire screen behind the CTRL+TAB window list, when active
ImGuiCol_ModalWindowDimBg,// Darken/colorize entire screen behind a modal window, when one is active
ImGuiCol_COUNT
// Obsolete names (will be removed)
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
,ImGuiCol_ModalWindowDarkening=ImGuiCol_ModalWindowDimBg// [renamed in 1.63]
#endif
};
// Enumeration for PushStyleVar() / PopStyleVar() to temporarily modify the ImGuiStyle structure.
// We call C++ constructor on own allocated memory via the placement "new(ptr) Type()" syntax.
// Defining a custom placement new() with a custom parameter allows us to bypass including <new> which on some platforms complains when user has disabled exceptions.
@ -1643,7 +1645,7 @@ inline void operator delete(void*, ImNewWrapper, void*) {} // This is only re
// Lightweight std::vector<>-like class to avoid dragging dependencies (also, some implementations of STL with debug enabled are absurdly slow, we bypass it so our code runs fast in debug).
// - You generally do NOT need to care or use this ever. But we need to make it available in imgui.h because some of our public structures are relying on it.
boolMouseDrawCursor;// = 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.
boolConfigMacOSXBehaviors;// = 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 (was called io.OptMacOSXBehaviors prior to 1.63)
boolConfigInputTextCursorBlink;// = true // Set to false to disable blinking cursor, for users who consider it distracting. (was called: io.OptCursorBlink prior to 1.63)
boolConfigMacOSXBehaviors;// = 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.
boolConfigInputTextCursorBlink;// = true // Set to false to disable blinking cursor, for users who consider it distracting.
boolConfigWindowsResizeFromEdges;// = 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)
boolConfigWindowsMoveFromTitleBarOnly;// = 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.
floatConfigMemoryCompactTimer;// = 60.0f // [BETA] Free transient windows/tables memory buffers when unused for given amount of time. Set to -1.0f to disable.
IMGUI_APIvoidAddBezierCubic(constImVec2&p1,constImVec2&p2,constImVec2&p3,constImVec2&p4,ImU32col,floatthickness,intnum_segments=0);// Cubic Bezier (4 control points)
IMGUI_APIvoidAddBezierQuadratic(constImVec2&p1,constImVec2&p2,constImVec2&p3,ImU32col,floatthickness,intnum_segments=0);// Quadratic Bezier (3 control points)
// Image primitives
// - Read FAQ to understand what ImTextureID is.
@ -2478,8 +2480,9 @@ struct ImDrawList
inlinevoidPathFillConvex(ImU32col){AddConvexPolyFilled(_Path.Data,_Path.Size,col);_Path.Size=0;}// Note: Anti-aliased filling requires points to be in clockwise order.
inlinevoidPrimVtx(constImVec2&pos,constImVec2&uv,ImU32col){PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx);PrimWriteVtx(pos,uv,col);}// Write vertex with unique index
//ImGui::CheckboxFlags("ImGuiTableFlags_ScrollX", &flags, ImGuiTableFlags_ScrollX); // FIXME-TABLE: Explain or fix the effect of enable Scroll on outer_size
ImGui::SameLine();HelpMarker("Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off)");
ImGui::SameLine();HelpMarker("When sorting is enabled: allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0).");
flags&=~ImGuiTableFlags_ColumnsWidthStretch;// Can't specify both sizing polices so we clear the other
ImGui::SameLine();HelpMarker("[Default if ScrollX is on]\nEnlarge as needed: enable scrollbar if ScrollX is enabled, otherwise extend parent window's contents rectangle. Only Fixed columns allowed. Stretched columns will calculate their width assuming no scrolling.");
HelpMarker("If scrolling is disabled (ScrollX and ScrollY not set), the table is output directly in the parent window. OuterSize.y then becomes the minimum size for the table, which will extend vertically if there are more rows (unless NoHostExtendV is set).");
HelpMarker("If scrolling is disabled (ScrollX and ScrollY not set):\n"
"- The table is output directly in the parent window.\n"
"- OuterSize.x < 0.0f will right-align the table.\n"
"- OuterSize.x = 0.0f will narrow fit the table unless there are any Stretch column.\n"
"- OuterSize.y then becomes the minimum size for the table, which will extend vertically if there are more rows (unless NoHostExtendY is set).");
// From a user point of view we will tend to use 'inner_width' differently depending on whether our table is embedding scrolling.
// To facilitate experimentation we expose two values and will select the right one depending on active flags.
IMGUI_APIImVec2ImBezierClosestPoint(constImVec2&p1,constImVec2&p2,constImVec2&p3,constImVec2&p4,constImVec2&p,intnum_segments);// For curves with explicit number of segments
IMGUI_APIImVec2ImBezierClosestPointCasteljau(constImVec2&p1,constImVec2&p2,constImVec2&p3,constImVec2&p4,constImVec2&p,floattess_tol);// For auto-tessellated curves you can use tess_tol = style.CurveTessellationTol
IMGUI_APIImVec2ImBezierCubicClosestPoint(constImVec2&p1,constImVec2&p2,constImVec2&p3,constImVec2&p4,constImVec2&p,intnum_segments);// For curves with explicit number of segments
IMGUI_APIImVec2ImBezierCubicClosestPointCasteljau(constImVec2&p1,constImVec2&p2,constImVec2&p3,constImVec2&p4,constImVec2&p,floattess_tol);// For auto-tessellated curves you can use tess_tol = style.CurveTessellationTol
floatColumnsTotalWidth;// Sum of current column width
floatColumnsAutoFitWidth;// Sum of ideal column width in order nothing to be clipped, used for auto-fitting and content width submission in outer window
floatResizedColumnNextWidth;
floatResizeLockMinContentsX2;// Lock minimum contents width while resizing down in order to not create feedback loops. But we allow growing the table.
floatRefScale;// Reference scale to be able to rescale columns on font/dpi changes.
ImRectOuterRect;// Note: OuterRect.Max.y is often FLT_MAX until EndTable(), unless a height has been specified in BeginTable().
ImRectOuterRect;// Note: for non-scrolling table, OuterRect.Max.y is often FLT_MAX until EndTable(), unless a height has been specified in BeginTable().
ImRectInnerRect;// InnerRect but without decoration. As with OuterRect, for non-scrolling tables, InnerRect.Max.y is
ImRectWorkRect;
ImRectInnerClipRect;
ImRectBgClipRect;// We use this to cpu-clip cell background color fill
ImRectBgClipRectForDrawCmd;
ImRectBg0ClipRectForDrawCmd;// Actual ImDrawCmd clip rect for BG0/1 channel. This tends to be == OuterWindow->ClipRect at BeginTable() because output in BG0/BG1 is cpu-clipped
ImRectBg2ClipRectForDrawCmd;// Actual ImDrawCmd clip rect for BG2 channel. This tends to be a correct, tight-fit, because output to BG2 are done by widgets relying on regular ClipRect.
ImRectHostClipRect;// This is used to check if we can eventually merge our columns draw calls into the current draw call of the current window.
ImRectHostBackupWorkRect;// Backup of InnerWindow->WorkRect at the end of BeginTable()
ImRectHostBackupParentWorkRect;// Backup of InnerWindow->ParentWorkRect at the end of BeginTable()
ImRectHostBackupClipRect;// Backup of InnerWindow->ClipRect during PushTableBackground()/PopTableBackground()
ImRectHostBackupInnerClipRect;// Backup of InnerWindow->ClipRect during PushTableBackground()/PopTableBackground()
ImVec2HostBackupPrevLineSize;// Backup of InnerWindow->DC.PrevLineSize at the end of BeginTable()
ImVec2HostBackupCurrLineSize;// Backup of InnerWindow->DC.CurrLineSize at the end of BeginTable()
ImVec2HostBackupCursorMaxPos;// Backup of InnerWindow->DC.CursorMaxPos at the end of BeginTable()
@ -2257,8 +2261,9 @@ struct ImGuiTable
ImGuiTableColumnIdxHeldHeaderColumn;// Index of column header being held.
ImGuiTableColumnIdxReorderColumn;// Index of column being reordered. (not cleared)
ImGuiTableColumnIdxReorderColumnDir;// -1 or +1
ImGuiTableColumnIdxLeftMostStretchedColumn;// Index of left-most stretched column.
ImGuiTableColumnIdxRightMostStretchedColumn;// Index of right-most stretched column.
ImGuiTableColumnIdxRightMostEnabledColumn;// Index of right-most non-hidden column.
ImGuiTableColumnIdxLeftMostStretchedColumnDisplayOrder;// Display order of left-most stretched column.
ImGuiTableColumnIdxContextPopupColumn;// Column right-clicked on, of -1 if opening context menu from a neutral/empty spot
ImGuiTableDrawChannelIdxBg1DrawChannelCurrent;// For Selectable() and other widgets drawing accross columns after the freezing line. Index within DrawSplitter.Channels[]
ImGuiTableDrawChannelIdxBg1DrawChannelUnfrozen;
ImGuiTableDrawChannelIdxBg2DrawChannelCurrent;// For Selectable() and other widgets drawing accross columns after the freezing line. Index within DrawSplitter.Channels[]
ImGuiTableDrawChannelIdxBg2DrawChannelUnfrozen;
boolIsLayoutLocked;// Set by TableUpdateLayout() which is called when beginning the first row.
boolIsInsideRow;// Set when inside TableBeginRow()/TableEndRow().
boolIsInitializing;
@ -2280,6 +2285,7 @@ struct ImGuiTable
boolIsResetAllRequest;
boolIsResetDisplayOrderRequest;
boolIsUnfrozen;// Set when we got past the frozen row.
boolIsOuterRectAutoFitX;// Set when outer_size.x == 0.0f in BeginTable(), scrolling is disabled, and there are stretch columns.
boolMemoryCompacted;
boolHostSkipItems;// Backup of InnerWindow->SkipItem at the end of BeginTable(), because we will overwrite InnerWindow->SkipItem on a per-column basis