Commit Graph

9574 Commits

Author SHA1 Message Date
David Mentler
535e01cbdf ImStrv: Added ImStrv formatter for LLDB (e.g. Xcode) 2025-12-21 18:11:59 +01:00
ocornut
8cb73ee921 ImStrv: made length() returns an int as it simplify the most common case (of passing %.*s to printf) 2025-12-21 18:11:59 +01:00
ocornut
11122e76b1 ImStrv: allow constructing from two null pointers. 2025-12-21 18:11:25 +01:00
ocornut
fa9739e1a9 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.
2025-12-21 18:11:25 +01:00
ocornut
6d1cccd53c 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.
2025-12-21 18:11:25 +01:00
ocornut
431c28aa3f ImStrv: add needed disambiguishing functions for const char* now being ambiguous. (5079)
amended for gcc/clang warnings
amended to facilitate merge with docking
2025-12-21 18:11:08 +01:00
ocornut
f61bb50769 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.
2025-12-21 18:11:08 +01:00
璀境石
6c53259ddb ImStrv: enhanced VS debugger .natvis support. build fixes. (5333, 5906) 2025-12-21 18:11:08 +01:00
ocornut
e2a52d438b ImStrv: standardized code doing format copy, optimized ImStrStr 2025-12-21 18:11:08 +01:00
ocornut
b7c27d6ea5 ImStrv: Fixed various compile errors/warnings. 2025-12-21 18:11:07 +01:00
ocornut
a205a13e5c ImStrv: moved double char* function signatures under #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS blocks. 2025-12-21 18:11:07 +01:00
ocornut
ea6f21c0a9 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.
2025-12-21 18:11:07 +01:00
ocornut
8a1538eff1 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.
2025-12-21 18:11:07 +01:00
Rokas Kupstys
840d073fea ImStrv: Step 1 - change string type to ImStrv in API. (REBASED)
(last rebase amend 2024/12/11)
2025-12-21 18:09:02 +01:00
ocornut
a5dffbec38 Text: word-wrapping use a small lookup table. (#8990, #3237, #8503, #8139, #8439, #9094, #3002, #9066, #8838) 2025-12-21 18:04:01 +01:00
ocornut
22ffa3d6d3 Text: rewrite word-wrapping logic. (#8990, #3237, #8503, #8139, #8439, #9094, #3002, #9066, #8838) 2025-12-21 18:04:00 +01:00
ocornut
683f9160b9 Internals: ImBitArray: rename storage. 2025-12-18 23:38:34 +01:00
ocornut
4e7c05504a Renamed IM_ARRAYSIZE() -> IM_COUNTOF(). Kept legacy name for now. 2025-12-17 14:30:01 +01:00
ocornut
99bca397d8 Docs: clarify PixelSnapH / PixelSnapV + comment on PushTextWrapPos(). 2025-12-17 12:02:07 +01:00
ocornut
dc48a7c88e Docs: amend fc89c61 2025-12-15 16:59:22 +01:00
ocornut
4dac00ca0c Windows: fixed always updating internal buffer for ### window titles even when Ctrl+Tab window is hidden. Instead forcing an update on mismatching when appearing.
3997e8b555 was already doing that. (Relates to 8e67fe1: code assume pointer used to be nulled when ctrl+tab window is disabled. not the case).
2025-12-11 23:24:43 +01:00
omar
fc89c61089 Hashing: handling of "###" operator to reset to seed within a string identifier doesn't include the "###" characters in the output hash anymore.
This has various simplifying properties.
Need a test engine update too.
+ Demo: removed misleading/unnecessary usage of ###.
2025-12-11 23:02:20 +01:00
ocornut
1e7d2adc29 Fixed Clang cast-align warning + Added missing Changelog entry in 1.92.4. (#8893) 2025-12-11 21:37:42 +01:00
ocornut
bd6f48fe20 Backends: OpenGL3: Fixed embedded loader multiple init/shutdown cycles broken on some platforms. (#8792, #9112) 2025-12-11 18:28:23 +01:00
ocornut
0d2dd30ee9 Tabs: minor tweaks to facilitate mods altering spacing. 2025-12-11 17:17:57 +01:00
ocornut
9971251574 Fonts: amend/comment on FontDataOwnedByAtlas=false fix being a breaking change. (#9086, #8465) 2025-12-10 21:42:07 +01:00
ocornut
a07b2828ce Backends: GLFW: add IMGUI_IMPL_GLFW_DISABLE_X11 / IMGUI_IMPL_GLFW_DISABLE_WAYLAND. (#9109, #9116)
cc #8884, #8474, #8289
2025-12-10 18:57:02 +01:00
ocornut
9a4fd69f6d Backends: GLFW: avoid repeated glfwSetCursor()/glfwSetInputMode() calls when unnecessary. 2025-12-10 18:35:22 +01:00
ocornut
cf64b7fa72 Tables: Fixed losing stored display order when reducing column count. (#9108, #4046)
Amend f2df804fcc
2025-12-08 19:29:41 +01:00
ocornut
a726bded11 Fonts: ClearOutputData() doesn't need to clear FallbackChar, EllipsisChar. Fixed crash changing font loader. 2025-12-05 19:12:50 +01:00
ocornut
7f78f52243 Demo: removed some hardcoded widths. 2025-12-05 18:46:13 +01:00
ocornut
60f8b0733c Rework color marker internals to facilitate arbitrary override using SetNextItemColorMarker().
Amend fa4b47c
2025-12-05 18:28:55 +01:00
ocornut
fa4b47c5e2 Added RGBA color markers to ColorEdit3/ColorEdit4 + opt-in ImGuiSliderFlags_ColorMarkers for Drags/Sliders.
+ Added ImGuiColorEditFlags_NoColorMarkers
+ Added style.ColorMarkerSize.
2025-12-05 16:32:48 +01:00
ocornut
a7ecbcdeba Shuffle ImGuiColorEditFlags flag values.
ImGuiColorEditFlags_AlphaOpaque, ImGuiColorEditFlags_AlphaNoBg, ImGuiColorEditFlags_AlphaPreviewHalf, ImGuiColorEditFlags_AlphaBar.
2025-12-05 16:32:45 +01:00
ocornut
ded52c71d9 Debug Log: can output to debugger. Added ImGuiDebugLogFlags_OutputToDebugger. 2025-12-05 15:07:44 +01:00
ocornut
9d4fafa671 Nav: removed an unnecessary FindWindowByName() call.
Amend c7016c25e8. It's not clear to me why it was committed like that, maybe a leftover of wip code which used the pointer before Begin().
2025-12-05 14:16:14 +01:00
ocornut
e2c49530cb ImDrawList: harden/clarify static asserts about ImDrawCmd / ImDrawCmdHeader layout. 2025-12-05 13:42:15 +01:00
achabense
fee06a92ea Text: fixed word-wrapping function reading from *text_end when passed a string range. (#9107)
Likely caused by 4d4889bf1b (#5720)
2025-12-05 13:23:26 +01:00
ocornut
d71091a957 Internals: amend RenderRectFilledRangeH() to avoid shadowed variables. 2025-12-04 16:27:54 +01:00
ocornut
d1e262ad55 Internals: refactor RenderRectFilledRangeH() into RenderRectFilledInRangeH() to take absolute coordinates instead of normalized ones.
Amend 01d4bf299a (#1296)
2025-12-04 16:13:12 +01:00
ocornut
6e0ee6ff03 Fonts: removed misleading SizePixels >= 0.0f test and stbtt_ScaleForMappingEmToPixels() call in ImGui_ImplStbTrueType_FontSrcInit(). (#8857)
Logic was picked in 9a9712807e while extracting code from stbtt_PackFontRangesGatherRects(), but ScaleForMappingEmToPixels() was actually never called: we assert against negative SizePixels since 2015.
2025-12-03 20:15:58 +01:00
ulhc
d27dce58cd Backends: Win32: handle WM_IME_CHAR/WM_IME_COMPOSITION messages to support Unicode inputs on MBCS Windows. (#9099, #3653, #5961) 2025-12-03 13:34:57 +01:00
ocornut
87b193399e Backends: Win32: change param to MultiByteToWideChar() to be consistent (should be no-op?).
Amend 0a7054c7e4 (#5725, #1807, #471, #2815, #1060 + #9099, #3653, #5961)
2025-12-03 13:30:59 +01:00
ocornut
bfe137893a Debug Log: fixed incorrectly printing characters in IO log when submitting non-ASCII values to io.AddInputCharacter(). (#9099) 2025-12-01 17:03:04 +01:00
ocornut
620a33dd85 TreeNode: fixed highlight position when used inside a line with a large text baseline offset.
Most old logic e.g. df749e3f13, ec0e953cca. Never quite worked for this situation.
2025-11-27 23:49:17 +01:00
ocornut
47766ca403 Demo: fix in 'Demo->Selection->Multi-Select in a Table' section. 2025-11-27 23:45:50 +01:00
ocornut
7c6febed66 Tables: fixed an issue where submitting non-integer row heights would eventually advance table parent layout by +0/+1 depending on its visibility. 2025-11-27 22:54:51 +01:00
ocornut
1a62292ac0 Tables: fixed an issue where a very thin scrolling table would advance parent layout slightly differently depending on its visibility. 2025-11-27 22:37:00 +01:00
ocornut
2026e3db88 Menus: fixed BeginMenu() child popup position when used inside a line with a baseline offset. 2025-11-27 21:51:04 +01:00
ocornut
3ff8c466bf Menus: fixed BeginMenuEx() icon/arrow baseline when using inside a line with an offset.
Amend 1f54665.
2025-11-27 20:05:18 +01:00