Commit Graph

9898 Commits

Author SHA1 Message Date
ocornut 6be90b6008 ImStrv: detect and fixed misuses of CalcTextSize() old signature. (9321)
build / Build - Windows (push) Waiting to run
build / Build - Linux (push) Waiting to run
build / Build - MacOS (push) Waiting to run
build / Build - iOS (push) Waiting to run
build / Build - Emscripten (push) Waiting to run
build / Build - Android (push) Waiting to run
build / Test - Windows (push) Waiting to run
build / Test - Linux (push) Waiting to run
For IMGUI_DISABLE_OBSOLETE_FUNCTIONS only.
2026-05-19 18:54:30 +02:00
David Mentler 0869f48d15 ImStrv: Added ImStrv formatter for LLDB (e.g. Xcode) 2026-05-19 18:54:30 +02:00
ocornut 7ed1658a4a ImStrv: made length() returns an int as it simplify the most common case (of passing %.*s to printf) 2026-05-19 18:54:30 +02:00
ocornut fc44fd5823 ImStrv: allow constructing from two null pointers. 2026-05-19 18:54:30 +02:00
ocornut f7b0515ebd ImStrv: Combo(), ListBox(): seems better to not introduce the ImStrv [] versions?
As 1) user is unlikely to store that on their end. 2) nowadays with lambdas isn't an easy user-side conversion.
Then we limit explosion of an already messy API.
2026-05-19 18:54:30 +02:00
ocornut 81c6ae4a85 ImStrv: convert Combo()/ListBox() to use ImStrv in their getters.
Didn't convert Combo() "const char* items_separated_by_zeros" as this doesn't translate well when used via a ImStrv constructor, may actually aim to obsolete.
Fixed for shadowing local variable warning on 2025/06/25.
2026-05-19 18:54:30 +02:00
ocornut fb80924e80 ImStrv: add needed disambiguishing functions for const char* now being ambiguous. (5079)
amended for gcc/clang warnings
amended to facilitate merge with docking
2026-05-19 18:54:30 +02:00
ocornut 52a91b368c ImStrv: backtracked for now on supporting ImStrv for format strings.
It's widely incomplete and slow, requires a printf function taking non-zero-terminated format string to work.
Might do it eventually but it's much less a problem than labels. Format string are more frequently inlined in code and tend to be small, so existing solutions at call site can work better for now.
2026-05-19 18:54:29 +02:00
璀境石 acb9f24670 ImStrv: enhanced VS debugger .natvis support. build fixes. (5333, 5906) 2026-05-19 18:53:59 +02:00
ocornut c770f51e27 ImStrv: standardized code doing format copy, optimized ImStrStr 2026-05-19 18:53:59 +02:00
ocornut 78de06fbc0 ImStrv: moved double char* function signatures under #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS blocks + fixed various compiles errors/warnings. 2026-05-19 18:53:59 +02:00
ocornut 3513bb13b3 ImStrv: changed ImStrv xxx=NULL args to an explicit xxx=ImStrv()
This is mostly for the benefit of cimgui parser, ideally we would do without.
2026-05-19 18:53:21 +02:00
ocornut ae4130c702 ImStrv: Step 2 - change ImStrv typedef to struct, perform all other logic conversion.
Squashed commits (initially a commit from rokups + many rework by ocornut. keeping them separate commits made rebasing unnecessarily tricking so merged from 2024/02)
ImStrv: many fixes (see details), added imconfig class extension example, added natvis description.
ImStrv: rework toward ensuring End is always set to constant can be compile time calculated
ImStrv: using length(), fix ambiguous empty() function, fix altered behaviors, removed unused operators.
ImStrv: various tweaks and fixes. removed ImGuiTextRange from ImGuiTextFilter, fix test engine hooks, removed constructor only used twice.
2026-05-19 18:53:21 +02:00
Rokas Kupstys ed91943dc2 ImStrv: Step 1 - change string type to ImStrv in API. (REBASED)
(last rebase amend 2024/12/11)
2026-05-19 18:52:01 +02:00
ocornut 904b663184 Clarify support for "%s" shortcuts in functions taking format strings. (#9404, #3466, #6846)
build / Build - Windows (push) Waiting to run
build / Build - Linux (push) Waiting to run
build / Build - MacOS (push) Waiting to run
build / Build - iOS (push) Waiting to run
build / Build - Emscripten (push) Waiting to run
build / Build - Android (push) Waiting to run
build / Test - Windows (push) Waiting to run
build / Test - Linux (push) Waiting to run
2026-05-19 18:50:39 +02:00
MouriNaruto 3e7b79aa17 Backends: Win32: use SetProcessDpiAwarenessContext instead of SetThreadDpiAwarenessContext when available, to fix the OpenGL3 Win32 example DPI scaling issue. (#9403) 2026-05-19 17:53:36 +02:00
ocornut e41d691da1 Demo: Tree Nodes: extract 'Tree Nodes->Selectable Nodes' into its own thing.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
+ comments (#9401)
2026-05-18 14:31:58 +02:00
ocornut 93e396ffb7 Textures: call ImTextureDataUpdateNewFrame() for textures registered via RegisterUserTexture(). (#8789, #8465)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
Amend
2026-05-15 16:38:45 +02:00
ocornut 068e055510 Textures: extract ImTextureDataUpdateNewFrame() out of ImFontAtlasUpdateNewFrame(). (#8465) 2026-05-15 16:38:45 +02:00
ocornut db161b84c9 Windows: clicking on a window's empty-space to move/focus a window checks for lack of queued focus request. (#9382)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
2026-05-15 13:45:03 +02:00
ocornut 4088a4f40c Windows: clicking on a window's empty-space to move/focus a window checks for lack of mouse button ownership. (#9382) 2026-05-15 13:44:40 +02:00
ocornut 46a050fff2 Nav: minor optimization NavUpdate().
To be honest this is mostly to ease debug stepping in the common case.
2026-05-15 13:43:45 +02:00
ocornut c7767926ce Version 1.92.9 WIP 2026-05-15 13:28:32 +02:00
ocornut 310c719a1f Rework definition of ImDrawFlags_InvalidMask_ so it more strictly fits in an int32 for non C/C++ languages where it matters. (#9396, #9397) 2026-05-15 10:48:24 +02:00
ocornut b2546a5c93 Comments on not needing to use ImDrawFlags_RoundCornersAll.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
2026-05-13 12:46:07 +02:00
ocornut e0f5f9a14c Amend AddRect(), AddPolyline() error detection to safely return an trigger error handling mechanism.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
Amend 6df50a0667
2026-05-12 17:40:28 +02:00
ocornut 8936b58fe2 Version 1.92.8
Include minor bits: adjust activeid logging, tweak comments.
v1.92.8
2026-05-12 16:30:30 +02:00
omar eebaddd340 Docs: added SECURITY.md.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
2026-05-11 19:03:08 +02:00
ocornut 73afb6b6e6 Fonts: clarify that ClearFonts() be useful over calling Clear(). 2026-05-11 17:45:59 +02:00
ocornut b8f6c51af7 Fonts: move ClearFonts(), ClearInputData(), ClearTexData() implementation (no other changes) 2026-05-11 17:42:08 +02:00
ocornut 4ac473b2c7 Fixed BeginMenu() leading to window with is_resizable_width=true. Fix/amend 95bd1577d + ac1f57b. (#9355) 2026-05-11 16:35:40 +02:00
ocornut ac1f57ba0c Fixed BeginMenu() leading to window with is_resizable_width=true. Fix/amend 95bd1577d. (#9355)
We should instead probably make BeginChild() not set on ImGuiWindowFlags_AlwaysAutoResize on either ResizeX or ResizeY, but that'll be done later.
2026-05-11 16:34:33 +02:00
ocornut 821a396556 Fixed warning on Clang 26. 2026-05-11 15:59:42 +02:00
manuel 2b31f65167 Examples: WebGPU+GLFW/SDL2/SDL3: wire up the IMGUI_WGVK_DIR path. (#9387)
The block was a stub - find Vulkan, detect Wayland/X11, set the SUPPORT_*_SURFACE defines that wgvk.c needs.
2026-05-11 15:42:16 +02:00
manuel b58836f287 Backends: WebGPU: detect WGSL support at runtime instead of excluding WGVK at compile time. (#9387)
Previously WGVK was hard-disabled from WGSL via #if !defined(IMGUI_IMPL_WEBGPU_BACKEND_WGVK),
forcing the SPIRV fallback unconditionally. Now the WGSL path is attempted on all backends
and an empty stage_desc is returned when the module fails to compile letting the existing
SPIRV fallback at the call site kick in.
2026-05-11 15:38:27 +02:00
ocornut bca5a69928 BeginMenu()/MenuItem(): fixed accidental triggering of child menu items when opening a menu inside a small host window forcing the child menu window to be repositioned under the mouse cursor. (#8233, #9394)
nb: ImGuiSelectableFlags_NoHoldingActiveID is not used anymore. Would remove remove once we remove the unnecessary call to Selectable() from MenuItem().
2026-05-11 15:32:39 +02:00
ocornut eb453f2be6 Checkbox, Style: added ImGuiCol_CheckboxSelectedBg. (#9392) 2026-05-11 14:30:34 +02:00
ocornut 56b37bf93c Inputs: SetItemKeyOwner(): does not set ownership is key is already taken.
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
(#456, #2637, #2620, #2891, #3370, #3724, #4828, #5108, #5242, #5641)
2026-05-07 21:22:33 +02:00
ocornut 0eae77f783 Inputs: SetItemKeyOwner(): return true if ownership has been requested, which can to be checked to accurately gate further input test.
(#456, #2637, #2620, #2891, #3370, #3724, #4828, #5108, #5242, #5641)
2026-05-07 21:15:27 +02:00
ocornut 02ccd9f348 Scrolling, Inputs: using mouse wheel to scroll takes and keeps ownership of the corresponding keys while a wheeling window is locked.
Ref 4448d975d. (#2604, #3795)
2026-05-07 20:51:57 +02:00
ocornut 163b8670c8 Demo: added image viewer with magnifier and grid. 2026-05-07 20:20:05 +02:00
ocornut a70b97ee48 Warning fixes. 2026-05-07 16:51:34 +02:00
ocornut 6df50a0667 (Breaking) DrawList: swapped the last two arguments of AddRect(), AddPolyline(), PathStroke(). thickness<>flags.
Added inline redirection functions when IMGUI_DISABLE_OBSOLETE_FUNCTIONS is off.
Marked the old functions are =delete when IMGUI_DISABLE_OBSOLETE_FUNCTIONS is on, to allow for better type-checking.
The aim is to be able to use/add flags to more ImDrawList functions, and making existing functions consistents was deemed very desirable.
2026-05-07 16:37:57 +02:00
ocornut 976c5c0f3a Textures: extract ImTextureDataQueueUpload() out of ImFontAtlasTextureBlockQueueUpload() (#8465)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
Not atlas specific, in support of texture system.
2026-05-06 16:19:39 +02:00
Mikko Mononen 691b89baae ImDrawList: added AddLineH(), AddLineV() helpers. (#9360)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
This commit is aimed to be a lossless transform. Further layout fixes in subsequent commits.
2026-04-28 17:04:54 +02:00
ocornut c0b693b1d4 MultiSelect: Box-Select + Tables: fixed when using SpanAllColumns paths. (#9383, #7994)
Amend d1a8995 which didn't fix the thing it claimed to fix, as my naive last minute refactor broke it.
2026-04-28 15:58:21 +02:00
Alexander "FireFox" Ong 865a6dfa59 InputScalar: fixed not parsing user input when the display format is configured not to show the scalar value. (#9385)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
Useful e.g. for displaying "mixed" inputs, where a single field might represent multiple different values.
2026-04-28 15:25:12 +02:00
Vlad dee9b15bbe Backends: Metal: add sampler states and DrawCallback_SetSamplerLinear / DrawCallback_SetSamplerNearest callbacks. (#9381, #9371, #9378) 2026-04-28 15:09:23 +02:00
ocornut d1a8995634 MultiSelect: Box-Select + Tables: fixed when using SpanAllColumns paths. (#9383, #7994)
Amend ac88294 + d7b40ab
2026-04-28 14:58:47 +02:00
ocornut ab36fbaf48 Drag and Drop, Style: added ImGuiStyleVar_DragDropTargetRounding. (#9056)
build / Build - Windows (push) Has been cancelled
build / Build - Linux (push) Has been cancelled
build / Build - MacOS (push) Has been cancelled
build / Build - iOS (push) Has been cancelled
build / Build - Emscripten (push) Has been cancelled
build / Build - Android (push) Has been cancelled
build / Test - Windows (push) Has been cancelled
build / Test - Linux (push) Has been cancelled
scheduled / scheduled (push) Has been cancelled
+ readded rounding arg to RenderDragDropTargetRectEx().
2026-04-27 18:23:56 +02:00