Merge branch 'master' into docking

# Conflicts:
#	imgui.cpp
This commit is contained in:
ocornut 2026-10-15 18:47:51 +02:00
commit d88f238d1d
12 changed files with 102 additions and 38 deletions

View File

@ -523,7 +523,7 @@ jobs:
- name: Install Dependencies
run: |
brew install glfw3 sdl2 sdl3
brew install glfw sdl2 sdl3
- name: Build example_null (extra warnings, clang 64-bit)
run: make -C examples/example_null WITH_EXTRA_WARNINGS=1

View File

@ -35,6 +35,42 @@ HOW TO UPDATE?
and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users.
- Please report any issue!
-----------------------------------------------------------------------
VERSION 1.93.1 WIP (In Progress)
-----------------------------------------------------------------------
Breaking Changes:
Autumn cleanup of stuff marked obsolete more than two years ago:
- Commented out legacy names/functions which were obsoleted in 1.90.7 (May 2024);
- `ImGuiMod_Shortcut` --> `ImGuiMod_Ctrl` (since 1.90.7 it maps to Cmd on macOS)
- Commented out legacy names/functions which were obsoleted in 1.90.9 (July 2024);
- `ImGuiCol_TabActive` --> `ImGuiCol_TabSelected`
- `ImGuiCol_TabUnfocused` --> `ImGuiCol_TabDimmed`
- `ImGuiCol_TabUnfocusedActive` --> `ImGuiCol_TabDimmedSelected`
- Commented out legacy names/functions which were obsoleted in 1.91.0 (July 2024);
- `ImGuiSelectableFlags_DontClosePopups` --> `ImGuiSelectableFlags_NoAutoClosePopups`
- `PushButtonRepeat(bool repeat)` --> `PushItemFlag(ImGuiItemFlags_ButtonRepeat, repeat)`
- `PopButtonRepeat()` --> `PopItemFlag()`
- `PushTabStop(bool tab_stop)` --> `PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop);`
- `PopTabStop()` --> `PopItemFlag()`
- Commented out legacy names/functions which were obsoleted in 1.91.1 (Sept 2024);
- `io.GetClipboardTextFn` --> `platform_io.Platform_GetClipboardTextFn`
- `io.SetClipboardTextFn` --> `platform_io.Platform_SetClipboardTextFn`
- `io.ClipboardUserData` --> `platform_io.Platform_ClipboardUserData`
- Please also try to get rid of calls to `GetContentRegionMax()`, `GetWindowContentRegionMin()`
and `GetWindowContentRegionMax()` will may be removed soon-ish: you should not
ever need those functions. See #7838.
Other Changes:
- ImVec2: added a check for cases where a custom `IM_VEC2_CLASS_EXTRA` macro
adds an extra `operator=` to ImVec2. This isn't supported but should not
be needed as you should have a constructor to convert from your type to ImVec2.
-----------------------------------------------------------------------
VERSION 1.93.0 (Released 2026-10-14)
-----------------------------------------------------------------------

View File

@ -113,7 +113,7 @@ Calling the `ImGui::ShowDemoWindow()` function will create a demo window showcas
- [imgui_explorer](https://pthom.github.io/imgui_explorer): Web version of the demo w/ source code browser, courtesy of [@pthom](https://github.com/pthom).
You should be able to build the examples from sources. If you don't, let us know! If you want to have a quick look at some Dear ImGui features, you can download Windows binaries of the demo app here:
- [imgui-demo-binaries-20260225.zip](https://www.dearimgui.com/binaries/imgui-demo-binaries-20260225.zip) (Windows, 1.92.6, built 2026/02/25, master) or [older binaries](https://www.dearimgui.com/binaries).
- [imgui-demo-binaries-20261015-win32.zip](https://www.dearimgui.com/binaries/imgui-demo-binaries-20261015-win32.zip) (Win32, 1.93.0, built 2026/10/15, master) or [older binaries](https://www.dearimgui.com/binaries).
### Gallery

View File

@ -1,4 +1,4 @@
// dear imgui, v1.93.0
// dear imgui, v1.93.1 WIP
// (main code and documentation)
// Help:
@ -403,6 +403,19 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
- likewise io.MousePos and GetMousePos() will use OS coordinates.
If you query mouse positions to interact with non-imgui coordinates you will need to offset them, e.g. subtract GetWindowViewport()->Pos.
2026/10/15 (1.93.1) - commented out legacy names/functions which were obsoleted from 1.90.7 (May 2024) to 1.91.1 (Sept 2024):
- `ImGuiMod_Shortcut` --> `ImGuiMod_Ctrl` (since 1.90.7 it maps to Cmd on macOS)
- `ImGuiCol_TabActive` --> `ImGuiCol_TabSelected`
- `ImGuiCol_TabUnfocused` --> `ImGuiCol_TabDimmed`
- `ImGuiCol_TabUnfocusedActive` --> `ImGuiCol_TabDimmedSelected`
- `ImGuiSelectableFlags_DontClosePopups`-> `ImGuiSelectableFlags_NoAutoClosePopups`
- `PushButtonRepeat(bool repeat)` --> `PushItemFlag(ImGuiItemFlags_ButtonRepeat, repeat)`
- `PopButtonRepeat()` --> `PopItemFlag()`
- `PushTabStop(bool tab_stop)` --> `PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop);`
- `PopTabStop()` --> `PopItemFlag()`
- `io.GetClipboardTextFn` --> `platform_io.Platform_GetClipboardTextFn`
- `io.SetClipboardTextFn` --> `platform_io.Platform_SetClipboardTextFn`
- `io.ClipboardUserData` --> `platform_io.Platform_ClipboardUserData`
2026/10/07 (1.93.0) - large cleanup/refactor of ImDrawList. many issues and inconsistencies fixed! (#9504)
BELOW IS A SIMPLIFIED/SHORTENED RECAP OF CHANGES. READ CHANGELOG AND LINKS ABOVE FOR MORE DETAILS!
useful links:
@ -11825,6 +11838,15 @@ static void ImGui::ErrorCheckNewFrameSanityChecks()
// #define IM_ASSERT(EXPR) do { if (SomeCode(EXPR)) SomeMoreCode(); } while (0) // Correct!
if (true) IM_ASSERT(1); else IM_ASSERT(0);
// Check user IM_VEC2_CLASS_EXTRA macro
// (IF YOU GET A "ambiguous overload" COMPILE ERROR HERE: does your IM_VEC2_CLASS_EXTRA macro contains an operator=?
// e.g. ImVec2& operator=(const MyPoint & p) { x = p.x; y = p.y; return *this; }
// You should be able to remove it if you have the corresponding constructor:
// e.g. IM_NODEBUGSTEP constexpr inline ImVec2(const MyPoint& f) : x(f.x), y(f.y) {}
// Allowing you to add this extra operator to ImVec2 would prevent our whole codebase from using v = {x,y} assignment style.
// PLEASE GET IN TOUCH IF REMOVING THE operator= IS A PROBLEM TO YOU)
ImVec2 v; v = { 1.0f, 2.0f };
// Emscripten backends are often imprecise in their submission of DeltaTime. (#6114, #3644)
// Ideally the Emscripten app/backend should aim to fix or smooth this value and avoid feeding zero, but we tolerate it.
#ifdef __EMSCRIPTEN__
@ -11884,10 +11906,10 @@ static void ImGui::ErrorCheckNewFrameSanityChecks()
}
// Remap legacy clipboard handlers (OBSOLETED in 1.91.1, August 2024)
if (g.IO.GetClipboardTextFn != NULL && (g.PlatformIO.Platform_GetClipboardTextFn == NULL || g.PlatformIO.Platform_GetClipboardTextFn == Platform_GetClipboardTextFn_DefaultImpl))
g.PlatformIO.Platform_GetClipboardTextFn = [](ImGuiContext* ctx) { return ctx->IO.GetClipboardTextFn(ctx->IO.ClipboardUserData); };
if (g.IO.SetClipboardTextFn != NULL && (g.PlatformIO.Platform_SetClipboardTextFn == NULL || g.PlatformIO.Platform_SetClipboardTextFn == Platform_SetClipboardTextFn_DefaultImpl))
g.PlatformIO.Platform_SetClipboardTextFn = [](ImGuiContext* ctx, const char* text) { return ctx->IO.SetClipboardTextFn(ctx->IO.ClipboardUserData, text); };
//if (g.IO.GetClipboardTextFn != NULL && (g.PlatformIO.Platform_GetClipboardTextFn == NULL || g.PlatformIO.Platform_GetClipboardTextFn == Platform_GetClipboardTextFn_DefaultImpl))
// g.PlatformIO.Platform_GetClipboardTextFn = [](ImGuiContext* ctx) { return ctx->IO.GetClipboardTextFn(ctx->IO.ClipboardUserData); };
//if (g.IO.SetClipboardTextFn != NULL && (g.PlatformIO.Platform_SetClipboardTextFn == NULL || g.PlatformIO.Platform_SetClipboardTextFn == Platform_SetClipboardTextFn_DefaultImpl))
// g.PlatformIO.Platform_SetClipboardTextFn = [](ImGuiContext* ctx, const char* text) { return ctx->IO.SetClipboardTextFn(ctx->IO.ClipboardUserData, text); };
// Remap legacy CurveTessellationTol into CurveTessellationMaxError (OBSOLETED in 1.93.0, August 2026)
if (g.Style.CurveTessellationTol != 0.0f)

37
imgui.h
View File

@ -1,4 +1,4 @@
// dear imgui, v1.93.0
// dear imgui, v1.93.1 WIP
// (headers)
// Help:
@ -29,8 +29,8 @@
// Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.93.0"
#define IMGUI_VERSION_NUM 19300
#define IMGUI_VERSION "1.93.1 WIP"
#define IMGUI_VERSION_NUM 19301
#define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000
#define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198
#define IMGUI_HAS_VIEWPORT // In 'docking' WIP branch.
@ -132,6 +132,7 @@ Index of this file:
// Alternative to using a .natstepfilter file or other scripts in misc/debuggers/ to skip debug-stepping selected trivial functions.
// If you get a compiler error or warning related to use, please report it to us!
#ifndef IM_NODEBUGSTEP
#if (defined(__clang__) && (__clang_major__ >= 7)) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))
#define IM_NODEBUGSTEP [[gnu::artificial]]
#elif defined(_MSC_VER) && (_MSC_VER >= 1915)
@ -139,6 +140,7 @@ Index of this file:
#else
#define IM_NODEBUGSTEP
#endif
#endif
// Warnings
#ifdef _MSC_VER
@ -1454,7 +1456,7 @@ enum ImGuiSelectableFlags_
ImGuiSelectableFlags_SelectOnNav = 1 << 6, // Auto-select when moved into, unless Ctrl is held. Automatic when in a BeginMultiSelect() block.
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
ImGuiSelectableFlags_DontClosePopups = ImGuiSelectableFlags_NoAutoClosePopups, // Renamed in 1.91.0
//ImGuiSelectableFlags_DontClosePopups = ImGuiSelectableFlags_NoAutoClosePopups, // Renamed in 1.91.0
//ImGuiSelectableFlags_AllowItemOverlap = ImGuiSelectableFlags_AllowOverlap, // Renamed in 1.89.7
#endif
};
@ -1778,7 +1780,7 @@ enum ImGuiKey : int
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
ImGuiKey_COUNT = ImGuiKey_NamedKey_END, // Obsoleted in 1.91.5 because it was misleading (since named keys don't start at 0 anymore)
ImGuiMod_Shortcut = ImGuiMod_Ctrl, // Removed in 1.90.7, you can now simply use ImGuiMod_Ctrl
//ImGuiMod_Shortcut = ImGuiMod_Ctrl, // Removed in 1.90.7, you can now simply use ImGuiMod_Ctrl (will auto map to Cmd on Mac)
//ImGuiKey_ModCtrl = ImGuiMod_Ctrl, ImGuiKey_ModShift = ImGuiMod_Shift, ImGuiKey_ModAlt = ImGuiMod_Alt, ImGuiKey_ModSuper = ImGuiMod_Super, // Renamed in 1.89
//ImGuiKey_KeyPadEnter = ImGuiKey_KeypadEnter, // Renamed in 1.87
#endif
@ -1924,10 +1926,10 @@ enum ImGuiCol_
ImGuiCol_COUNT,
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
ImGuiCol_TabActive = ImGuiCol_TabSelected, // [renamed in 1.90.9]
ImGuiCol_TabUnfocused = ImGuiCol_TabDimmed, // [renamed in 1.90.9]
ImGuiCol_TabUnfocusedActive = ImGuiCol_TabDimmedSelected, // [renamed in 1.90.9]
ImGuiCol_NavHighlight = ImGuiCol_NavCursor, // [renamed in 1.91.4]
//ImGuiCol_TabActive = ImGuiCol_TabSelected, // [renamed in 1.90.9]
//ImGuiCol_TabUnfocused = ImGuiCol_TabDimmed, // [renamed in 1.90.9]
//ImGuiCol_TabUnfocusedActive = ImGuiCol_TabDimmedSelected, // [renamed in 1.90.9]
#endif
};
@ -2789,11 +2791,11 @@ struct ImGuiIO
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
float FontGlobalScale; // Moved io.FontGlobalScale to style.FontScaleMain in 1.92.0 (June 2025)
// Legacy: before 1.91.1, clipboard functions were stored in ImGuiIO instead of ImGuiPlatformIO.
// [Moved in 1.91.1] Clipboard functions were stored in ImGuiIO instead of ImGuiPlatformIO.
// As this is will affect all users of custom engines/backends, we are providing proper legacy redirection (will obsolete).
const char* (*GetClipboardTextFn)(void* user_data);
void (*SetClipboardTextFn)(void* user_data, const char* text);
void* ClipboardUserData;
//const char* (*GetClipboardTextFn)(void* user_data); // --> `platform_io.Platform_GetClipboardTextFn`
//void (*SetClipboardTextFn)(void* user_data, const char* text); // --> `platform_io.Platform_SetClipboardTextFn`
//void* ClipboardUserData; // --> `platform_io.Platform_ClipboardUserData`
//void ClearInputCharacters() { InputQueueCharacters.resize(0); } // [Obsoleted in 1.89.8] Clear the current frame text input buffer. Now included within ClearInputKeys(). Removed this as it is ambiguous/misleading and generally incorrect to use with the existence of a higher-level input queue.
#endif
@ -3731,7 +3733,7 @@ struct ImDrawData
ImVector<ImTextureData*>* Textures; // List of textures to update. Most of the times the list is shared by all ImDrawData, has only 1 texture and it doesn't need any update. This almost always points to ImGui::GetPlatformIO().Textures[]. May be overridden or set to NULL if you want to manually update textures.
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
int CmdListsCount; // Use CmdLists.Size instead. Number of ImDrawList* to render.
int CmdListsCount; // [OBSOLETED in 1.92.9] Use CmdLists.Size instead. Number of ImDrawList* to render.
#endif
// Functions
@ -4504,16 +4506,17 @@ namespace ImGui
// OBSOLETED in 1.91.9 (from February 2025)
IMGUI_API void Image(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& tint_col, const ImVec4& border_col); // <-- 'border_col' was removed in favor of ImGuiCol_ImageBorder. If you use 'tint_col', use ImageWithBg() instead.
// OBSOLETED in 1.91.0 (from July 2024)
inline void PushButtonRepeat(bool repeat) { PushItemFlag(ImGuiItemFlags_ButtonRepeat, repeat); }
inline void PopButtonRepeat() { PopItemFlag(); }
inline void PushTabStop(bool tab_stop) { PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop); }
inline void PopTabStop() { PopItemFlag(); }
// You do not need those functions! See #7838 on GitHub for more info.
IMGUI_API ImVec2 GetContentRegionMax(); // Content boundaries max (e.g. window boundaries including scrolling, or current column boundaries). You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
IMGUI_API ImVec2 GetWindowContentRegionMin(); // Content boundaries min for the window (roughly (0,0)-Scroll), in window-local coordinates. You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
IMGUI_API ImVec2 GetWindowContentRegionMax(); // Content boundaries max for the window (roughly (0,0)+Size-Scroll), in window-local coordinates. You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
// Some of the older obsolete names along with their replacement (commented out so they are not reported in IDE)
// OBSOLETED in 1.91.0 (from July 2024)
//inline void PushButtonRepeat(bool repeat) { PushItemFlag(ImGuiItemFlags_ButtonRepeat, repeat); }
//inline void PopButtonRepeat() { PopItemFlag(); }
//inline void PushTabStop(bool tab_stop) { PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop); }
//inline void PopTabStop() { PopItemFlag(); }
// OBSOLETED in 1.90.0 (from September 2023)
//IMGUI_API bool Combo(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count, int popup_max_height_in_items = -1); // Getter signature changed. See 2023/09/15 and 2026/02/27 commits.
//IMGUI_API bool ListBox(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count, int height_in_items = -1); // Getter signature changed. See 2023/09/15 and 2026/02/27 commits.

View File

@ -1,4 +1,4 @@
// dear imgui, v1.93.0
// dear imgui, v1.93.1 WIP
// (demo code)
// Help:
@ -1722,10 +1722,10 @@ static void DemoWindowWidgetsDragAndDrop()
{
if (ImGui::TreeNode("Drag and Drop"))
{
IMGUI_DEMO_MARKER("Widgets/Drag and drop");
IMGUI_DEMO_MARKER("Widgets/Drag and Drop");
if (ImGui::TreeNode("Drag and drop in standard widgets"))
{
IMGUI_DEMO_MARKER("Widgets/Drag and drop/Standard widgets");
IMGUI_DEMO_MARKER("Widgets/Drag and Drop/Standard widgets");
// ColorEdit widgets automatically act as drag source and drag target.
// They are using standardized payload strings IMGUI_PAYLOAD_TYPE_COLOR_3F and IMGUI_PAYLOAD_TYPE_COLOR_4F
// to allow your own widgets to use colors in their drag and drop interaction.
@ -1740,7 +1740,7 @@ static void DemoWindowWidgetsDragAndDrop()
if (ImGui::TreeNode("Drag and drop to copy/swap items"))
{
IMGUI_DEMO_MARKER("Widgets/Drag and drop/Copy-swap items");
IMGUI_DEMO_MARKER("Widgets/Drag and Drop/Copy-swap items");
enum Mode
{
Mode_Copy,

View File

@ -1,4 +1,4 @@
// dear imgui, v1.93.0
// dear imgui, v1.93.1 WIP
// (drawing and font code)
/*
@ -2286,7 +2286,7 @@ void ImDrawList::_AddRectTinyRounding(const ImVec2& p_min, const ImVec2& p_max,
const float stem_y = outer_y + corner_offset[corner].y * stem_offset;
const float inner_x = outer_x + corner_offset[corner].x * thickness;
const float inner_y = outer_y + corner_offset[corner].y * thickness;
const bool is_rounded = (flags & corner_flags[corner]);
const bool is_rounded = (flags & corner_flags[corner]) != 0;
const int arc_idx = (int)_VtxCurrentIdx;
if (is_rounded)

View File

@ -1,4 +1,4 @@
// dear imgui, v1.93.0
// dear imgui, v1.93.1 WIP
// (internal structures/api)
// You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.

View File

@ -1,4 +1,4 @@
// dear imgui, v1.93.0
// dear imgui, v1.93.1 WIP
// (tables and columns code)
/*

View File

@ -1,4 +1,4 @@
// dear imgui, v1.93.0
// dear imgui, v1.93.1 WIP
// (widgets code)
/*
@ -2707,7 +2707,7 @@ bool ImGui::DragBehavior(ImGuiID id, ImGuiDataType data_type, void* p_v, float v
{
// Canceling action reverts to initial value
size_t data_size = DataTypeGetInfo(data_type)->Size;
bool value_changed = memcmp(p_v, &g.ActiveIdValueOnActivation, data_size);
bool value_changed = memcmp(p_v, &g.ActiveIdValueOnActivation, data_size) != 0;
memcpy(p_v, &g.ActiveIdValueOnActivation, data_size);
ClearActiveID();
return value_changed;
@ -3329,7 +3329,7 @@ bool ImGui::SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type
{
// Canceling action reverts to initial value
size_t data_size = DataTypeGetInfo(data_type)->Size;
bool value_changed = memcmp(p_v, &g.ActiveIdValueOnActivation, data_size);
bool value_changed = memcmp(p_v, &g.ActiveIdValueOnActivation, data_size) != 0;
memcpy(p_v, &g.ActiveIdValueOnActivation, data_size);
ClearActiveID();
return value_changed;

View File

@ -1,5 +1,6 @@
// dear imgui: FreeType font builder (used as a replacement for the stb_truetype builder)
// dear imgui: FreeType font builder
// (code)
// (used as a replacement for the stb_truetype builder)
// Get the latest version at https://github.com/ocornut/imgui/tree/master/misc/freetype
// Original code by @vuhdo (Aleksei Skriabin) in 2017, with improvements by @mikesart.

View File

@ -1,5 +1,6 @@
// dear imgui: FreeType font builder (used as a replacement for the stb_truetype builder)
// dear imgui: FreeType font builder
// (headers)
// (used as a replacement for the stb_truetype builder)
#pragma once
#include "imgui.h" // IMGUI_API
@ -40,6 +41,7 @@ enum ImGuiFreeTypeLoaderFlags_
ImGuiFreeTypeLoaderFlags_Bitmap = 1 << 9, // Enable FreeType bitmap glyphs
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
// Renamed in 1.92.0 (June 2025)
ImGuiFreeTypeBuilderFlags_NoHinting = ImGuiFreeTypeLoaderFlags_NoHinting,
ImGuiFreeTypeBuilderFlags_NoAutoHint = ImGuiFreeTypeLoaderFlags_NoAutoHint,
ImGuiFreeTypeBuilderFlags_ForceAutoHint = ImGuiFreeTypeLoaderFlags_ForceAutoHint,