//#define IMGUI_API __attribute__((visibility("default"))) // GCC/Clang: override visibility when set is hidden
//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to clean your code of obsolete function/names.
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
//---- Disable all of Dear ImGui or don't implement standard windows/tools.
// It is very strongly recommended to NOT disable the demo windows and debug tool during development. They are extremely useful in day to day work. Please read comments in imgui_demo.cpp.
//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty.
#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowIDStackToolWindow() will be empty.
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty.
//#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowIDStackToolWindow() will be empty.
//---- Don't implement some functions to reduce linkage requirements.
#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.92.0 WIP"
#define IMGUI_VERSION_NUM 19198
#define IMGUI_VERSION "1.92.0"
#define IMGUI_VERSION_NUM 19200
#define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000
#define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198
@ -329,7 +329,7 @@ IM_MSVC_RUNTIME_CHECKS_RESTORE
// - In v1.91.4 (2024/10/08): the default type for ImTextureID was changed from 'void*' to 'ImU64'. This allowed backends requirig 64-bit worth of data to build on 32-bit architectures. Use intermediary intptr_t cast and read FAQ if you have casting warnings.
// - In v1.92.0 (2025/XX/XX): added ImTextureRef which carry either a ImTextureID either a pointer to internal texture atlas. All user facing functions taking ImTextureID changed to ImTextureRef
#ifndef ImTextureID
typedefvoid*ImTextureID;// Default: store a pointer or an integer fitting in a pointer (most renderer backends are ok with that)
typedefImU64ImTextureID;// Default: store up to 64-bits (any pointer or integer). A majority of backends are ok with that.
#endif
// Define this if you need 0 to be a valid ImTextureID for your backend.
ImTextureRef(void*tex_id){_TexData=NULL;_TexID=(ImTextureID)(size_t)tex_id;}// For legacy backends casting to ImTextureID
#endif
inlineImTextureIDGetTexID()const;// == (_TexData ? _TexData->TexID : _TexID) // Implemented below in the file.
@ -490,23 +493,27 @@ namespace ImGui
IMGUI_APIvoidSetScrollFromPosY(floatlocal_y,floatcenter_y_ratio=0.5f);// adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to compute a valid position.
// Parameters stacks (font)
// - PushFont(font, 0.0f) // Change font and keep current size
// - PushFont(NULL, 20.0f) // Keep font and change current size
// - PushFont(font, 20.0f) // Change font and set size to 20.0f
// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size.
// - PushFont(font, font->LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior.
// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted.
// - Before 1.92: PushFont() always used font default size.
// - Since 1.92: PushFont() preserve the current shared font size.
// - To use old behavior (single size font, size specified in AddFontXXX() call:
// - Use 'PushFont(font, font->LegacySize)' at call site
// - Or set 'ImFontConfig::Flags |= ImFontFlags_DefaultToLegacySize' before calling AddFont(), and then 'PushFont(font)' will use this size.
// - External scale factors are applied over the provided value.
// *IMPORTANT* If you want to scale an existing font size:
// - OK: PushFontSize(style.FontSizeBase * factor) (= value before external scale factors applied).
// - KO: PushFontSize(GetFontSize() * factor) (= value after external scale factors applied. external scale factors are style.FontScaleMain + per-viewport scales.).
IMGUI_APIvoidPushFont(ImFont*font,floatfont_size_base=-1,floatfont_weight=-1);// use NULL as a shortcut to push default font. Use <0.0f to keep current font size.
// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition.
// - PushFont(font) before 1.92 = PushFont(font, font->LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function.
// *IMPORTANT* global scale factors are applied over the provided size.
// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more.
// - If you want to apply a factor to the _current_ font size:
// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing
// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger
// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
IMGUI_APIvoidPushFont(ImFont*font,floatfont_size_base_unscaled,floatfont_weight);// Use NULL as a shortcut to keep current font. Use 0.0f to keep current size.
IMGUI_APIfloatGetFontSize();// get current scaled font size (= height in pixels). AFTER global scale factors applied. *IMPORTANT* DO NOT PASS THIS VALUE TO PushFont()! Use ImGui::GetStyle().FontSizeBase to get value before global scale factors.
IMGUI_APIfloatGetFontWeight();// get current font weight
IMGUI_APIImFontBaked*GetFontBaked();// get current font bound at current size // == GetFont()->GetFontBaked(GetFontSize())
// Parameters stacks (shared)
IMGUI_APIvoidPushStyleColor(ImGuiColidx,ImU32col);// modify a style color. always use this if you modify the style after NewFrame().
@ -530,11 +537,7 @@ namespace ImGui
// Style read access
// - Use the ShowStyleEditor() function to interactively see/edit the colors.
IMGUI_APIImFont*GetFont();// get current font
IMGUI_APIfloatGetFontSize();// get current font size (= height in pixels) of current font with external scale factors applied. Use ImGui::GetStyle().FontSizeBase to get value before external scale factors.
IMGUI_APIfloatGetFontWeight();
IMGUI_APIImVec2GetFontTexUvWhitePixel();// get UV coordinate for a white pixel, useful to draw custom shapes via the ImDrawList API
IMGUI_APIImFontBaked*GetFontBaked();// get current font bound at current size // == GetFont()->GetFontBaked(GetFontSize())
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,floatalpha_mul=1.0f);// retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
ImGuiKey_LeftCtrl,ImGuiKey_LeftShift,ImGuiKey_LeftAlt,ImGuiKey_LeftSuper,// Also see ImGuiMod_Ctrl, ImGuiMod_Shift, ImGuiMod_Alt, ImGuiMod_Super below!
floatFontSizeBase;// Current base font size before external scaling factors are applied. Use PushFont()/PushFontSize() to modify. Use ImGui::GetFontSize() to obtain scaled value.
floatFontScaleMain;// Main scale factor. May be set by application once, or exposed to end-user.
floatFontScaleDpi;// Additional scale factor from viewport/monitor contents scale. When io.ConfigDpiScaleFonts is enabled, this is automatically overwritten when changing monitor DPI.
floatFontSizeBase;// Current base font size before external global factors are applied. Use PushFont(NULL, size) to modify. Use ImGui::GetFontSize() to obtain scaled value.
floatFontScaleMain;// Main global scale factor. May be set by application once, or exposed to end-user.
floatFontScaleDpi;// Additional global scale factor from viewport/monitor contents scale. When io.ConfigDpiScaleFonts is enabled, this is automatically overwritten when changing monitor DPI.
floatAlpha;// Global alpha applies to everything in Dear ImGui.
floatDisabledAlpha;// Additional alpha multiplier applied by BeginDisabled(). Multiply over current value of Alpha.
@ -2281,6 +2286,8 @@ struct ImGuiStyle
ImVec2SeparatorTextPadding;// Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
ImVec2DisplayWindowPadding;// Apply to regular windows: amount which we enforce to keep visible when moving near edges of your screen.
ImVec2DisplaySafeAreaPadding;// Apply to every windows, menus, popups, tooltips: amount where we avoid displaying contents. Adjust if you cannot see the edges of your screen (e.g. on a TV where scaling has not been configured).
ImVec2ScrollStepSize;// Step size for scrolling, 0.0f uses default ImGui behaviour.
floatScrollSmooth;// Smooth scrolling amount: 1.0f no smoothing. Anything above 1.0f will make the scroll delta more smooth.
floatMouseCursorScale;// Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). We apply per-monitor DPI scaling over this scale. May be removed later.
boolAntiAliasedLines;// Enable anti-aliased lines/borders. Disable if you are really tight on CPU/GPU. Latched at the beginning of the frame (copied to ImDrawList).
boolAntiAliasedLinesUseTex;// Enable anti-aliased lines/borders using textures where possible. Require backend to render with bilinear filtering (NOT point/nearest filtering). Latched at the beginning of the frame (copied to ImDrawList).
@ -2299,9 +2306,6 @@ struct ImGuiStyle
ImGuiHoveredFlagsHoverFlagsForTooltipMouse;// Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using mouse.
ImGuiHoveredFlagsHoverFlagsForTooltipNav;// Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using keyboard/gamepad.
ImVec2ScrollStepSize;// Step size for scrolling, 0.0f uses default ImGui behaviour.
floatScrollSmooth;// Smooth scrolling amount: 1.0f no smoothing. Anything above 1.0f will make the scroll delta more smooth.
// [Internal]
float_MainScale;// FIXME-WIP: Reference scale, as applied by ScaleAllSizes().
float_NextFrameFontSizeBase;// FIXME: Temporary hack until we finish remaining work.
@ -2520,7 +2524,7 @@ struct ImGuiIO
// Other state maintained from data above + IO function calls
ImGuiKeyChordKeyMods;// Key mods flags (any of ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Alt/ImGuiMod_Super flags, same as io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags. Read-only, updated by NewFrame()
ImGuiKeyDataKeysData[ImGuiKey_NamedKey_COUNT];// Key state for all known keys. Use IsKeyXXX() functions to access this.
ImGuiKeyDataKeysData[ImGuiKey_NamedKey_COUNT];// Key state for all known keys. MUST use 'key - ImGuiKey_NamedKey_BEGIN' as index. Use IsKeyXXX() functions to access this.
boolWantCaptureMouseUnlessPopupClose;// Alternative to WantCaptureMouse: (WantCaptureMouse == true && WantCaptureMouseUnlessPopupClose == false) when a click over void is expected to close a popup.
ImVec2MousePosPrev;// Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)
ImVec2MouseClickedPos[5];// Position at time of clicking
floatSizePixels;// // Size in pixels for rasterizer (more or less maps to the resulting font height).
floatWeight;
constImWchar*GlyphRanges;// NULL // *LEGACY* THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list).
constImWchar*GlyphExcludeRanges;// NULL // Pointer to a VERY SHORT user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list). This is very close to GlyphRanges[] but designed to exclude ranges from a font source, when merging fonts with overlapping glyphs. Use "Input Glyphs Overlap Detection Tool" to find about your overlapping ranges.
constImWchar*GlyphExcludeRanges;// NULL // Pointer to a small user-provided list of Unicode ranges (2 value per range, values are inclusive, zero-terminated list). This is very close to GlyphRanges[] but designed to exclude ranges from a font source, when merging fonts with overlapping glyphs. Use "Input Glyphs Overlap Detection Tool" to find about your overlapping ranges.
//ImVec2 GlyphExtraSpacing; // 0, 0 // (REMOVED AT IT SEEMS LARGELY OBSOLETE. PLEASE REPORT IF YOU WERE USING THIS). Extra spacing (in pixels) between glyphs when rendered: essentially add to glyph->AdvanceX. Only X axis is supported for now.
ImVec2GlyphOffset;// 0, 0 // Offset (in pixels) all glyphs from this font input. Absolute value for default size, other sizes will scale this value.
floatGlyphMinAdvanceX;// 0 // Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space font. Absolute value for default size, other sizes will scale this value.
@ -3764,7 +3768,6 @@ struct ImFontBaked
enumImFontFlags_
{
ImFontFlags_None=0,
ImFontFlags_DefaultToLegacySize=1<<0,// Legacy compatibility: make PushFont() calls without explicit size use font->LegacySize instead of current font size.
ImFontFlags_NoLoadError=1<<1,// Disable throwing an error/assert when calling AddFontXXX() with missing file/data. Calling code is expected to check AddFontXXX() return value.
ImFontFlags_NoLoadGlyphs=1<<2,// [Internal] Disable loading new glyphs.
ImFontFlags_LockBakedSizes=1<<3,// [Internal] Disable loading new baked sizes, disable garbage collecting current ones. e.g. if you want to lock a font to a single size. Important: if you use this to preload given sizes, consider the possibility of multiple font density used on Retina display.
@ -3958,7 +3961,8 @@ struct ImGuiPlatformImeData
namespaceImGui
{
// OBSOLETED in 1.92.0 (from June 2025)
IMGUI_APIvoidSetWindowFontScale(floatscale);// Set font scale factor for current window. Prefer using PushFontSize(style.FontSizeBase * factor) or use style.FontScaleMain to scale all windows.
IMGUI_APIvoidSetWindowFontScale(floatscale);// Set font scale factor for current window. Prefer using PushFont(NULL, style.FontSizeBase * factor) or use style.FontScaleMain to scale all windows.
// OBSOLETED in 1.91.9 (from February 2025)
IMGUI_APIvoidImage(ImTextureReftex_ref,constImVec2&image_size,constImVec2&uv0,constImVec2&uv1,constImVec4&tint_col,constImVec4&border_col);// <-- 'border_col' was removed in favor of ImGuiCol_ImageBorder. If you use 'tint_col', use ImageWithBg() instead.
// Get current font size (= height in pixels) of current font, with external scale factors applied. Use ImGui::GetStyle().FontSizeBase to get value before external scale factors.
// Get current font size (= height in pixels) of current font, with global scale factors applied.
// - Use style.FontSizeBase to get value before global scale factors.
if(g.CurrentTable==NULL||g.CurrentTable->CurrentColumn!=-1)// See 8465#issuecomment-2951509561. Ideally the SkipItems=true in tables would be amended with extra data.
return;
// Restoring is pretty much only used by PopFont()/PopFontSize()
// Restoring is pretty much only used by PopFont()
// The previous logic made SetCursorScreenPos(GetCursorScreenPos()) have a side-effect! It would erroneously incorporate ItemSpacing.y after the item into content size, making the group taller!
// While this code is a little twisted, no-one would expect SetXXX(GetXXX()) to have a side-effect. Using vertical alignment patterns could trigger this issue.
//
// The assert below detects when the _last_ call in a window was a SetCursorPos() not followed by an Item,
// and with a position that would grow the parent contents size.
//
// Advanced:
// - For reference, old logic was causing issues because it meant that SetCursorScreenPos(GetCursorScreenPos())
// had a side-effect on layout! In particular this caused problem to compute group boundaries.
// e.g. BeginGroup() + SomeItem() + SetCursorScreenPos(GetCursorScreenPos()) + EndGroup() would cause the
// group to be taller because auto-sizing generally adds padding on bottom and right side.
// - While this code is a little twisted, no-one would expect SetXXX(GetXXX()) to have a side-effect.
// Using vertical alignment patterns would frequently trigger this sorts of issue.
// - See https://github.com/ocornut/imgui/issues/5548 for more details.
IM_ASSERT(0&&"Code uses SetCursorPos()/SetCursorScreenPos() to extend window/parent boundaries. Please submit an item e.g. Dummy() to validate extent.");
IM_ASSERT_USER_ERROR(0,"Code uses SetCursorPos()/SetCursorScreenPos() to extend window/parent boundaries.\nPlease submit an item e.g. Dummy() afterwards in order to grow window/parent boundaries.");
// For reference, the old behavior was essentially:
TextWrapped("- First Input that contains the glyph is used.\n- Use ImFontConfig::GlyphExcludeRanges[] to specify ranges to ignore glyph in given Input.\n- This tool doesn't cache results and is slow, don't keep it open!");
TextWrapped("- First Input that contains the glyph is used.\n"
"- Use ImFontConfig::GlyphExcludeRanges[] to specify ranges to ignore glyph in given Input.\n- Prefer using a small number of ranges as the list is scanned every time a new glyph is loaded,\n - e.g. GlyphExcludeRanges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };\n- This tool doesn't cache results and is slow, don't keep it open!");
// - ImGui::PushFontSize() will already round, but other paths calling GetFontBaked() directly also needs it (e.g. ImFontAtlasBuildPreloadAllGlyphRanges)
// - ImGui::PushFont() will already round, but other paths calling GetFontBaked() directly also needs it (e.g. ImFontAtlasBuildPreloadAllGlyphRanges)
// Edge case: calling RenderText() with unloaded glyphs triggering texture change. It doesn't happen via ImGui:: calls because CalcTextSize() is always used.
//RenderText(draw_list, size, pos, col, clip_rect, text_begin, text_end, wrap_width, cpu_fine_clip); // FIXME-OPT: Would a 'goto begin' be better for code-gen?