ocornut
de7cd6a4f2
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-11 23:28:16 +01:00
ocornut
9d10860224
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-11 23:28:16 +01:00
ocornut
2109538d7a
ImStrv: standardized code doing format copy, optimized ImStrStr
2025-12-11 23:28:16 +01:00
ocornut
9feb591c60
ImStrv: Fixed various compile errors/warnings.
2025-12-11 23:28:15 +01:00
ocornut
2b6162b747
ImStrv: moved double char* function signatures under #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS blocks.
2025-12-11 23:28:15 +01:00
ocornut
012b95f146
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-11 23:28:15 +01:00
ocornut
3505a7082f
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-11 23:28:15 +01:00
Rokas Kupstys
935c78cb85
ImStrv: Step 1 - change string type to ImStrv in API. (REBASED)
...
(last rebase amend 2024/12/11)
2025-12-11 23:26:50 +01:00
ocornut
0d2dd30ee9
Tabs: minor tweaks to facilitate mods altering spacing.
2025-12-11 17:17:57 +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
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
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
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
ocornut
1f54665799
Menus: fixed MenuItem() label baseline when using inside a line with an offset.
...
Amend f8fae02270
2025-11-27 19:54:06 +01:00
ocornut
ae873b1e0d
Misc: rename extraneous parenthesizes from return statements.
2025-11-27 15:01:24 +01:00
ocornut
136d067eed
Scrollbar: fixed a codepath leading to a divide-by-zero. ( #9089 )
2025-11-24 14:27:03 +01:00
ocornut
324cea1f41
Version 1.92.6 WIP
2025-11-24 13:35:41 +01:00
ocornut
6d910d5487
Version 1.92.5
2025-11-20 17:49:52 +01:00
ocornut
9afc62d087
InputText: Fixed an assert when using ImGuiInputTextFlags_ReadOnly and making underlying contents shorter while text is selected. ( #9069 )
2025-11-18 16:20:51 +01:00
ocornut
e60e5bff63
Misc: standardized casing of keyboard mods in comments and demo ("CTRL" -> "Ctrl").
2025-11-13 15:24:03 +01:00
ocornut
bd0e2036e0
Drag and Drop: added ImGuiDragDropFlags_AcceptDrawAsHovered. ( #8632 )
...
Not calling SetHoveredId() in that path, does not seem necessary.
2025-11-06 18:07:18 +01:00
ocornut
3c578fa87e
InputText: restore truncating, now between UTF-8 codepoint. ( #9029 )
...
Amend e612536 , 2a194e2 .
2025-10-29 18:40:40 +01:00
ocornut
8df962a6ed
Debug Tools: fixed DebugTextEncoding() potentially reading out of bounds if provided a trailing truncated UTF-8 sequence.
2025-10-29 17:58:52 +01:00
ocornut
2a194e21a0
InputText: revert truncation behavior from e612536 as it can truncate mid-UTF8. ( #9029 )
2025-10-29 17:24:23 +01:00
ocornut
9753c741b9
Disabled, ButtonBehavior: fixed a bug when a previously enabled item that got nav focus and then turns disabled could still be activated using keyboard. ( #9036 )
...
ButtonBehavior() was relying on lack of nav focus for keyboard handling
2025-10-29 16:43:27 +01:00
ocornut
7c483a0eba
Add indentation to ButtonBehavior() - no logic change.
2025-10-29 16:39:37 +01:00
ocornut
8019d39545
Shuffle a few internal context fields to reduce padding.
2025-10-28 19:06:36 +01:00
ocornut
a1632c6116
InputText, Demo: amend comments to direct more users to the std::string version.
...
https://www.youtube.com/watch?v=pLwvNdpTpjs wasted a solid hour before finding this.
Crazy that people are using AI instead of actually _reading_ comments, demo and headers. (The information appeared multiple times on their screen)
2025-10-24 17:10:57 +02:00
ocornut
e6125361f9
InputText: paste does a truncate when not fitting instead of ignoring it. ( #9029 )
2025-10-23 20:53:29 +02:00
ocornut
b7e45b3a48
InputText: rework STB_TEXTEDIT_INSERTCHARS() signature to allow partial insertion (unused). ( #9029 )
...
To be submitted as a PR to nothings/stb.
2025-10-23 20:19:16 +02:00
ocornut
750c5d2a61
InputText: do not require anymore that CursorPos be clamped by user code. ( #9029 )
...
Add clamping outside of callback code + simplify logic. The previous logic checking for difference was because old code e.g. 21d03edcb0 required a ImTextCountCharsFromUtf8() which is not required since #7925 .
2025-10-23 18:54:32 +02:00
ocornut
e571ccf3f4
InputText: removed unnecessary variables.
2025-10-23 18:43:20 +02:00
ocornut
63bfad401f
MultiSelect: added ImGuiMultiSelectFlags_NoSelectOnRightClick. ( #8200 , #9015 )
2025-10-20 18:58:45 +02:00
ocornut
36de604a5b
InputText: avoid continuously overwriting ownership of ImGuiKey_Enter / ImGuiKey_KeypadEnter in order to allow e.g. external Shortcut to override behavior. ( #9004 )
2025-10-16 16:12:40 +02:00
ocornut
2a5e9a15e4
InputTextMultiline: fixed a crash when using ImGuiInputTextFlags_WordWrap and resizing the parent window while keeping the multi-line field active. ( #9007 , #3237 )
2025-10-15 19:12:40 +02:00
ocornut
7d8d587bc0
Version 1.92.5 WIP
2025-10-15 16:46:18 +02:00
ocornut
9a5d5c45f5
Version 1.92.4
2025-10-14 19:26:56 +02:00
ocornut
2b770a029b
InputText: fixed an infinite loop error happening if a custom input text callback modifies/clear BufTextLen before calling InsertChars(). ( #8994 , #3237 )
...
+ misc comments.
2025-10-08 19:06:12 +02:00
ocornut
2128e2f44b
Style: added ImGuiCol_UnsavedMarker. ( #8983 )
2025-10-06 12:16:48 +02:00
ocornut
1c87024840
InputText: fixed single-line InputText() not applying fine character clipping properly (regression in 1.92.3). ( #8967 )
2025-09-29 13:38:27 +02:00
ocornut
0e7cd694eb
Version 1.92.4 WIP
2025-09-18 15:38:46 +02:00
ocornut
1c544ee941
Version 1.92.3
2025-09-17 18:37:56 +02:00
ocornut
431f2c5abd
InputText: fixed dubious code handling ImGuiInputTextFlags_EscapeClearsAll.
...
Specifically the missing = 0. Somehow only now got reported by Emscripten CI.
2025-09-15 19:32:24 +02:00
ocornut
36133d8ac4
InputText: Word-Wrap: hide vertical scrollbar but takes its width into account. ( #3237 , #952 , #1062 , #7363 )
...
Also increase IMGUI_VERSION_NUM for good measure, forgot to increase it when moving to public api.
2025-09-12 16:03:18 +02:00
ocornut
b6a33f8ce1
InputText: Word-Wrap: amend 7f1e2bb to avoid triggering static analyzer. ( #3237 , #952 , #1062 , #7363 )
...
And generally more logical this way anyhow.
2025-09-12 15:05:23 +02:00
ocornut
7f1e2bb8dd
InputText: Word-Wrap: avoid word-wrap specific path InputTextLineIndexGetPosOffset() when word-wrap is disabled. ( #3237 , #952 , #1062 , #7363 )
2025-09-12 15:03:33 +02:00
ocornut
8a94422246
InputText: optimize inactive path by avoiding an early ImStrlen().
2025-09-11 21:26:10 +02:00
ocornut
ae832ce532
InputText: moved blocks so same text rendering code is now used for active and inactive states.
...
(ignore whitespace to visualize this change easily)
2025-09-11 21:26:04 +02:00